{"id":50145017,"url":"https://github.com/cachebag/wgbridge","last_synced_at":"2026-05-24T03:34:02.065Z","repository":{"id":358523343,"uuid":"1241729583","full_name":"cachebag/wgbridge","owner":"cachebag","description":"Transparent WireGuard gateway for Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2026-05-17T18:51:43.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-24T03:33:56.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/cachebag.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T18:40:13.000Z","updated_at":"2026-05-17T18:51:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cachebag/wgbridge","commit_stats":null,"previous_names":["cachebag/wgbridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cachebag/wgbridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Fwgbridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Fwgbridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Fwgbridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Fwgbridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cachebag","download_url":"https://codeload.github.com/cachebag/wgbridge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Fwgbridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33420660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","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":[],"created_at":"2026-05-24T03:34:01.540Z","updated_at":"2026-05-24T03:34:02.049Z","avatar_url":"https://github.com/cachebag.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wgbridge\n\nTransparent WireGuard gateway for Raspberry Pi.\n\nMy father-in-law bought this TV box when he was back home in Mexico, but of course in the US, none of the content is accessible.\n\n\u003cimg width=\"5712\" height=\"4284\" alt=\"XUPER\" src=\"https://github.com/user-attachments/assets/db71fdf0-80e4-48c1-9750-91e2ae772eee\" /\u003e\n\n\n`wgbridge` is a transparent WireGuard gateway for Raspberry Pi. Helps our case out pretty well.\n\nIt turns out that this can work pretty well for other IPTV boxes, streaming appliances, smart TVs, game consoles, and similar hardware.\n\nAll NM stuff is handled using [nmrs](https://github.com/networkmanager-rs/nmrs).\n\n## Architecture\n\nIt's quite simple:\n\n```text\nDevice -\u003e Raspberry Pi -\u003e WireGuard tunnel -\u003e VPS -\u003e Internet\n```\n\nExample:\n\n```text\nGoogle TV Box -\u003e Pi 5 -\u003e VPS in Mexico City -\u003e Mexican IP\n```\n\n## Requirements\n\n* Raspberry Pi running Linux\n* NetworkManager\n* WireGuard\n* Rust toolchain\n* A VPS or WireGuard endpoint\n\nThis is currently tested on _my_ specific use case, so YMMV:\n\n* Raspberry Pi 5\n* Arch Linux ARM\n* Ubuntu VPS\n\n## Installation\n\nClone the repository:\n\n```bash\ngit clone git@github.com:cachebag/wgbridge.git\ncd wgbridge\n```\n\nBuild:\n\n```bash\ncargo build --release\n```\n\nBinary:\n\n```bash\n./target/release/wgbridge\n```\n\nor you can probably do:\n\n```bash\ncargo install --path .\n```\n\nand you can get `wgbridge` globally.\n\n## Quick Start\n\nInitial setup:\n\n```bash\nwgbridge setup \\\n  --wifi-ssid \"MyWiFi\" \\\n  --wifi-password \"password\" \\\n  --private-key \"\u003cclient-private-key\u003e\" \\\n  --address \"10.0.0.2/24\" \\\n  --peer-public-key \"\u003cserver-public-key\u003e\" \\\n  --peer-endpoint \"1.2.3.4:51820\"\n```\n\nBring gateway online:\n\n```bash\nwgbridge up\n```\n\nCheck status:\n\n```bash\nwgbridge status\n```\n\nUpdate Wi-Fi only:\n\n```bash\nwgbridge wifi \\\n  --ssid \"NewWiFi\" \\\n  --password \"NewPassword\"\n```\n\n## Policy Routing\n\nTypical deployment:\n\n```bash\nip rule add from 192.168.1.118/32 lookup 52299\n```\n\nThis routes only the selected device through the WireGuard tunnel while keeping normal Pi traffic local.\n\n## Systemd\n\nExample service:\n\n```ini\n[Unit]\nDescription=wgbridge startup\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=oneshot\nExecStart=/usr/local/bin/wgbridge up\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Roadmap \n\nI am most definitely going to abandon this project. But if I don't, I think it would be cool to add this stuff:\n\n* Automatic LAN interface detection\n* Automatic policy-route management\n* DNS leak prevention\n* DHCP mode\n* IPv6 support\n* Web UI\n* Multiple device profiles\n* Containerized deployment\n* Travel-router mode\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachebag%2Fwgbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcachebag%2Fwgbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachebag%2Fwgbridge/lists"}