What I'm wondering if there's a possibility to do something like

curl --socks5-hostname url.com

Without actually going through any proxy, just your normal internet connection, meaning you have your normal IP etc.


Well, if you log in via ssh over loopback:

% ssh -D 8080 localhost

Then you'll have localhost:8080 socks proxy created for you over that'll use the same host/IP/routes that you already use.

From ssh(1):

  -D [bind_address:]port
Specifies a local ``dynamic'' application-level port forwarding.  This
works by allocating a socket to listen to port on the local side,
optionally bound to the specified bind_address.  Whenever a connection
is made to this port, the connection is forwarded over the secure
channel, and the application protocol is then used to determine
where to connect to from the remote machine.  Currently the SOCKS4 and
SOCKS5 protocols are supported, and ssh will act as a SOCKS server.

Otherwise, it's not very clear what were you expecting to use as the SOCKS5 proxy handler, if you don't want to have a SOCKS5 proxy.

| improve this answer | |
  • 1
    The reason is that I wanted to try to run a few scripts that were built to use 127.0.01:8080 without having any proxy there. – DisplayName Dec 22 '15 at 22:31

You would need something running a proxy. Without a proxy, its like calling a phone number with no phone on the other end and expecting to somehow get through. In the same way, the applications are expecting something on your computer to be listening, respond, and talk the right protocol.

There are many simple (and efficient) proxies you could run, and would be no/low security risk if they only listen at

Also, while using ssh as a SOCKS proxy is certainly possible and often already installed, it is notably slower than dedicated proxy solutions (per my personal experience compared to port forwarding to squid on the same remote host, and per several of my acquaintances).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.