{"id":27160353,"url":"https://github.com/nagornin/wg-split","last_synced_at":"2026-05-14T13:42:14.551Z","repository":{"id":272279216,"uuid":"916044375","full_name":"nagornin/wg-split","owner":"nagornin","description":"WireGuard split tunneling on Linux.","archived":false,"fork":false,"pushed_at":"2025-01-29T07:58:56.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T08:29:55.952Z","etag":null,"topics":["split-tunneling","wireguard"],"latest_commit_sha":null,"homepage":"","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/nagornin.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-13T10:54:34.000Z","updated_at":"2025-01-29T07:58:59.000Z","dependencies_parsed_at":"2025-01-13T12:41:48.089Z","dependency_job_id":"0802e3bf-6d41-4b6e-81a7-8772fafe574a","html_url":"https://github.com/nagornin/wg-split","commit_stats":null,"previous_names":["nagornin/wg-split"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nagornin/wg-split","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagornin%2Fwg-split","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagornin%2Fwg-split/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagornin%2Fwg-split/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagornin%2Fwg-split/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nagornin","download_url":"https://codeload.github.com/nagornin/wg-split/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagornin%2Fwg-split/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33027776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["split-tunneling","wireguard"],"created_at":"2025-04-08T23:44:59.109Z","updated_at":"2026-05-14T13:42:14.514Z","avatar_url":"https://github.com/nagornin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wg-split\n\nThis is a series of scripts that allows you to:\n\n- Run a specific application/command through a WireGuard tunnel\n- Exclude an application from a WireGuard tunnel\n\n## Warning\n\nThe code is pretty hacky and probably has bugs, but it _works on my machine_. Notably, you have to set the `DNS` field in your WireGuard config for it to work properly. There's certainly a better way to do split tunneling on Linux.\n\n## Usage\n\nEdit `wgs-setup.sh` and specify a path to your WireGuard config file. After that, you can run `wgs-route.sh` with your command to route it through the tunnel. Alternatively, run `wgs-exclude.sh` to exclude a program from the tunnel.\n\nDo NOT run these scripts as root, they will prompt you for a password automatically.\n\n## How it works\n\n- `wgs-setup.sh` creates a new network namespace that only has the WireGuard interface in it.\n- `wgs-route.sh` executes a command in the network namespace that was set up by `wg-setup.sh`.\n- `wgs-exclude.sh` simply uses firejail to add all interfaces to a sandbox _except_ the WireGuard interface. This seems to work well enough.\n\n## Example\n\n```\n$ ./wgs-route.sh curl ifconfig.me\n\u003cVPN IP\u003e\n$ curl ifconfig.me\n\u003creal IP\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagornin%2Fwg-split","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagornin%2Fwg-split","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagornin%2Fwg-split/lists"}