OpenVPN with ocproxy/tunsocks/VPN-to-proxy/socks2tun support, as well as AWS VPC support.
Ported from
- https://github.com/ValdikSS/openvpn-tunpipe
- https://github.com/samm-git/aws-vpn-client
To follow this readme, you'll need Nix installed. There should be nothing, however, to preclude you from just building it as a regular OpenVPN fork.
Also you don't need to clone the repository to try it out, if you have Nix installed. Instead you can just
run it directly from github: e.g. nix run github:bendlas/openvpn-tuna#server
Replace .#
with github:bendlas/openvpn-tuna#
in the examples, in
order to do so.
First get an OVPN file for your endpoint from the AWS Client VPN Self-Service Portal
In a new terminal: Start the go server, that will push the browser response back to the connection script.
nix run .#server
Then you can use whatever client works for you. Tunsocks is tested.
Each client will be a full, but rootless OpenVPN instance, that runs the connection script on a proxy pipe, similar to an OpenConnect script tunnel.
nix run .#tunsocks -- /home/user/code/project/tmp/cvpn-endpoint-<vpn-id>.ovpn
then check your public ip from within VPN
curl --socks5-hostname 127.0.0.1:10080 -v https://icanhazip.com/
nix run .#ocproxy -- /home/user/code/project/tmp/cvpn-endpoint-<vpn-id>.ovpn
nix run .#vpnns -- /home/user/code/project/tmp/cvpn-endpoint-<vpn-id>.ovpn
then
vpnns
to get into the isolated vpn network namespace.