Derived from: https://github.com/aw1cks/openconnect
A template for creating a vpn proxy suitable for Development Containers.
It can be used to:
- proxy traffic via a vpn
- use development containers with visual studio code via proxy
- run docker in docker
NOTE: See OpenConnect remote minimal for a all in one remote container.
- copy company.cer, user.key and user.pem into
certs
directory - create
.vpn-env
file (copy sample) and fill out the missing values
docker compose up -d
Start by using the devcontainer template as follows:
- create a directory for the repository on your host
- copy the
.devcontainer-template
into the repository directory as.devcontainer
- open the directory with vscode and use the container shell to clone the repository
- as the directory itself is not empty because of the
.devcontainer
directory you need to move all files from the created subfoldergit clone ... mv my-actual-repo/* . mv my-actual-repo/.* . rm -rf my-actual-repo
- add
.devcontainer/
to your.gitignore file
- as the directory itself is not empty because of the
NOTE: The Proxy settings might not be automatically applied for all applications in the devcontainer and you might need to specify it explicitly.
The Proxy is forwarded to localhost:3128
and currently configured to allow http and https connections (see squid.conf).
Use Foxy Proxy or similar tools in your browser to access it.
- run vpn container unprivileged: https://www.infradead.org/openconnect/nonroot.html (socks forwarding)