This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // udprelay.go | |
| // A small UDP relay/proxy that lets LAN clients discover & talk to a server | |
| // reachable only via a routed overlay (e.g., Tailscale 100.x). It listens on | |
| // specified UDP ports on 0.0.0.0, accepts packets from a LAN CIDR, forwards | |
| // them to a fixed upstream server address, and relays replies back to the | |
| // original client. Works for broadcast discovery (27016) and follow-up traffic | |
| // (e.g., 8766, 9700). | |
| // | |
| // go run udprelay.go -lan-cidr 10.0.0.0/24 -server 100.74.146.12 -ports 27016,8766,9700 | |
| // |