{"id":13908528,"url":"https://github.com/thomseddon/udp-replicator","last_synced_at":"2025-05-09T01:45:56.769Z","repository":{"id":42124829,"uuid":"210378748","full_name":"thomseddon/udp-replicator","owner":"thomseddon","description":"A tiny UDP proxy that can replicate traffic to one or more endpoints.","archived":false,"fork":false,"pushed_at":"2024-04-17T08:20:13.000Z","size":7,"stargazers_count":53,"open_issues_count":6,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-09T01:45:50.776Z","etag":null,"topics":["go","golang","udp","udp-proxy","udp-redirect","udp-relay","udp-server"],"latest_commit_sha":null,"homepage":null,"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/thomseddon.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":"2019-09-23T14:38:57.000Z","updated_at":"2025-05-01T23:37:15.000Z","dependencies_parsed_at":"2022-08-12T07:20:08.736Z","dependency_job_id":null,"html_url":"https://github.com/thomseddon/udp-replicator","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/thomseddon%2Fudp-replicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomseddon%2Fudp-replicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomseddon%2Fudp-replicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomseddon%2Fudp-replicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomseddon","download_url":"https://codeload.github.com/thomseddon/udp-replicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176445,"owners_count":21866142,"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":["go","golang","udp","udp-proxy","udp-redirect","udp-relay","udp-server"],"created_at":"2024-08-06T23:02:47.795Z","updated_at":"2025-05-09T01:45:56.738Z","avatar_url":"https://github.com/thomseddon.png","language":"Go","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\n# UDP Replicator [![Go Report Card](https://goreportcard.com/badge/github.com/thomseddon/udp-replicator)](https://goreportcard.com/report/github.com/thomseddon/udp-replicator)\n\nA tiny UDP proxy that can replicate traffic to one or more endpoints.\n\n## Why?\n\nWe needed a way to take a single netflow stream and send it to multiple endpoints. As this is a generic UDP replicator, it can be used for any traffic such as netflow, syslog etc.\n\nYou could use iptables, [like Zapier](https://zapier.com/engineering/iptables-replication/), but we wanted something we could easily deploy into our kubernetes cluster. There are also a number of existing UDP proxies, but non of the popular ones support replication. There are also a small number of replicators, but these all seem to be mostly unmaintained/untested toy projects with little documentation.\n\n## Usage\n\n### Direct\n\n```\n./replicator --listen-port=9500 --forward=192.0.2.1 --forward=198.51.100.5:9100\ntime=\"2019-09-23T14:29:50+01:00\" level=info msg=\"Server started\" ip=0.0.0.0 port=9500\ntime=\"2019-09-23T14:29:50+01:00\" level=info msg=\"Forwarding target configured\" addr=\"192.0.2.1:9500\" num=1 total=2\ntime=\"2019-09-23T14:29:50+01:00\" level=info msg=\"Forwarding target configured\" addr=\"198.51.100.5:9100\" num=2 total=2\n```\n\nThe above command will:\n\n- Start a UDP server listening on `0.0.0.0` (the default) port `9500`\n- Add a forward target of `192.0.2.1:9500` (uses `listen-port` for destination port as not specified in configuration)\n- Add another forward target of `198.51.100.5:9100`\n\nThe server will start listening on `0.0.0.0:9500`, any packet it receives will be replicated and sent to both `192.0.2.1:9500` and `198.51.100.5:9100`\n\n\n### Docker\n\n```\ndocker run -e FORWARDS=$'192.0.2.1\\n198.51.100.5:9100' thomseddon/udp-replicator:1\n```\n\n### Docker Compose\n\n```\nversion: '3'\n\nservices:\n  udp-replicator:\n    run: thomseddon/udp-replicator:1\n    environment:\n      DEBUG: \"true\"\n      FORWARD: \"192.0.2.1\\n198.51.100.5:9100\"\n```\n\n\n## Configuration\n\n```\nusage: replicator [\u003cflags\u003e]\n\nFlags:\n  --help                 Show context-sensitive help (also try --help-long and --help-man).\n  --debug                Enable debug mode\n  --listen-ip=0.0.0.0    IP to listen in\n  --listen-port=9000     Port to listen on\n  --body-size=4096       Size of body to read\n  --forward=ip:port ...  ip:port to forward traffic to (port defaults to listen-port)\n```\n\nAll configuration params can be passed as arguments as shown above, or as environment varaibles (as shown in usage above) - where environment variables are uppercased snake case e.g. `LISTEN_IP`\n\n## Copyright\n\n2019 Thom Seddon\n\n## License\n\n[MIT](https://github.com/thomseddon/udp-replicator/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomseddon%2Fudp-replicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomseddon%2Fudp-replicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomseddon%2Fudp-replicator/lists"}