项目作者: matinrco

项目描述 :
Provide an authenticated http proxy that provides connectivity via an OpenConnect VPN client (to connect to a compatible AnyConnect VPN server)
高级语言: Shell
项目地址: git://github.com/matinrco/openconnect-proxy.git
创建时间: 2019-06-14T10:54:08Z
项目社区:https://github.com/matinrco/openconnect-proxy

开源协议:MIT License

下载


openconnect-proxy docker image

Packages an OpenConnect VPN client with an authenticating HTTP proxy to provide
access to the VPN via the proxy.

Example usage:

  1. # docker run --privileged -it -p 8123:8123 -v /tmp/oc.pw:/tmp/oc.pw -e OPENCONNECT_PASSWORD_FILE=/tmp/oc.pw -e OPENCONNECT_USERNAME=oc_user -e OPENCONNECT_GROUP=oc_group -e OPENCONNECT_HOST=vpn.example.com -e PROXY_USERNAME=puser -e PROXY_PASSWORD=secret matinrco/openconnect-proxy

Substitute the real values for your AnyConnect VPN credentials in place of oc_user, oc_group, and vpn.example.com; and create a file (in this case /tmp/oc.pw) containing the associated password.

While the above container is running, you should be able to use the docker host an http proxy to access resources via the VPN.

For example, you could set an http_proxy environment variable and use wget:

  1. # export http_proxy=http://puser:secret@dockerhost.example.com:8123/
  2. # wget http://protectedhost.example.com/

Available environment variables :

  1. PROXY_USERNAME
  2. PROXY_PASSWORD
  3. OPENCONNECT_PASSWORD
  4. OPENCONNECT_PASSWORD_FILE
  5. OPENCONNECT_USERNAME
  6. OPENCONNECT_GROUP
  7. OPENCONNECT_HOST
  8. OPENCONNECT_NO_CERT_CHECK

Note

  • Proxy authentication is optional . if you don’t want any authentication just don’t pass username/password.
  • You need to provide openconnect password with just one method . In a file or fill the related env var.
  • If your openconnect server doesn’t provide valid certificate , pass OPENCONNECT_NO_CERT_CHECK=true to ignore certificate check.
  • OPENCONNECT_GROUP is also optional.