From 3c127453800e95f0c76234c1f0f836375ed73b99 Mon Sep 17 00:00:00 2001 From: Anjan Nath Date: Sun, 22 May 2022 00:59:24 +0530 Subject: clarify requirement of obfsvpn endpoint port for openvpn remote this also introduces OBFS4_ENDPOINT_PORT and renames OBFS4_ENDPOINT to OBFS4_ENDPOINT_PORT and updates the script 'run-openvpn.sh' to use these --- docs/README.md | 10 +++++----- scripts/run-openvpn-client.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 75958a5..29fcda4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,13 +42,13 @@ You should have certificates in `/tmp/cert.pem`, and the ca file in `/tmp/ca.crt ### 4. Run the `openvpn` client using the local `socks5` proxy. -The `openvpn` binary needs to be invoked with the `OBFS4_ENDPOINT` as the -`--remote`, and the local `socks5` port as the `--proxy`. +The `openvpn` binary needs to be invoked with the `OBFS4_ENDPOINT_IP` and `OBFS4_ENDPOINT_PORT` as the +`--remote`, the local `socks5` port should be passed with `--proxy`. -In this example, we pass the `OBFS4_ENDPOINT` variable via the `Makefile`: +In this example, we pass the `OBFS4_ENDPOINT_IP` and `OBFS4_ENDPOINT_PORT` variable via the `Makefile`: ``` -make run-openvpn OBFS4_ENDPOINT=2.2.2.2 +make run-openvpn OBFS4_ENDPOINT_IP=2.2.2.2 OBFS4_ENDPOINT_PORT=4430 ``` If everything went well, now you should be connected to the gateway remote, and @@ -56,7 +56,7 @@ all routes set up. ``` -❯ make run-openvpn OBFS4_ENDPOINT=2.2.2.2 +❯ make run-openvpn OBFS4_ENDPOINT_IP=2.2.2.2 OBFS4_ENDPOINT_PORT=4430 ./scripts/run-openvpn-client.sh + sudo openvpn --verb 3 --tls-cipher DHE-RSA-AES128-SHA --cipher AES-128-CBC --auth-nocache --proto tcp --dev tun --client --tls-client --remote-cert-tls server --tls-version-min 1.2 --ca /tmp/ca.crt --cert /tmp/cert.pem --key /tmp/cert.pem --pull-filter ignore ifconfig-ipv6 --pull-filter ignore route-ipv6 --socks-proxy 127.0.0.1 8080 --remote 2.2.2.2 443 --route 2.2.2.2 255.255.255.255 net_gateway 2022-05-21 03:41:35 OpenVPN 2.5.1 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022 diff --git a/scripts/run-openvpn-client.sh b/scripts/run-openvpn-client.sh index a70fcdc..d5be78f 100755 --- a/scripts/run-openvpn-client.sh +++ b/scripts/run-openvpn-client.sh @@ -12,5 +12,5 @@ sudo openvpn \ --pull-filter ignore ifconfig-ipv6 \ --pull-filter ignore route-ipv6 \ --socks-proxy 127.0.0.1 8080 \ - --remote $OBFS4_ENDPOINT 443 \ + --remote $OBFS4_ENDPOINT_IP $OBFS4_ENDPOINT_PORT \ --route $OBFS4_ENDPOINT 255.255.255.255 net_gateway -- cgit v1.2.3