{"id":16703504,"url":"https://github.com/kwakubiney/safehaven","last_synced_at":"2025-04-09T06:13:19.720Z","repository":{"id":179572597,"uuid":"663537462","full_name":"kwakubiney/safehaven","owner":"kwakubiney","description":"Proof of concept for a VPN over UDP","archived":false,"fork":false,"pushed_at":"2025-03-10T13:39:02.000Z","size":26,"stargazers_count":117,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:15:01.445Z","etag":null,"topics":["linux","networking","tunnel","udp"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kwakubiney.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}},"created_at":"2023-07-07T14:23:18.000Z","updated_at":"2025-03-21T16:06:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"b05debbb-a9d4-4255-89b6-3821a04a4edd","html_url":"https://github.com/kwakubiney/safehaven","commit_stats":null,"previous_names":["kwakubiney/safehaven"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakubiney%2Fsafehaven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakubiney%2Fsafehaven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakubiney%2Fsafehaven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwakubiney%2Fsafehaven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwakubiney","download_url":"https://codeload.github.com/kwakubiney/safehaven/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["linux","networking","tunnel","udp"],"created_at":"2024-10-12T19:08:31.615Z","updated_at":"2025-04-09T06:13:19.704Z","avatar_url":"https://github.com/kwakubiney.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SafeHaven\n\n## Architecture\n![architecture](https://github.com/kwakubiney/safehaven/assets/71296367/7a637a3f-337d-4e44-a793-4aa01049d191)\n\n## How does it work?\nCheckout my blog [post](https://kwakubiney.github.io/posts/UDP-Tunneling-With-Safehaven/) for implementation details.\n\n## Demo\n[Click here to watch demo](https://www.youtube.com/watch?v=BJcXyx5ae1Ac)\n\n## How to use?\n### Basic Usage\nSafeHaven is only available on Linux.\n\n```sh\nUsage:\n  -d string\n        private network destination (default \"10.108.0.2\")\n  -g    global\n        routes all traffic to tunnel server\n  -l string\n        local address\n  -s string\n        remote server address (default \"138.197.32.138\")\n  -srv\n        server mode\n  -tc string\n        client tun device ip (default \"192.168.1.100/24\")\n  -tname string\n        tunname (default \"tun0\")\n  -ts string\n        server tun device ip (default \"192.168.1.102/24\")\n  -wg string\n        path to WireGuard configuration file (JSON)\n```\n\n### WireGuard Encryption Support\nSafeHaven now supports an optional WireGuard encryption layer. To enable it, pass the `-wg` flag with the path to a WireGuard configuration JSON file.\n\n#### Example Command:\n```sh\nsafehaven -tc 192.168.1.100/24 -ts 192.168.1.102/24 -s 138.197.32.138:3000 -l 3000 -wg /path/to/wg-config.json\n```\n\n#### WireGuard Configuration File Format:\nThe JSON configuration file should have the following structure:\n\n```json\n{\n  \"client_private_key\": \"YOUR_CLIENT_PRIVATE_KEY\",\n  \"client_public_key\": \"YOUR_CLIENT_PUBLIC_KEY\",\n  \"server_private_key\": \"YOUR_SERVER_PRIVATE_KEY\",\n  \"server_public_key\": \"YOUR_SERVER_PUBLIC_KEY\",\n  \"server_allowed_ips\": \"IPS_YOU_WANT_TO_ALLOW_INTO_SERVER\"\n}\n```\n\n### Steps to Run:\n1. **Build the project**\n2. **Run on the client** with the appropriate flags, including `-wg` if using WireGuard.\n3. **Run on the server** in `server mode`:\n   ```sh\n   safehaven -srv -tc 192.168.1.102/24 -ts 192.168.1.100/24 -wg /path/to/wg-config.json\n   ```\n4. **Enable IP forwarding** on the server:\n   ```sh\n   sysctl -w net.ipv4.ip_forward=1\n   ```\n\n**NB**: Your server must know how to reach the private network, otherwise packets will be lost in transit.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwakubiney%2Fsafehaven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwakubiney%2Fsafehaven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwakubiney%2Fsafehaven/lists"}