Convert openconnect VPN connection to Shadowsocks server connections to avoid all network traffics going through VPN connection.
Really simple, just 6 steps!
- Clone this repo
- Build image
$ docker build -t docker-openconnect .
$ mv openconnect.conf.example openconnect.conf
- Get CERT option's value and fill all the informations in openconnect.conf
$ docker-compose up -d
- Use your favorite shadowsocks client to establish the connection, here is the default server configuration
In this case sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
is the CERT
option's value.
➜ ~ docker run -it --rm docker-openconnect openconnect connect.example.com
POST https://connect.example.com/
Connected to 8.8.8.8:443
SSL negotiation with connect.example.com
Server certificate verify failed: signer not found
Certificate from VPN server "connect.example.com" failed verification.
Reason: signer not found
To trust this server in future, perhaps add this to your command line:
--servercert sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Enter 'yes' to accept, 'no' to abort; anything else to view:
Just create more json configurations in ss-server
folder and update the PORTS
option in docker-compose.yml
.
Server certificate verify failed: signer not found
Server SSL certificate didn't match: XXXXXXXXXXXXXXXXXXXXXXXX
SSL connection failure: Error in the certificate.
Failed to open HTTPS connection to connect.example.com
Failed to obtain WebVPN cookie
Need to update SSL signature in openconnect.conf file, Get CERT option's value.
Username:fgets (stdin): Resource temporarily unavailable
Change your password and try again later.