0

I use the shadowsocks and the proxy client is called Trojan-Qt5. I am testing whether I can visit www.google.com in terminal.

when I set the environment variable http_proxy to http protocol

export "http_proxy=http://127.0.0.1:58591"

the command curl -Iv www.google.com return normal response.

However, when I set http_proxy to socks5 protocol

export "http_proxy=socks5://127.0.0.1:51837"

it returns

curl: (52) Empty reply from server

screenshot of the iterm2

I just want to know why changing to socks5 protocol lead to the problem?

By the way, the question is different from this.

Ye Shiqing
  • 1,519
  • 2
  • 15
  • 24
  • Adding `-v` might shed some more light on it, but it sounds like maybe the proxy isn't sending data through properly from the server to curl. – Daniel Stenberg Sep 21 '22 at 11:10
  • @DanielStenberg thx for the suggestion, I have adjusted the question. I think the proxy client have sent the data, but the server replied with neither response header nor response body. – Ye Shiqing Sep 22 '22 at 08:19
  • 1
    No header and no response, that's not a valid HTTP response so that's exactly why curl says "empty reply from server". Since you got the reply when using the HTTP proxy, I would say it hints on your socks proxy doing the wrong thing. – Daniel Stenberg Sep 22 '22 at 08:42

0 Answers0