Skip to content

wdzeng/proxy-over-vpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.