2

I can't figure out why my ssh-created socks proxy works with curl but not with Chrome + Mac OS Yosemite.

  • Socks proxy created with ssh -D 8080 -p 5432 -i mypubkey.pem my-user@my_server_ip
  • Tested with curl --socks5 localhost:8080 http://www.whatsmyip.net/ |grep "Address is"
  • And with curl --proxy socks://localhost:8080 http://www.whatsmyip.net/ |grep "Address is"

With the following result :

<h1 class="ip">Your <acronym title="Internet Protocol">IP</acronym> Address is <input type="text" value="my_server_ip" /></h1>
<h1 class="ip">Your <acronym title="Internet Protocol">IP</acronym>V6 Address is <input type="text" value="my_server_ip_v6" /></h1>

But when I configure at the system level Yosemite with "Proxy SOCKS": localhost:8080 it does not work at all with Chrome / Firefox / Safari.

Adding the -vv for more detail I see the following stack when requesting with chrome

debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug2: fd 22 setting TCP_NODELAY
debug1: channel 15: new [dynamic-tcpip]
debug2: channel 15: pre_dynamic: have 0
debug2: channel 15: pre_dynamic: have 3
debug2: channel 15: decode socks5
debug2: channel 15: socks5 auth done
debug2: channel 15: pre_dynamic: need more
debug2: channel 15: pre_dynamic: have 0
debug2: channel 15: pre_dynamic: have 20
debug2: channel 15: decode socks5
debug2: channel 15: socks5 post auth
debug2: channel 15: dynamic request: socks5 host www.google.fr port 443 command 1
debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug2: fd 23 setting TCP_NODELAY
debug1: channel 16: new [dynamic-tcpip]
debug2: channel 16: pre_dynamic: have 0
debug2: channel 16: pre_dynamic: have 3
debug2: channel 16: decode socks5
debug2: channel 16: socks5 auth done
debug2: channel 16: pre_dynamic: need more
debug2: channel 16: pre_dynamic: have 0
debug2: channel 16: pre_dynamic: have 20
debug2: channel 16: decode socks5
debug2: channel 16: socks5 post auth
debug2: channel 16: dynamic request: socks5 host www.google.fr port 443 command 1

After some requests the console is frozen and I can't see any other debug logs.

Any idea to solve this issue ?

kheraud
  • 263
  • 2
  • 11
  • 1
    Sidenote: you can use `icanhazip.com` to get the IP in plaintext directly without needing to `grep` anything. –  Apr 02 '15 at 17:07

0 Answers0