Giter Site home page Giter Site logo

docker-openvpn-proxy's Introduction

OpenVPN Proxy

A Privoxy container with OpenVPN
Built on Alpine Linux so tiny, fast, light and awesome.

Setup

Docker

docker run -d --device=/dev/net/tun --cap-add=NET_ADMIN \
	--dns=1.1.1.1 --dns=1.0.0.1 \
    -e "OPENVPN_FILENAME=uk-london-aes128.ovpn" \
    -e "LOCAL_NETWORK=192.168.1.0/24" \
    -e "ONLINECHECK_DELAY=900" \
    -v ./openvpn-config:/app/ovpn/config \
    -p 8080:8080 \
    andymeful/privoxy-openvpn

docker-compose.yml has been included in the repository for reference.

Volume

1 volume needs to be mapped to /app/ovpn/config within the container.
This volume should include any ovpn config files to be used and, credentials.txt.

VPN Config

I've tested with PIAs ovpn configs but will probably work with any, just make sure to include the following line somewhere:

auth-user-pass /app/ovpn/config/credentials.txt

I plan to check for / automagically add this line in future.

I left in PIA London config for use if needed.
Obviously you'll need to have a PIA account.

Credentials

Create ./credentials.txt in the directory which is mapped to /app/ovpn/config.
On the 1st line put the username, on the 2nd line the password.

Environment Variables

LOCAL_NETWORK

The CIDR mask of the local IP addresses which will be acessing the proxy. This is so the response to a request makes it back to the requestee.

OPENVPN_FILENAME

The .ovpn file to use. This file should be in the directory which is mapped to /app/ovpn/config.

ONLINECHECK_DELAY

Will make a web request to Google every x seconds (default 900 (15 minutes)). If the request fails, OpenVPN will be restarted.

docker-openvpn-proxy's People

Contributors

andrew-naish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.