Public | Automated Build

Last pushed: 7 months ago
Short Description
OpenVPN client + SOCKS proxy server
Full Description

OpenVPN-client

This is a docker image of an OpenVPN client tied to a SOCKS proxy server. It is
useful to isolate network changes (so the host is not affected by the modified
routing).

This supports directory style (where the certificates are not bundled together in one .ovpn file) and those that contains update-resolv-conf

Usage

Preferably, using start in this repository:

start /your/openvpn/directory

/your/openvpn/directory should contain one OpenVPN .conf file. It can reference other certificate files or key files in the same directory.

Alternatively, using docker run directly:

docker run -it --rm --device=/dev/net/tun --cap-add=NET_ADMIN \
    --name openvpn-client \
    --volume /your/openvpn/directory/:/etc/openvpn/:ro -p 1081:1080 \
    kizzx2/openvpn-client-socks

Then connect to SOCKS proxy through through local.docker:1081. For example:

curl --proxy socks5://local.docker:1081 ipinfo.io
Docker Pull Command
Owner
kizzx2

Comments (2)
emailbob
10 months ago

Normally up.sh can be found in /etc/openvpn but when the "start" script is used it mounts your local /etc/openvpn directory over the one in the docker container.

I would just go to https://github.com/masterkorp/openvpn-update-resolv-conf and copy the file update-resolv-conf.sh to your container somewhere other then /etc/openvpn and make sure it is executable and use that instead of up.sh

jbfuk
a year ago

I tried to use this as it sounds like exactly what i need, however it does not work for me. I get an error relating to setting of the default route. The SOCKS port doesn't work.

If I console in to the container I find that the VPN session is up and the default route seems to be set as traceroutes to the internet exit via the VPN. I can see sockd -D process running but as I mentioned the socks port isn't responding. There is no sockd.conf file in /etc and the up.sh file referenced in /usr/local/bin/sockd.sh doesn't exist as /etc/openvpn is linked to the host directory.

Should these files be present? Is there something I'm missing? Any pointers appreciated.

Thanks.