Giter Club home page Giter Club logo

docker-openvpn-client-socks's Introduction

OpenVPN-client

This is a docker image of an OpenVPN client tied to a SOCKS proxy server. It is useful to isolate network changes (so the host is not affected by the modified routing).

This supports directory style (where the certificates are not bundled together in one .ovpn file) and those that contains update-resolv-conf

(For the same thing in WireGuard, see kizzx2/docker-wireguard-socks-proxy)

Why?

This is arguably the easiest way to achieve "app based" routing. For example, you may only want certain applications to go through your WireGuard tunnel while the rest of your system should go through the default gateway. You can also achieve "domain name based" routing by using a PAC file that most browsers support.

Usage

Preferably, using start in this repository:

start /your/openvpn/directory

/your/openvpn/directory should contain one OpenVPN .conf file. It can reference other certificate files or key files in the same directory.

Alternatively, using docker run directly:

docker run -it --rm --device=/dev/net/tun --cap-add=NET_ADMIN \
    --name openvpn-client \
    --volume /your/openvpn/directory/:/etc/openvpn/:ro -p 1080:1080 \
    kizzx2/openvpn-client-socks

Then connect to SOCKS proxy through through localhost:1080 / local.docker:1080. For example:

curl --proxy socks5h://local.docker:1080 ipinfo.io

HTTP Proxy

You can easily convert this to an HTTP proxy using http-proxy-to-socks, e.g.

hpts -s 127.0.0.1:1080 -p 8080

docker-openvpn-client-socks's People

Contributors

kizzx2 avatar mook avatar

Watchers

 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.