{"id":26198371,"url":"https://github.com/path-network/udp-clone","last_synced_at":"2025-04-15T04:45:22.901Z","repository":{"id":49831633,"uuid":"517768182","full_name":"path-network/UDP-Clone","owner":"path-network","description":"A tiny high-performance UDP proxy that can forward traffic to one or more endpoints.","archived":false,"fork":false,"pushed_at":"2022-07-26T12:30:10.000Z","size":15,"stargazers_count":20,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T04:44:51.814Z","etag":null,"topics":["ipfix","netflow-v5","netflow-v9","proxy","sflow","udp","udp-clone"],"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/path-network.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":"2022-07-25T17:55:22.000Z","updated_at":"2025-04-11T08:58:51.000Z","dependencies_parsed_at":"2022-09-15T15:02:44.559Z","dependency_job_id":null,"html_url":"https://github.com/path-network/UDP-Clone","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/path-network%2FUDP-Clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/path-network%2FUDP-Clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/path-network%2FUDP-Clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/path-network%2FUDP-Clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/path-network","download_url":"https://codeload.github.com/path-network/UDP-Clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010190,"owners_count":21197797,"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":["ipfix","netflow-v5","netflow-v9","proxy","sflow","udp","udp-clone"],"created_at":"2025-03-12T02:52:01.486Z","updated_at":"2025-04-15T04:45:22.863Z","avatar_url":"https://github.com/path-network.png","language":"Go","readme":"# UDP Clone\n\nA tiny high performace UDP proxy that can foward any generic UDP traffic to one or more endpoints.\n\n## Why?\n\nWe needed a way to take a stream of NetFlow/IPFIX/sFlow and send it to multiple endpoints(Prod and Testing). \n\n## Usage\n\n### Docker Compose\n\nThis project is meant to managed via single docker compose. Endpoints can easily be modified in the `docker-compose.yml` and safely reloaded by running `./up.sh`\n\n```\njustin@ops1:~/udp-clone$ ./up.sh \n[+] Building 15.5s (20/30)                                                                                                                \n =\u003e [udp-clone_netflow5 internal] load build definition from Dockerfile                                                              0.1s\n =\u003e =\u003e transferring dockerfile: 284B                                                                                                 0.0s\n =\u003e [udp-clone_netflow9 internal] load build definition from Dockerfile                                                              0.1s\n =\u003e =\u003e transferring dockerfile: 284B                                                                                                 0.0s\n =\u003e [udp-clone_sflow internal] load build definition from Dockerfile                                                                 0.1s\n =\u003e =\u003e transferring dockerfile: 284B                                                                                                 0.0s\n =\u003e [udp-clone_netflow5 internal] load .dockerignore                                                                                 0.1s\n =\u003e =\u003e transferring context: 2B                                                                                                      0.0s\n =\u003e [udp-clone_sflow internal] load .dockerignore                                                                                    0.1s\n =\u003e =\u003e transferring context: 2B                                                                                                      0.0s\n =\u003e [udp-clone_netflow9 internal] load .dockerignore                                                                                 0.1s\n =\u003e =\u003e transferring context: 2B                                                                                                      0.0s\n =\u003e [udp-clone_netflow9 internal] load metadata for docker.io/library/ubuntu:latest                                                  0.0s\n =\u003e [udp-clone_netflow9 internal] load metadata for docker.io/library/golang:1.18-bullseye                                           5.0s\n =\u003e CACHED [udp-clone_netflow5 stage-1 1/2] FROM docker.io/library/ubuntu:latest                                                     0.0s\n =\u003e [udp-clone_sflow build-img 1/6] FROM docker.io/library/golang:1.18-bullseye@sha256:db42e4bb1a7f32da1ec430906769dbbabe9f1868bd41  6.0s\n =\u003e =\u003e resolve docker.io/library/golang:1.18-bullseye@sha256:db42e4bb1a7f32da1ec430906769dbbabe9f1868bd4170751e4923f1b8948a45        0.1s\n =\u003e =\u003e sha256:e604223835ccf02d097187b5a58ca73e8598cadbb16a36202ca1943e97f56f1f 10.88MB / 10.88MB                                     0.5s\n =\u003e =\u003e sha256:db42e4bb1a7f32da1ec430906769dbbabe9f1868bd4170751e4923f1b8948a45 1.86kB / 1.86kB                                       0.0s\n =\u003e =\u003e sha256:bf168a6748997eb97b48cc86234b7ff7d8bc907645b9be99013158b3f146b272 5.16MB / 5.16MB                                       0.3s\n =\u003e =\u003e sha256:5417b4917fa7ed3ad2678a3ce6378a00c95bfd430c2ffa39936fce55130b5f2c 1.80kB / 1.80kB                                       0.0s\n =\u003e =\u003e sha256:76199a964a3fc66e31bda713381e92285f479fe8e3d4514a473f95ffc2062440 7.10kB / 7.10kB                                       0.0s\n =\u003e =\u003e sha256:e756f3fdd6a378aa16205b0f75d178b7532b110e86be7659004fc6a21183226c 55.01MB / 55.01MB                                     0.7s\n =\u003e =\u003e sha256:6d5c91c4cd86dde23108ab3af91e9eae838d0059a380ee7dfd4f370b6d985523 54.58MB / 54.58MB                                     0.8s\n =\u003e =\u003e sha256:93c221c34e03cb2bc3c5cb0e1fcf029b793cfe2c10362287dd05270d80333db9 85.87MB / 85.87MB                                     1.0s\n =\u003e =\u003e extracting sha256:e756f3fdd6a378aa16205b0f75d178b7532b110e86be7659004fc6a21183226c                                            0.6s\n =\u003e =\u003e sha256:399edca3a0ef467dadd57f6ed1ee48c7b64162ca25d1fae2940680b749c722a9 141.75MB / 141.75MB                                   1.4s\n =\u003e =\u003e sha256:00fc5c011105d0ac8b5453886bb3b836c81260e1d016938a1207d48da8f28718 155B / 155B                                           0.9s\n =\u003e =\u003e extracting sha256:bf168a6748997eb97b48cc86234b7ff7d8bc907645b9be99013158b3f146b272                                            0.1s\n =\u003e =\u003e extracting sha256:e604223835ccf02d097187b5a58ca73e8598cadbb16a36202ca1943e97f56f1f                                            0.1s\n =\u003e =\u003e extracting sha256:6d5c91c4cd86dde23108ab3af91e9eae838d0059a380ee7dfd4f370b6d985523                                            0.6s\n =\u003e =\u003e extracting sha256:93c221c34e03cb2bc3c5cb0e1fcf029b793cfe2c10362287dd05270d80333db9                                            0.8s\n =\u003e =\u003e extracting sha256:399edca3a0ef467dadd57f6ed1ee48c7b64162ca25d1fae2940680b749c722a9                                            1.7s\n =\u003e =\u003e extracting sha256:00fc5c011105d0ac8b5453886bb3b836c81260e1d016938a1207d48da8f28718                                            0.0s\n =\u003e [udp-clone_netflow9 internal] load build context                                                                                 0.2s\n =\u003e =\u003e transferring context: 4.59MB                                                                                                  0.1s\n =\u003e [udp-clone_netflow5 internal] load build context                                                                                 0.2s\n =\u003e =\u003e transferring context: 4.59MB                                                                                                  0.1s\n =\u003e [udp-clone_sflow internal] load build context                                                                                    0.2s\n =\u003e =\u003e transferring context: 4.59MB                                                                                                  0.1s\n =\u003e [udp-clone_sflow build-img 2/6] WORKDIR /go/src/app                                                                              0.6s\n =\u003e [udp-clone_netflow9 build-img 3/6] COPY go.mod go.sum ./                                                                         0.1s\n =\u003e [udp-clone_netflow9 build-img 4/6] RUN go mod download                                                                           0.7s\n =\u003e [udp-clone_netflow9 build-img 5/6] COPY . .                                                                                      0.1s\n =\u003e [udp-clone_netflow9 build-img 6/6] RUN go build                                                                                  2.4s\n =\u003e [udp-clone_netflow9 stage-1 2/2] COPY --from=build-img /go/src/app/udp-clone /bin/udp-clone                                      0.1s\n =\u003e [udp-clone_netflow5] exporting to image                                                                                          0.3s\n =\u003e =\u003e exporting layers                                                                                                              0.1s\n =\u003e =\u003e writing image sha256:34530238bc121bc2c8a8daa2bbedc48ef36ccdca90f31a81cd4e510d27ad455f                                         0.0s\n =\u003e =\u003e naming to docker.io/library/udp-clone_netflow9                                                                                0.0s\n =\u003e =\u003e naming to docker.io/library/udp-clone_sflow                                                                                   0.0s\n =\u003e =\u003e naming to docker.io/library/udp-clone_netflow5                                                                                0.0s\n\nUse 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them\n[+] Running 4/4\n _ Network udp-clone_default     Created                                                                                             0.1s\n _ Container udp-clone-netflow9  Started                                                                                             0.9s\n _ Container udp-clone-sflow     Started                                                                                             0.8s\n _ Container udp-clone-netflow5  Started                                                                                             0.7s\n\n```\n\n\n### Direct\n\nTo run this project directly, build it manually using `go build`. \n\n```\n❯ ./udp-clone --listen-port=9500 --forward=192.0.2.1 --forward=198.51.100.5:9100\n\n{\"level\":\"info\",\"message\":\"Server started\",\"ip\":\"0.0.0.0\",\"port\":9500}\n{\"level\":\"info\",\"message\":\"Forwarding target configured\",\"num\":1,\"total\":2,\"addr\":\"192.0.2.1:9500\"}\n{\"level\":\"info\",\"message\":\"Forwarding target configured\",\"num\":2,\"total\":2,\"addr\":\"198.51.100.5:9100\"}\n```\n\nThe above command will:\n\n- Start a UDP server listening on `0.0.0.0` 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## Configuration\n\n```\nusage: udp-clone [\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=port     Port to listen on\n  --body-size=10000      Size of body to read\n  --forward=ip:port ...  ip:port to forward traffic to (port defaults to listen-port)\n  --routines=10          Set the number of listeners per port\n```\n\n## Copyright\n\n2022 Path Network \n\nWritten By: Justin Timperio\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpath-network%2Fudp-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpath-network%2Fudp-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpath-network%2Fudp-clone/lists"}