Luois45 / openvpn-socks5

Multiple VPN connections manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openvpn-socks5

The application is a web server for managing multiple VPN connections and providing access to them in the form of local SOCKS5 proxies. The web server creates many VPN connections, and users connect to the VPN like a regular proxy server. The repository contains a docker image of an OpenVPN client bound to a SOCKS proxy. This supports configurations where certificates are concatenated into one .ovpn file.

architecture

Web server

Before you start you need to install the dependencies from requirements.txt.

pip install -r requirements.txt

Run it

Run the server with:

$ cd api
$ uvicorn main:app

INFO:     Started server process [23188]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

Interactive API docs

Now go to http://127.0.0.1:8000/docs

You will see the automatic interactive API documentation provided by Swagger UI.

Docker image

Run it

docker run -it --cap-add=NET_ADMIN --device /dev/net/tun \
           -p your_port:1080 --dns 8.8.4.4 \
           -v /your/openvpn/directory:/vpn -d saronqw/openvpn-socks5

Or you can build your own image first, and then run it.

docker build -t image_name .
docker run -it --cap-add=NET_ADMIN --device /dev/net/tun \
           -p your_port:1080 --dns 8.8.4.4 \
           -v /your/openvpn/directory:/vpn -d image_name

About

Multiple VPN connections manager


Languages

Language:Python 89.5%Language:Dockerfile 10.1%Language:Shell 0.5%