{"id":25655243,"url":"https://github.com/hugow04/vpn","last_synced_at":"2025-07-22T23:02:21.768Z","repository":{"id":237434177,"uuid":"616031402","full_name":"HUGOW04/vpn","owner":"HUGOW04","description":"VPN (Virtual private network) for MacOS and Linux","archived":false,"fork":false,"pushed_at":"2023-03-19T12:35:50.000Z","size":26,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T21:33:33.569Z","etag":null,"topics":["cryptography","tcp","udp","virtual-private-network","vpn","vpn-client","vpn-server"],"latest_commit_sha":null,"homepage":"","language":"C","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/HUGOW04.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-03-19T12:21:06.000Z","updated_at":"2024-10-20T19:12:28.000Z","dependencies_parsed_at":"2024-05-01T19:27:40.082Z","dependency_job_id":"ce4ef1e5-8817-4ea6-b6b6-19d8a8e02ee6","html_url":"https://github.com/HUGOW04/vpn","commit_stats":null,"previous_names":["hugow04/vpn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HUGOW04/vpn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HUGOW04%2Fvpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HUGOW04%2Fvpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HUGOW04%2Fvpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HUGOW04%2Fvpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HUGOW04","download_url":"https://codeload.github.com/HUGOW04/vpn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HUGOW04%2Fvpn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586839,"owners_count":23952195,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cryptography","tcp","udp","virtual-private-network","vpn","vpn-client","vpn-server"],"created_at":"2025-02-23T21:28:30.329Z","updated_at":"2025-07-22T23:02:21.718Z","avatar_url":"https://github.com/HUGOW04.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vpn\n\n## Compile\n```\nmake\n```\n\n## generate vpn.key\n```\ndd if=/dev/urandom of=vpn.key count=1 bs=32\n```\n\n## print vpn.key\n```\nbase64 \u003c vpn.key\necho 'HK940OkWcFqSmZXnCQ1w6jhQMZm0fZoEhQOOpzJ/l3w=' | base64 --decode \u003e vpn.key\n```\n\n## Example on how to use server\n```\nsudo ./vpn server vpn.key auto 1959\n```\n\n## Example on how to use client\n```\nsudo ./vpn client vpn.key 34.216.127.34 1959\n```\n\nYou are connected. Just hit `Ctrl`-`C` to disconnect.\n\n\n## A note on DNS\n\nIf you were previously using a DNS resolver only accessible from the local network, it won't be accessible through the VPN. That might be the only thing you may have to change. Use a public resolver, a local resolver, or DNSCrypt.\n\nOr send a pull request implementing the required commands to change and revert the DNS settings, or redirect DNS queries to another resolver, for all supported operating systems.\n\n## Advanced configuration\n\n```text\nvpn   \"server\"\n        \u003ckey file\u003e\n        \u003cvpn server ip or name\u003e|\"auto\"\n        \u003cvpn server port\u003e|\"auto\"\n        \u003ctun interface\u003e|\"auto\"\n        \u003clocal tun ip\u003e|\"auto\"\n        \u003cremote tun ip\u003e\"auto\"\n        \u003cexternal ip\u003e|\"auto\"\n\nvpn   \"client\"\n        \u003ckey file\u003e\n        \u003cvpn server ip or name\u003e\n        \u003cvpn server port\u003e|\"auto\"\n        \u003ctun interface\u003e|\"auto\"\n        \u003clocal tun ip\u003e|\"auto\"\n        \u003cremote tun ip\u003e|\"auto\"\n        \u003cgateway ip\u003e|\"auto\"\n```\n\n* `server`|`client`: use `server` on the server, and `client` on clients.\n* `\u003ckey file\u003e`: path to the file with the secret key (e.g. `vpn.key`).\n* `\u003cvpn server ip or name\u003e`: on the client, it should be the IP address or the hostname of the server. On the server, it doesn't matter, so you can just use `auto`.\n* `\u003cvpn server port\u003e`: the TCP port to listen to/connect to for the VPN. Use 443 or anything else. `auto` will use `443`.\n* `\u003ctun interface\u003e`: this is the name of the VPN interface. On Linux, you can set it to anything. Or macOS, it has to follow a more boring pattern. If you feel lazy, just use `auto` here.\n* `\u003clocal tun ip\u003e`: local IP address of the tunnel. Use any private IP address that you don't use here.\n* `\u003cremote tun ip\u003e`: remote IP address of the tunnel. See above. The local and remote tunnel IPs must the same on the client and on the server, just reversed. For some reason, I tend to pick `192.168.192.254` for the server, and `192.168.192.1` for the client. These values will be used if you put `auto` for the local and remote tunnel IPs.\n* `\u003cexternal ip\u003e` (server only): the external IP address of the server. Can be left to `\"auto\"`.\n* `\u003cgateway ip\u003e` (client only): the internal router IP address. The first line printed by `netstat -rn` will tell you (`gateway`).\n\nIf all the remaining parameters of a command would be `auto`, they don't have to be specified.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugow04%2Fvpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugow04%2Fvpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugow04%2Fvpn/lists"}