{"id":24461090,"url":"https://github.com/thehxdev/tun2socks-vpn","last_synced_at":"2025-07-09T16:13:06.301Z","repository":{"id":270009844,"uuid":"909124470","full_name":"thehxdev/tun2socks-vpn","owner":"thehxdev","description":"Simple bash script to route all the traffic through a socks5 proxy with tun2socks","archived":false,"fork":false,"pushed_at":"2025-07-02T09:57:07.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T10:48:55.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thehxdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-27T19:46:02.000Z","updated_at":"2025-07-02T09:57:11.000Z","dependencies_parsed_at":"2025-07-02T10:32:33.590Z","dependency_job_id":"8979f051-1a6f-4ad1-8bf9-a33b9c180301","html_url":"https://github.com/thehxdev/tun2socks-vpn","commit_stats":null,"previous_names":["thehxdev/tun2socks-vpn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thehxdev/tun2socks-vpn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehxdev%2Ftun2socks-vpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehxdev%2Ftun2socks-vpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehxdev%2Ftun2socks-vpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehxdev%2Ftun2socks-vpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thehxdev","download_url":"https://codeload.github.com/thehxdev/tun2socks-vpn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehxdev%2Ftun2socks-vpn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264492785,"owners_count":23617051,"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":[],"created_at":"2025-01-21T04:17:45.891Z","updated_at":"2025-07-09T16:13:06.272Z","avatar_url":"https://github.com/thehxdev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tun2socks VPN\nA simple Bash script to configure and run [tun2socks](https://github.com/xjasonlyu/tun2socks) on your Linux machine for\ncreating a VPN tunnel that routes all of your traffic to a socks5 proxy.\n\nThis script can be used with [Xray-Core](https://github.com/xtls/xray-core) or other proxy/tunneling solutions that does not\nsupport VPN-Mode for routing and tunneling all of your traffic.\n\n\u003e [!WARNING]\n\u003e This software uses `systemd-run` command. It will not work on non-systemd systems.\n\n## Install\nFirst of all install [tun2socks](https://github.com/xjasonlyu/tun2socks). **It MUST be in your PATH.**\nThen you can just put `vpn-mode` file in `/usr/local/bin` and use it. The command below will do this for you:\n```bash\nsudo curl -L -o '/usr/local/bin/vpn-mode' 'https://raw.githubusercontent.com/thehxdev/tun2socks-vpn/refs/heads/main/vpn-mode'\nsudo chmod +x /usr/local/bin/vpn-mode\n```\nThen you need a config file. You can find an example config in [vpn-config](vpn-config). Download the config file:\n```bash\ncurl -L -o \"$HOME/vpn-config\" 'https://raw.githubusercontent.com/thehxdev/tun2socks-vpn/refs/heads/main/vpn-config'\n```\n\nEdit the config to fit your environment:\n```bash\n# Your VPN server public IP address\n# example: '10.10.10.1'\nCONFIG_EXTERNAL_SERVER_IP=''\n\n# List of IP CIDRs that you want to exclude\n# example: ('192.168.1.0/24' '10.10.0.0/16')\nCONFIG_EXCLUDE_CIDRS=()\n\n# Your Socks5 proxy server\nCONFIG_PROXY='socks5://127.0.0.1:10808'\n```\n\n## Run\nThere are only two commands (Must be run as root):\n```bash\n# Running tun2socks\nsudo vpn-mode run $HOME/vpn-config\n\n# Kill tun2socks and cleanup everything\nsudo vpn-mode kill\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehxdev%2Ftun2socks-vpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthehxdev%2Ftun2socks-vpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehxdev%2Ftun2socks-vpn/lists"}