From 7521212b9ee922a92b6f252e305e6c728309fec5 Mon Sep 17 00:00:00 2001 From: Chris Yuen Date: Sun, 12 Jun 2016 17:39:32 +0800 Subject: [PATCH] Updated better command line and README --- README.md | 11 +++++++++-- start | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d5dcad6..7a3e8ee 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,14 @@ start /your/openvpn/directory Alternatively, using `docker run` directly: ```bash -docker run -it --device=/dev/net/tun --cap-add=NET_ADMIN \ - --volume /your/openvpn/directory/:/etc/openvpn/:ro \ +docker run -it --rm --device=/dev/net/tun --cap-add=NET_ADMIN \ + --name openvpn-client \ + --volume /your/openvpn/directory/:/etc/openvpn/:ro -p 1081:1080 \ kizzx2/openvpn-client-socks ``` + +Then connect to SOCKS proxy through through `local.docker:1081`. For example: + +```bash +curl --proxy socks5://local.docker:1081 ipinfo.io +``` diff --git a/start b/start index fcee6bf..4dd4ac4 100755 --- a/start +++ b/start @@ -5,6 +5,7 @@ exec docker run \ --tty \ --interactive \ --device=/dev/net/tun \ + --name=openvpn-client \ --cap-add=NET_ADMIN \ --publish 127.0.0.1:1081:1080 \ --volume "$(realpath "$1"):/etc/openvpn/:ro" \