Dockerfile + Python start script to configure an openconnect + tunsocks SOCKS proxy.
Lets you connect to VPN'd networks without having to install anything on your host machine, or having to configure your host machine's network settings.
docker build . -t osp
Example .env:
VPN_SERVER=my-vpn-server.example.com
VPN_LOGIN=my-username
VPN_GROUP=my-group (optional)
VPN_PASSWORD=my-password
VPN_TOTP_SECRET=... (optional)
VPN_PROTOCOL=anyconnect (optional; also e.g. gp, nc, pulse, fortinet, array)
SOCKS_PORT=8080 (optional)
docker run -it -p 8080:8080 --env-file=.env osp
curl --verbose --socks4a 127.0.0.1:8080 "https://something-that-requires-vpn.com"
Use --socks4a to have DNS lookups also occur via the VPN.