HTTP proxies are unauthenticated despite correct details

Hi there! I’m setting up HTTP_PROXY and HTTPS_PROXY but for some reason it always gives a HTTP « Bad response: 407 » error. This error usually indicates that you didn’t provide authentication to the proxy, so I’ve tested the credentials extensively. I have tested this when moving to object storage and importing a video from an external URL.

I have confirmed the credentials are valid, and that the proxy can access my external storage by running the following command on my computer:
curl -x https://username:password@host:port https://my.video.storage/video.mp4

I have confirmed that I did not misspell anything in the .env Docker file by copying and pasting the exact string I set for HTTP_PROXY and HTTPS_PROXY and using the above curl command.

I have confirmed that PeerTube can connect to the proxy by entering into the peertube container with sudo docker compose exec -it peertube /bin/bash and running the above curl command.

I have confirmed that the issue lies with the HTTP_PROXY and HTTPS_PROXY variables because I get the same « Bad response: 407 » error when importing a video from a YouTube URL. Please see the following link for a full log: Hastebin

Since the HTTP proxy doesn’t work, I think part of that error is because it couldn’t download the yt-dlp binary due to the 407 authentication error.

I have confirmed that there are no issues with escaping special characters in the .env file by trying to surround the HTTP_PROXY and HTTPS_PROXY variables with single quotes (') which usually fixes special character escaping in my experience.

I also analysed the logs and confirmed that the HTTP proxy string it prints is correct in the logs and includes authentication (username and password).

Additionally, I’ve tested this on another instance with another proxy and it ALSO fails with a different error. IP_ADDRESS and PORT refer to the IP and port of the proxy I use on the other instance. Both instances are on the same machine though.

Error: connect ETIMEDOUT IP_ADDRESS:PORT
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)

I don’t know what to test anymore, so any help would be appreciated!

Hi again. I’m just wondering if there’s any update on this? I’m paying for my HTTP proxy monthly but I can’t use it with PeerTube at the moment due to this issue. This also means my users can’t import videos from other sources as the HTTP proxy doesn’t work.

Any help would be appreciated. Thanks.

Are there any updates as to if this is a problem with PeerTube v8.0.1, or a configuration problem?

As stated before, this affects my users and my ability to use the proxy I pay for.

Thanks.

Hi,

Can you re-upload your logs so I can see what is the stacktrace?

Sure thing. In the interest of privacy, I’ll send you a DM with the link and password to access all the logs with the warning level. I can also send all the logs with the debug level if you want as well.

I tried uploading a video (which failed to move to object storage because of the proxy) and importing a YouTube video (which also failed). You should be able to see those two actions in the logs.