This is a small Docker image which blends together OpenVPN-Client and a SOCKS proxy server. Use it to isolate network changes.
bash run.sh ~/path/to/vpn-folder/
Alternatively:
docker run \
--rm \
-it \
--privileged \
--device=/dev/net/tun \
--cap-add=NET_ADMIN \
--env-file socks.config \
-p 1080:1080 \
--volume "~/path/to/vpn-folder/:/vpn/:ro" \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
ohpe/socks-my-vpn:latest
The socks5 server is written in Go and forked from https://github.com/serjs/socks5-server.
If works with or without authentication and the configurations can be set in the
socks.config
file.
Supported config parameters:
ENV variable | Type | Default | Description |
---|---|---|---|
PROXY_USER |
String | EMPTY | Set proxy user (also required existed PROXY_PASS ) |
PROXY_PASSWORD |
String | EMPTY | Set proxy password for auth, used with PROXY_USER |
PROXY_PORT |
String | 1080 |
Set listen port for application |
Connect to proxy:
without auth:
curl --proxy socks5://127.1:$PROXY_PORT ipinfo.io
with auth:
curl --socks5 --user $PROXY_USER:$PROXY_PASSWORD 127.1:$PROXY_PORT ipinfo.io