Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget with squid https_proxy not working #199

Open
ping2balaji opened this issue Jun 5, 2024 · 1 comment
Open

wget with squid https_proxy not working #199

ping2balaji opened this issue Jun 5, 2024 · 1 comment

Comments

@ping2balaji
Copy link

Hi,
We are facing issue when we use squid proxy serving https_proxy.
client --> squid: is encrypted in a TLS session and squid is NOT performing man-in-the-middle or bump.

In the client machine i have exported the env variable as:
https_proxy=https://192.168.200.4

After this when i do https access using "curl https://google.com" its working fine and in the pcap we can see that the curl is connecting to proxy first(192.168.200.4) and then it establishes TLS connection with this proxy. Only after this TLS connection is established, curl is sending CONNECT request to proxy to reach google.com:443 (https).

But when the same is tried with wget https://google.com we are getting following error:
"Failed reading proxy response: Connection reset by peer
Retrying."
while checking pcap, it looks like wget is sending the CONNECT without establishing TLS to proxy(unlike curl). CONNECT is sent outside of the TLS tunnel in clear text! After the 3-way handshake, request sends a push, squid responds with an ack, and then requests sends the connect message but the message is not encrypted in the TLS tunnel. After which, squid acknowledges receipt of the CONNECT and immediately follows with a TCP RESET resulting in above connection reset by peer error.

image

Note: The squid logs show this: NONE/000 0 NONE error:transaction-end-before-headers - HIER_NONE/- -

We depend on wget to download in many places. Any help highly appreciated on why its working in other ways like curl but not in wget.

Thanks,
Balaji

@hexiaoyuchina
Copy link

I encountered a similar problem and did not find a solution. Have you solved it? If so, please let me know the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants