Sometimes you want to hide your IP, but just for one specific application. Or a couple; but certainly you do not want to completely switch to another network.
If your application does support SOCKS (or even HTTP) proxy, nordvpn-proxy
is what you need!
However, please be aware that this is a very hacky solution, suitable for private use but definitely not production-ready (for whatever definition of "production"). You might want to check the links in References for other solutions.
First, go to the Nord Account dashboard to get the service credentials:
Paste the credentials to the auth.txt
file within the same directory as Dockerfile
.
Username is the first line; password is the second.
Now, build the thing (note that the aforementioned auth.txt
file will be stored in plaintext within the container!):
docker build -t nordvpn-proxy .
Customize the parameters (--env
arguments are optional; default is to use TCP and a recommended server) and run the container:
docker run -it --privileged --rm \
--dns=8.8.8.8 \
--env SERVER=nl868.nordvpn.com \
--env PROTOCOL=udp \
-p 1080:1080 \
-p 3128:3128 \
nordvpn-proxy
You can also specify just the 2 digits of the country code and a random server from that country will be selected:
docker run -it --privileged --rm --dns=8.8.8.8 --env SERVER=de -p 1080:1080 nordvpn-proxy
Test it!
curl -x socks5h://127.0.0.1:1080 http://whatismyip.akamai.com
curl -x http://127.0.0.1:3128 http://whatismyip.akamai.com