https://github.com/wdzeng/proxy-over-vpn
Run forward proxy server over VPN.
https://github.com/wdzeng/proxy-over-vpn
forward-proxy nginx openvpn proxy vpn
Last synced: about 2 months ago
JSON representation
Run forward proxy server over VPN.
- Host: GitHub
- URL: https://github.com/wdzeng/proxy-over-vpn
- Owner: wdzeng
- License: mit
- Created: 2022-06-10T08:49:17.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T18:50:41.000Z (almost 3 years ago)
- Last Synced: 2025-02-06T10:53:11.605Z (4 months ago)
- Topics: forward-proxy, nginx, openvpn, proxy, vpn
- Language: Dockerfile
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Proxy over VPN
[](https://github.com/wdzeng/proxy-over-vpn/)
[](https://hub.docker.com/repository/docker/hyperbola/proxy-over-vpn)
[](https://github.com/wdzeng/proxy-over-vpn/releases/latest)
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](https://www.nginx.com/) server with [ngx_http_proxy_connect_module module](https://github.com/chobits/ngx_http_proxy_connect_module) and [OpenVPN](https://openvpn.net/). 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:
```sh
docker run [-it] \
--cap-add NET_ADMIN \
-p :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 :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.