Giter Site home page Giter Site logo

docker-openconnect's Introduction

docker-openconnect

Convert openconnect VPN connection to Shadowsocks server connections to avoid all network traffics going through VPN connection.

Setup

Really simple, just 6 steps!

  1. Clone this repo
  2. Build image $ docker build -t docker-openconnect .
  3. $ mv openconnect.conf.example openconnect.conf
  4. Get CERT option's value and fill all the informations in openconnect.conf
  5. $ docker-compose up -d
  6. Use your favorite shadowsocks client to establish the connection, here is the default server configuration

Get CERT option's value

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:

Add more ss servers

Just create more json configurations in ss-server folder and update the PORTS option in docker-compose.yml.

Troubleshoots

1. Server SSL certificate didn't match

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.

2. Resource temporarily unavailable

Username:fgets (stdin): Resource temporarily unavailable

Change your password and try again later.

Links

  1. https://stackoverflow.com/a/30555962
  2. https://askubuntu.com/a/1070029

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.