{"id":13437398,"url":"https://github.com/kizzx2/docker-openvpn-client-socks","last_synced_at":"2025-03-19T06:31:09.623Z","repository":{"id":47375941,"uuid":"52610016","full_name":"kizzx2/docker-openvpn-client-socks","owner":"kizzx2","description":"Expose an OpenVPN tunnel as a SOCKS proxy","archived":false,"fork":true,"pushed_at":"2024-04-04T09:18:45.000Z","size":6,"stargazers_count":140,"open_issues_count":1,"forks_count":71,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-27T21:51:30.603Z","etag":null,"topics":["docker","openvpn","opsec","privacy","proxy"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/kizzx2/openvpn-client-socks","language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mook/docker-openvpn-client-socks","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kizzx2.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}},"created_at":"2016-02-26T14:33:02.000Z","updated_at":"2024-10-27T09:30:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kizzx2/docker-openvpn-client-socks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kizzx2%2Fdocker-openvpn-client-socks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kizzx2%2Fdocker-openvpn-client-socks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kizzx2%2Fdocker-openvpn-client-socks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kizzx2%2Fdocker-openvpn-client-socks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kizzx2","download_url":"https://codeload.github.com/kizzx2/docker-openvpn-client-socks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244371020,"owners_count":20442326,"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":["docker","openvpn","opsec","privacy","proxy"],"created_at":"2024-07-31T03:00:56.652Z","updated_at":"2025-03-19T06:31:08.065Z","avatar_url":"https://github.com/kizzx2.png","language":"Dockerfile","funding_links":[],"categories":["HarmonyOS","\u003ca id=\"d62a971d37c69db9f3b9187318c3921a\"\u003e\u003c/a\u003e工具"],"sub_categories":["Windows Manager","\u003ca id=\"8ea8f890cf767c3801b5e7951fca3570\"\u003e\u003c/a\u003e公网访问局域网"],"readme":"# OpenVPN-client\n\nThis is a docker image of an OpenVPN client tied to a SOCKS proxy server.  It is\nuseful to isolate network changes (so the host is not affected by the modified\nrouting).\n\nThis supports directory style (where the certificates are not bundled together in one `.ovpn` file) and those that contains `update-resolv-conf`\n\n(For the same thing in WireGuard, see [kizzx2/docker-wireguard-socks-proxy](https://github.com/kizzx2/docker-wireguard-socks-proxy))\n\n## Why?\n\nThis is arguably the easiest way to achieve \"app based\" routing. For example, you may only want certain applications to go through your WireGuard tunnel while the rest of your system should go through the default gateway. You can also achieve \"domain name based\" routing by using a [PAC file](https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file) that most browsers support.\n\n## Usage\n\nPreferably, using `start` in this repository:\n```bash\nstart /your/openvpn/directory\n```\n\n`/your/openvpn/directory` should contain *one* OpenVPN `.conf` file. It can reference other certificate files or key files in the same directory.\n\nAlternatively, using `docker run` directly:\n\n```bash\ndocker run -it --rm --device=/dev/net/tun --cap-add=NET_ADMIN \\\n    --name openvpn-client \\\n    --volume /your/openvpn/directory/:/etc/openvpn/:ro -p 1080:1080 \\\n    kizzx2/openvpn-client-socks\n```\n\nThen connect to SOCKS proxy through through `localhost:1080` / `local.docker:1080`. For example:\n\n```bash\ncurl --proxy socks5h://local.docker:1080 ipinfo.io\n```\n\n## Solutions to Common Problems\n\n### I'm getting `RTNETLINK answers: Permission denied`\n\nTry adding `--sysctl net.ipv6.conf.all.disable_ipv6=0` to your docker command\n\n### DNS doesn't work\n\nYou can put a `update-resolv-conf` as your `up` script. One simple way is to put [this file](https://gist.github.com/Ikke/3829134) as `up.sh` inside your OpenVPN configuration directory.\n\n## HTTP Proxy\n\nYou can easily convert this to an HTTP proxy using [http-proxy-to-socks](https://github.com/oyyd/http-proxy-to-socks), e.g.\n\n```bash\nhpts -s 127.0.0.1:1080 -p 8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkizzx2%2Fdocker-openvpn-client-socks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkizzx2%2Fdocker-openvpn-client-socks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkizzx2%2Fdocker-openvpn-client-socks/lists"}