wdzeng / proxy-over-vpn

Run forward proxy server over VPN.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proxy over VPN

github docker release

MEME

Run HTTP forward proxy server over VPN in docker container.

Warning
Since a root container is required, you should not use podman.

Warning
This project aims at HTTP proxy only.

This image contains NGINX server with ngx_http_proxy_connect_module module and OpenVPN. User traffics first arrive the forward proxy server, which then forward them over the VPN to the world.

Usage

Prepare an .ovpn file for OpenVPN config.

Common usage:

docker run [-it] \
    --cap-add NET_ADMIN \
    -p <exposed-port>:3128 \
    -v /path/to/ovpn:/config.ovpn
    hyperbola/proxy-over-vpn:1
  • NGINX server acts as forward proxy server which exposes port on 3128, and therefore you need to set -p <exposed-port>:3128 to forward the port.
  • OpenVPN requires the NET_ADMIN capability to work so you need to set --cap-add NET_ADMIN flag.
  • OpenVPN client reads the config at /config.ovpn so you need to mount that file with -v /path/to/ovpn:/config.ovpn.

Logs

By default, logs of nginx server are output to stdout and stderr. Mount to /var/log/nginx/access.log and /var/log/nginx/error.log to collect logs.

About

Run forward proxy server over VPN.

License:MIT License


Languages

Language:Dockerfile 84.5%Language:Shell 15.5%