I am seeing curl issues while setting up a socks proxy through a simple SSH tunnel between two EC2 instances in AWS.
box1 $ ssh -v -D 12345 ubuntu@box2 -N
[...]
The socks proxy seems to be running properly on port 12345, now when I try to curl through it:
box1 $ curl -x socks5h://localhost:12345 www.google.com
curl: (7) Failed to receive SOCKS5 connect request ack.
Back on the ssh -D window, this error appears when I run the curl command :
debug1: Connection to port 12345 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
channel 1: open failed: administratively prohibited: open failed
debug1: channel 1: free: direct-tcpip: listening port 12345 for www.google.com port 80, connect from 127.0.0.1 port 36240 to 127.0.0.1 port 12345, nchannels 2
Can anybody shed some light about what's going on here?
maybe it is because domain address resolved to IPv6, and your socks5 proxy does not support that.
in this case, curl --ipv4 ...
will work properly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With