Skip to content

mrauhu/docker-openvpn-http-ssh-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker compose OpenVPN client with HTTP and SSH proxy

Setup

  1. Clone repository:
git clone https://github.com/mrauhu/docker-openvpn-http-ssh-proxy 
cd docker-openvpn-http-ssh-proxy 
  1. Create the config/ directory:
mkdir -p config 
  1. Copy your OpenVPN client config with certificates to the config/ directory.

  2. Create the .env file and set values:

OPENVPN_USERNAME= OPENVPN_PASSWORD= # Comma separated list, like: `a.example.com,b.example.com,*.internal.example.com` OPENVPN_TUNNEL_HOSTS= # Name of config file, like: `config.ovpn` OPENVPN_CONFIG_FILE=

Optionally, you can change ports:

OPENVPN_PROXY_AUTO_CONFIGURATION_PORT=8081 OPENVPN_PROXY_HTTP_PORT=8080 OPENVPN_PROXY_SSH_PORT=2222
  1. Use Proxy Auth-Configuration URL:

    http://127.0.0.1:8081 

    For:

    • macOS

      In System Preferences — Network — Proxies — Automatic Proxy Configuration protocol:

      • set Proxy Configuration File URL.
    • Windows

      In Settings — Network & Internet — Proxy:

      • check:
        • Automatically detect settings;
        • Use script setup;
      • set Script address.

Usage

Start in background

docker-compose up -d 

Down

docker-compose down -v