{"id":23247155,"url":"https://github.com/evertras/cynomys","last_synced_at":"2025-08-20T05:32:28.406Z","repository":{"id":65451038,"uuid":"570765780","full_name":"Evertras/cynomys","owner":"Evertras","description":"A network diagnostic testing tool to ensure communication behaves as expected.","archived":false,"fork":false,"pushed_at":"2024-11-04T09:09:18.000Z","size":143,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-04T09:26:41.397Z","etag":null,"topics":[],"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/Evertras.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":"2022-11-26T03:49:54.000Z","updated_at":"2024-11-04T09:09:01.000Z","dependencies_parsed_at":"2024-02-02T08:42:57.109Z","dependency_job_id":null,"html_url":"https://github.com/Evertras/cynomys","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evertras%2Fcynomys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evertras%2Fcynomys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evertras%2Fcynomys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evertras%2Fcynomys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evertras","download_url":"https://codeload.github.com/Evertras/cynomys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394138,"owners_count":18218707,"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":[],"created_at":"2024-12-19T07:17:33.803Z","updated_at":"2024-12-19T07:17:34.484Z","avatar_url":"https://github.com/Evertras.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cynomys (cyn)\n\nA simple network diagnostic testing tool to ensure communication behaves as\nexpected.\n\nAvailable as a Docker image: `evertras/cynomys` ([Dockerhub link](https://hub.docker.com/r/evertras/cynomys))\n\nAvailable as native binaries: [on releases page](https://github.com/Evertras/cynomys/releases).\n\n## Why does this exist\n\nI got tired of setting up `nc -stuff` on multiple machines and manually trying\nto send data across to ensure a non-trivial network setup was working properly.\nThere was also a need to test broadcast/multicast, which got surprisingly weird\nwith multiple versions of `nc`.\n\nCynomys is intended to allow for simple network communication testing on a\nvariety of platforms with simple, consistent behavior.\n\n## Features\n\n### Current\n\nTest connectivity between different machines on with UDP to make sure\nthe machines can talk to each other as expected.\n\nTest broadcast/multicast (UDP).\n\nTest connectivity and communication with TCP.\n\nCustomizable interval to send data.\n\nUse in a Docker container for Docker-related networking, or just use the raw\nbinary for native level testing.\n\nOptional HTTP server that provides a simple landing page to show current\nstatus and configuration of the given `cyn` instance.\n\nMeasure RTT latency from senders to receivers.\n\n### Future\n\nThese will be converted to issues in the future, but some other ideas...\n\nTest that connectivity is NOT made between different machines that should not\ntalk to each other, for firewall/security reasons.\n\nAllow metric collection (Prometheus, etc).\n\nRealtime streaming updates for the HTML view.\n\n## How to install it\n\nBinaries are self-contained and available for most major platforms. Grab\n[a native binary from the releases page](https://github.com/Evertras/cynomys/releases).\n\nOr run with docker.\n\n```bash\ndocker run --rm -it evertras/cynomys --help\n```\n\n## How to use it\n\nFor simple use cases, just use command line args. By convention, lowercase\nmeans listen while uppercase means send.\n\n```bash\n# In this example:\n# Machine A is listening on UDP on :1234 and TCP on :5555. It sends UDP to B and C.\n# Machine B sends both UDP and TCP to Machine A, and UDP to C.\n# Machine C only sends UDP to A and B.\n\n# On Machine A - 192.168.58.2\ncyn --listen-udp 192.168.58.2:1234 \\\n    --listen-tcp 192.168.58.2:5555 \\\n    --send-udp 192.168.58.3:3456 \\\n    --send-udp 192.168.58.4:3456\n\n# On Machine B - 192.168.58.3 (shorthand flags)\ncyn -u 192.168.58.3:3456 \\\n    -T 192.168.58.2:5555 \\\n    -U 192.168.58.2:1234 \\\n    -U 192.168.58.4:3456\n\n# On Machine C - 192.168.58.4 (mixed, 1 minute send interval)\ncyn -u 192.168.58.4:3456 \\\n    --send-udp 192.168.58.2:1234 \\\n    --send-interval 1m\n```\n\n```bash\n# Listen for broadcast messages on Machine A and echo the data received\ncyn -u :1234 -e\n\n# Broadcast messages from Machine B using the regular UDP sender\ncyn -U 192.168.58.255:1234\n```\n\nInstances that are listening will produce output when they receive messages.\n\n```\n2022/12/27 03:00:39 Read 2 bytes from 192.168.58.4:50372\n2022/12/27 03:00:39 Received: hi\n2022/12/27 03:00:39 Read 2 bytes from 192.168.58.3:54115\n2022/12/27 03:00:39 Received: hi\n```\n\n### Configuration\n\nConfiguration is available through command line flags, a configuration file,\nand/or environment variables.\n\n#### Command line flags\n\nAll available flags can be seen by running `cyn --help`. This README snippet should\nhave the latest, but when in doubt, just run the command to check.\n\n```text\n$ cyn --help\nUsage:\n   [flags]\n   [command]\n\nAvailable Commands:\n  help        Help about any command\n  version     Displays the version\n\nFlags:\n  -c, --config string            A file path to load as additional configuration.\n  -h, --help                     help for this command\n      --http.address string      An address:port to host an HTTP server on for realtime data, such as '127.0.0.1:8080'\n  -e, --listen.echo              If enabled, echo the data that's received. Otherwise just print the length received (default).\n  -t, --listen.tcp strings       An IP:port address to listen on for TCP.  Can be specified multiple times.\n  -u, --listen.udp strings       An IP:port address to listen on for UDP.  Can be specified multiple times.\n  -d, --send.data string         The string data to send. (default \"hi\")\n  -i, --send.interval duration   How long to wait between attempting to send data (default 1s)\n  -T, --send.tcp strings         An IP:port address to send to (TCP).  Can be specified multiple times.\n  -U, --send.udp strings         An IP:port address to send to (UDP).  Can be specified multiple times.\n      --sinks.stdout.enabled     Whether to enable the stdout metrics sink\n\nUse \" [command] --help\" for more information about a command.\n```\n\n#### Environment variables\n\nConfiguration can be supplied throuh environment variables that follow the\n`CYNOMYS_VAR_NAME` pattern, replacing `.` with `_`. For example:\n\n```bash\nexport CYNOMYS_SEND_INTERVAL=500ms\ncyn -T 192.168.58.3:1234\n```\n\n#### Configuration File\n\nA configuration file can be provided. This is useful when trying to template\nconfiguration such as with Consul or similar tools.\n\nA full configuration file with all options is given below.\n\n```yaml\n# my-cyn-config.yaml\nlisten:\n  echo: true\n  udp:\n    - 192.168.58.4:2345\n  tcp:\n    - 192.168.58.4:2346\nsend:\n  udp:\n    - 192.168.58.3:1234\n  tcp:\n    - 192.168.58.3:1235\n  interval: 30s\n  data: \"my custom data\"\nhttp:\n  address: 127.0.0.1:8080\nsinks:\n  stdout:\n    enabled: true\n```\n\nThe configuration file must be supplied with the `--config/-c` command line\nflag.\n\n```bash\ncyn --config ./my-cyn-config.yaml\n\n# Can also use -c for shorthand\ncyn -c ./my-cyn-config.yaml\n```\n\n## Why the name\n\n[Prarie dogs talk to each other](https://en.wikipedia.org/wiki/Prairie_dog)\n\n### How do I pronounce it?\n\nidk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertras%2Fcynomys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevertras%2Fcynomys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertras%2Fcynomys/lists"}