Giter VIP home page Giter VIP logo

openvpn_socks5_docker's Introduction

OpenVPN SOCKS5 Proxy

Docker container to connect to an OpenVPN network. The network is exposed to your host PC using SOCKS5 proxy.


Setup

Build the container

./build.sh

Usage

Place your OpenVPN config file in the ./config/ directory.

Start the container (Host PC)

./start.sh

Launch your OpenVPN config file (inside container)

launch *.ovpn

On your host PC, access the network using SOCKS5 proxy on port 9050

Halt your OpenVPN instance (inside container)

halt

Stop the container (Host PC)

./stop.sh

Implementation

The container simply has an OpenVPN installation and a network interface tun0 for it.

Dante SOCKS Server is used. It listens on eth0 (the network from the host PC) and connects to this tun0 network (the OpenVPN network).

Notice

Test if it work on your host

curl --socks5 localhost:9050 http://ipinfo.io/

If you can't find danted process in the ps -ef inside container

  • either check the syslog

  • or change logoutput in /etc/danted.conf to a location you can locate easily, such as /var/log/danted/danted.log(you need to make sure the directory exists)

If you find something such as unresolved host tun0 in your danted process's log

  • after setup your vpn connection, run ifconfig to check your interface's name, mine is tun0, replace the tun0 by your interface name

If you can't find openvpn process in the ps -ef inside container

  • run openvpn --config *.ovpn manually to see what's going on, it may be caused by wrong password or wrong server configuration

openvpn connected successfully but danted need to be started manually

  • For thoese who need manually enter the username and password, 3 seconds may not enough, change sleep 3 to sleep 60 in Dockerfile before build, or change it in ~/.bashrc manually

openvpn_socks5_docker's People

Contributors

zpoint avatar zst123 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.