{"id":17291205,"url":"https://github.com/ali-master/docker-anyconnect-squid-proxy","last_synced_at":"2025-10-15T10:30:28.552Z","repository":{"id":181187107,"uuid":"666360979","full_name":"ali-master/docker-anyconnect-squid-proxy","owner":"ali-master","description":"Provide an HTTP proxy that provides connectivity via an OpenConnect VPN client (to connect to a compatible AnyConnect VPN server) in a Docker container","archived":false,"fork":false,"pushed_at":"2023-07-15T18:41:11.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-04T23:05:31.789Z","etag":null,"topics":["anyconnect","docker","docker-anyconnect-squid","proxy-server","squid-proxy"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/alimaster/openconnect-squid-proxy","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ali-master.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-14T10:18:21.000Z","updated_at":"2024-11-30T16:27:43.000Z","dependencies_parsed_at":"2023-07-14T12:16:14.848Z","dependency_job_id":null,"html_url":"https://github.com/ali-master/docker-anyconnect-squid-proxy","commit_stats":null,"previous_names":["ali-master/docker-anyconnect-squid-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fdocker-anyconnect-squid-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fdocker-anyconnect-squid-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fdocker-anyconnect-squid-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-master%2Fdocker-anyconnect-squid-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali-master","download_url":"https://codeload.github.com/ali-master/docker-anyconnect-squid-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236603277,"owners_count":19175725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anyconnect","docker","docker-anyconnect-squid","proxy-server","squid-proxy"],"created_at":"2024-10-15T10:40:21.575Z","updated_at":"2025-10-15T10:30:23.261Z","avatar_url":"https://github.com/ali-master.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openconnect + squid proxy\n\nThis Docker image contains an [openconnect client](http://www.infradead.org/openconnect/) (version 8.04 with pulse/juniper support) and the [squid proxy server](https://ubuntu.com/server/docs/proxy-servers-squid) for http/https connections.\n\n# Requirements\n\nIf you don't want to set the environment variables on the command line\nset the environment variables in a `.env` file:\n```env\nOPENCONNECT_URL=\u003cGateway URL\u003e\nOPENCONNECT_USER=\u003cUsername\u003e\nOPENCONNECT_PASSWORD=\u003cPassword\u003e\nOPENCONNECT_OPTIONS=--authgroup \u003cVPN Group\u003e \\\n\t--servercert \u003cVPN Server Certificate\u003e --protocol=\u003cProtocol\u003e \\\n\t--reconnect-timeout 86400\n```\n\n_Don't use quotes around the values!_\n\nSee the [openconnect documentation](https://www.infradead.org/openconnect/manual.html) for available options. \n\nEither set the password in the `.env` file or leave the variable `OPENCONNECT_PASSWORD` unset, so you get prompted when starting up the container.\n\nOptionally set a multi factor authentication code:\n```env\nOPENCONNECT_MFA_CODE=\u003cMulti factor authentication code\u003e\n```\n\n# Run container in foreground\n\nTo start the container in foreground run:\n```bash\ndocker run -it --rm --privileged --env-file=.env \\\n\t-p 3306:3306 -p 8889:8889 alimaster/openconnect-squid-proxy:latest\n```\n\nThe proxies are listening on ports 3306 (http/https). Either use `--net host` or `-p \u003clocal port\u003e:3306 -p \u003clocal port\u003e:8889` to make the proxy ports available on the host.\n\nWithout using a `.env` file set the environment variables on the command line with the docker run option `-e`:\n```bash\ndocker run … -e OPENCONNECT_URL=vpn.gateway.com/example \\\n-e OPENCONNECT_OPTIONS='\u003cOpenconnect Options\u003e' \\\n-e OPENCONNECT_USER=\u003cUsername\u003e …\n```\n\n# Run container in background\n\nTo start the container in daemon mode (background) set the `-d` option:\n```bash\ndocker run -d -it --rm …\n```\n\nIn daemon mode you can view the stderr log with `docker logs`:\n```bash\ndocker logs `docker ps | grep \"alimaster/openconnect-squid-proxy\" | awk -F' ' '{print $1}'`\n```\n\n# Use container with docker-compose\n```yml\nversion: '3.2'\n\nservices:\n  vpn:\n    container_name: vpn\n    image: alimaster/openconnect-squid-proxy:latest\n    ports:\n      - 0.0.0.0:3306:3306\n    privileged: true\n    env_file:\n      - .env\n    cap_add:\n    - NET_ADMIN\n```\n\nSet the environment variables for _openconnect_ in the `.env` file again (or specify another file) and \nmap the configured ports in the container to your local ports if you want to access the VPN \non the host too when running your containers. Otherwise only the docker containers in the same\nnetwork have access to the proxy ports.\n\n# Route traffic through VPN container\n\nLet's say you have a `vpn` container defined as above, then add `network_mode` option to your other containers:\n```yml\n\tdepends_on:\n\t  - vpn\n\tnetwork_mode: \"service:vpn\"\n```\n\nKeep in mind that `networks`, `extra_hosts`, etc. and `network_mode` are mutually exclusive!\n\n# Configure proxy\n\nThe container is connected via _openconnect_ and now you can configure your browser\nand other software to use one of the proxies (3306 for http/https).\n\nFor example FoxyProxy (available for Firefox, Chrome) is a suitable browser extension.\n\nYou may also set environment variables:\n```bash\nexport http_proxy=\"http://127.0.0.1:3306/\"\nexport https_proxy=\"http://127.0.0.1:3306/\"\n```\ncomposer, git (if you don't use the git+ssh protocol, see below) and others use these.\n\n# Build\n\nYou can build the container yourself with\n```bash\ndocker build -f build/Dockerfile -t alimaster/openconnect-squid-proxy:custom ./build\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-master%2Fdocker-anyconnect-squid-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali-master%2Fdocker-anyconnect-squid-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-master%2Fdocker-anyconnect-squid-proxy/lists"}