{"id":13826271,"url":"https://github.com/dsnet/udptunnel","last_synced_at":"2025-03-17T07:32:38.381Z","repository":{"id":57524633,"uuid":"88584217","full_name":"dsnet/udptunnel","owner":"dsnet","description":"Daemon for creating a simple VPN over UDP.","archived":false,"fork":false,"pushed_at":"2019-05-31T21:28:12.000Z","size":41,"stargazers_count":176,"open_issues_count":6,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-16T09:51:40.976Z","etag":null,"topics":["nat","networking","tunnel","udp","vpn"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-18T05:10:16.000Z","updated_at":"2025-03-04T12:46:58.000Z","dependencies_parsed_at":"2022-09-26T18:11:49.752Z","dependency_job_id":null,"html_url":"https://github.com/dsnet/udptunnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fudptunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fudptunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fudptunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsnet%2Fudptunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsnet","download_url":"https://codeload.github.com/dsnet/udptunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243992569,"owners_count":20380230,"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":["nat","networking","tunnel","udp","vpn"],"created_at":"2024-08-04T09:01:34.882Z","updated_at":"2025-03-17T07:32:38.121Z","avatar_url":"https://github.com/dsnet.png","language":"Go","funding_links":[],"categories":["\u003ca id=\"d62a971d37c69db9f3b9187318c3921a\"\u003e\u003c/a\u003e工具","Go"],"sub_categories":["\u003ca id=\"8ea8f890cf767c3801b5e7951fca3570\"\u003e\u003c/a\u003e公网访问局域网"],"readme":"# UDP virtual private tunnel daemon #\n\n## Introduction ##\n\nThis repository contains a simple implementation of a point-to-point virtual\nprivate network by opening a TUN device and transferring raw traffic over UDP.\nThis VPN was designed to create a tunnel between two hosts:\n1. A client host operating behind an obtrusive NAT which drops TCP connections\nfrequently, but happens to pass UDP traffic reliably.\n2. A server host that is internet-accessible.\n\nTUN traffic is sent ad-verbatim between the two endpoints via unencrypted\nUDP packets. Thus, this should only be used if a more secure protocol\n(like SSH; see [github.com/dsnet/sshtunnel](https://github.com/dsnet/sshtunnel))\nis running on top of this VPN. In order to prevent attackers from connecting to\nother locally binded sockets on the endpoints, a simple port filter is built-in\nto restrict IP traffic to only the specified ports. Users of udptunnel should\nalso setup iptable rules as a secondary measure to restrict malicious traffic.\n\nThis only supports Linux.\n\n## Usage ##\n\nBuild the daemon:\n\n```go get -u github.com/dsnet/udptunnel```\n\nCreate a server configuration file:\n\n```javascript\n{\n\t\"TunnelAddress\": \"10.0.0.1\",\n\t\"NetworkAddress\": \":8000\",\n\t\"AllowedPorts\": [22],\n}\n```\n\nThe `NetworkAddress` with an empty host indicates that the daemon is operating\nin server mode.\n\nCreate a client configuration file:\n\n```javascript\n{\n\t\"TunnelAddress\": \"10.0.0.2\",\n\t\"NetworkAddress\": \"server.example.com:8000\",\n\t\"AllowedPorts\": [22],\n}\n```\n\nThe host `server.example.com` is assumed to resolve to some address where the\nclient can reach the server.\n\nStart the daemon on both the client and server (assuming `$GOPATH/bin` is in your `$PATH`):\n\n```\nroot@server.example.com $ udptunnel /path/to/config.json\nroot@client.example.com $ udptunnel /path/to/config.json\n```\n\nTry accessing the other endpoint (example is for client to server):\n\n```\nuser@client.example.com $ ping 10.0.0.1\nPING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.\n64 bytes from 10.0.0.1: icmp_req=1 ttl=64 time=56.7 ms\n64 bytes from 10.0.0.1: icmp_req=2 ttl=64 time=58.7 ms\n64 bytes from 10.0.0.1: icmp_req=3 ttl=64 time=50.1 ms\n64 bytes from 10.0.0.1: icmp_req=4 ttl=64 time=51.6 ms\n\n\nuser@client.example.com $ nmap 10.0.0.1\nHost is up (0.063s latency).\nPORT   STATE SERVICE\n22/tcp open  ssh\n\n\nuser@client.example.com $ ssh 10.0.0.1\nPassword: ...\n```\n\nThe above example shows the client trying to communicate with the server,\nwhich is addressable at `10.0.0.1`. The example commands can be done from the\nserver by dialing the client at `10.0.0.2`, instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsnet%2Fudptunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsnet%2Fudptunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsnet%2Fudptunnel/lists"}