How to make a SOCKS5 proxy server?

How to setup a SOCKS5 proxy server on Ubuntu?

This is what I needed after googling around and finding many answers that were outdated and not working for my purpose at all.

First, you need to add the socks5 protocol in net/protocol.go and check what's inside on line 929. You must have socks5, socks4 or http protocol available when calling this function (net.dial).

Once done (or you can do it manually), it will set up a SOCKS5 proxy server that will handle incoming TCP connections via IP:port to other SOCKS5 proxies. You may have many of these set up on your machine.

This code requires using net.Dial() to connect a TCP connection. This was actually the first example I found which did that! :)

This is the most important step in this article. Most tutorials will mention setting up a socks5 server as an example, but only show you how to set up a socks4 proxy and not a socks5 proxy.

So, let's first of all build the client. For that, we will create a SOCKS5 client from an ssh connection and call socks5server. ListenAndServe(addr, handler) function (in the above step) directly with our desired host/ip.

The SOCKS5 client will handle the connection and then proxy the connection back to you as if it had connected to a server on that host/ip. It is very important to understand that this only works properly if you tell Go (the client part) the IP address of the remote host. Otherwise it'll just look like a regular ssh tunnel.

That is easily solved if you have root access to the remote host. If you want to use this on a non-root user, you can use this workaround I found after a while.

Let's set up a new ssh connection first, and then connect to a different host that has a known SOCKS5 server, like 127.0.1:88 or 127.1:1080 as shown here. Use any socks5 server from the Internet you like.

We can now run the go run ./socks5client (if you run it under golang's test directory).

How to set SOCKS proxy in Ubuntu terminal?

I have an Ubuntu laptop and I use it as my desktop with a wired ethernet connection.

I want to set a SOCKS proxy so that I can use the Ubuntu desktop on my laptop remotely via VNC.

When I try to do this in the Internet Settings, I get "SOCKS Proxy Configuration Required". In Firefox, I can set the proxy using the Options->Proxy->Manual proxy configuration. However, if I click "Use a manual proxy configuration." and enter my SOCKS proxy address, it doesn't work. I even tried it from a Firefox profile that didn't work, but when I ran that profile from another profile that worked, it worked. I used the SOCKS proxy on another laptop and it worked fine, so I know it's not a problem with my wireless adapter.

So, how do I get this SOCKS proxy set up? sudo apt-get install ssh. Sudo apt-get install socks5-proxy-agent. Edit your ~/.bashrc file (and probably other .

Related Answers

Are SOCKS5 proxy servers paid?

A SOCKS5 proxy is a VPN provider that supports SOCKS5 protocol. With a SOCKS5 p...

Can I use a SOCKS5 proxy for torrenting?

Dedicated SOCKS5 proxies are used for enabling remote users to connect to...

Is SOCKS5 proxy free?

We think this feature will be very useful. But it could be abuse...