"invalid HTTP version parsed" error in proxy environmnet
Hi, now I installed deno on Ubuntu 22.04 and run
deno upgrade
then following error was happened.
Could you let me know workaround if possible?
My PC is in proxy environment and the setting is:
(.bashrc)
So HTTP_PROXY
and HTTPS_PROXY
is same value.
Note: Other commands (ex. Git clone or apt or curl) was passed this configuration.
And I tried to change http
to https
of HTTPS_PROXY
as following:
Then the following error caused:
Deno version is:
3 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, there are a couple of things to consider:
1. The error "invalid HTTP version parsed" suggests that there might be an issue with the HTTP version used by the proxy or the way Deno is interpreting it. Since you mentioned that other commands like Git, apt, or curl are working fine with the proxy settings, this might be specific to how Deno handles proxy environments.
2. Changing the
HTTPS_PROXY
from http
to https
and then encountering a "Connection reset by peer" error could indicate that the proxy server is not accepting HTTPS connections for some reason, or there is a network issue between your PC and the proxy.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. It might be helpful to ensure that your proxy server supports HTTPS connections if you're setting HTTPS_PROXY
to an https
URL. Additionally, you could check if there are any specific proxy settings or environment variables that Deno requires in a proxy environment that might differ from other tools.
If the issue persists, you may want to reach out to the Deno community or maintainers for more specific guidance, as they might have encountered similar issues in proxy environments.Helpful Links:
Deno 1.36: More flexible security and expanded testing APIs
Deno 1.13 Release Notes
deno upgrade
Deno 1.19 Release Notes
Deno 1.17 Release Notes
Deno 1.32: Enhanced Node.js Compatibility
deno upgrade | Deno Docs
Deno 1.44: Private npm registries, improved Node.js compat, and performance boosts
HTTP Server APIs
In my understanding,
The both configurations send CONNECT method to proxy server, and proxy server will establish TLS connection with the target server. But in case1, client does not establish TLS connection with proxy server and in case2, client establishes TLS connection.
I guess deno does not support case1 setting, only supports case2 setting. Is It correct?
Now, I found this PR in deno repository and after downgrade version to 1.45.2, deno was worked in proxy env!
GitHub
fix(ext/fetch): use correct ALPN to proxies by seanmonstar · Pull R...
Sending ALPN to a proxy, and then when tunneling, requires better juggling of TLS configs. This improves the choice of TLS config in the proxy connector, based on what reqwest does. It also include...