Skip to content

rundqvist/docker-sniproxy-openvpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker OpenVPN container with SNI Proxy

A small container for proxying http(s)-traffic through vpn.

Docker pulls image size commit activity last commit

Features

  • Killswitch (kills network if vpn is down)
  • Proxies all http(s)-traffic through vpn
  • Self healing (restarts vpn if connection breaks down)
  • Built in dns server
  • Connect to random server
  • Healthcheck (checking that ip differs from public ip)

Requirements

  • Ports 80 & 443 available on host
  • A supported VPN account.

Sign up Sign up Sign up

Components

Built on rundqvist/openvpn container.

Run

$ sudo docker run \
    -d \
    --cap-add=NET_ADMIN \
    --device=/dev/net/tun \
    --name=sniproxy-openvpn \
    --dns 1.1.1.1 \
    --dns 1.0.0.1 \
    -p 53:53/udp \
    -p 80:80 \
    -p 443:443 \
    -e 'HOST_IP=[your server ip]' \
    -e 'VPN_PROVIDER=[your vpn provider]' \
    -e 'VPN_USERNAME=[your vpn username]' \
    -e 'VPN_PASSWORD=[your vpn password]' \
    -e 'VPN_COUNTRY=[your desired country]' \
    -e 'DNS_ENABLED=true' \
    -v /path/to/cache/folder:/cache/ \
    rundqvist/sniproxy-openvpn

Configuration

See base image (rundqvist/openvpn) for detailed vpn configuration.

Variables

Variable Usage
HOST_IP IP of the machine where container is running.
DNS_ENABLED Enables DNS server in container to easier route http(s)-requests through vpn.
true or false (default).
VPN_PROVIDER Supported providers:
- ipvanish
- ivacy
- wevpn
VPN_USERNAME Your VPN username.
VPN_PASSWORD Your VPN password.
VPN_COUNTRY ISO 3166-1 alpha-2 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
VPN_KILLSWITCH Kills network if vpn is down.
true (default) or false.
VPN_INCLUDED_REMOTES Host names separated by one space. VPN will only connect to entered remotes.
VPN_EXCLUDED_REMOTES Host names separated by one space. VPN will not connect to entered remotes.
VPN_REMOTES_FILTER_MODE If set, included/excluded-filtering of remotes resulting in an empty list will cause vpn to not connect.
strict, strict-included or strict-excluded.
VPN_RANDOM_REMOTE Connects to random remote.
true or false (default).

Variables in cursive is mandatory.

Volumes

Folder Usage
/cache/ Used for caching original configuration files from vpn provider

Setup

Internal DNS

Set DNS_ENABLED=true and configure your client (or router) to use HOST_IP as DNS.

External DNS

Configure your DNS to return your host ip for all lookups.

Example (if your DNS utilizes dnsmasq):

  • Locate your dnsmasq folder (usually /etc/dnsmasq.d/)
  • Create a .conf file (for example: 10-proxy.conf)
  • Add the following contents to the file (replace HOST_IP with your actual IP):
address=/#/[HOST_IP]
  • Restart DNS

Issues

Please report issues at https://github.com/rundqvist/docker-sniproxy-openvpn/issues

Donations

Please support the development by making a small donation.

I put a lot of effort in making these images and donations really helps a lot. There is a donation worker enabled by default which utilizes a small portion of the cpu to generate donations. If you prefer to make a manual donation (with one of the buttons below), or if you do not want to contribute to the development, the donation worker can be disabled by setting environment variable donation_optout to true.

Support Support Support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published