{"id":13686650,"url":"https://github.com/kffl/speedbump","last_synced_at":"2025-05-15T15:03:53.615Z","repository":{"id":44891259,"uuid":"504549881","full_name":"kffl/speedbump","owner":"kffl","description":"TCP proxy for simulating variable, yet predictable network latency :globe_with_meridians::hourglass_flowing_sand:","archived":false,"fork":false,"pushed_at":"2024-07-25T10:32:01.000Z","size":1536,"stargazers_count":1525,"open_issues_count":8,"forks_count":36,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T22:38:10.381Z","etag":null,"topics":["go","golang","load-testing","network-latency","observability","tcp","tcp-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kffl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-06-17T13:43:46.000Z","updated_at":"2025-04-11T13:52:07.000Z","dependencies_parsed_at":"2024-06-18T16:46:37.384Z","dependency_job_id":"1b0f321a-f129-4608-8e5c-1e0b68933238","html_url":"https://github.com/kffl/speedbump","commit_stats":{"total_commits":42,"total_committers":3,"mean_commits":14.0,"dds":"0.11904761904761907","last_synced_commit":"f444e1739328849a359a03ceed0ec6b0f941bc66"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kffl%2Fspeedbump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kffl%2Fspeedbump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kffl%2Fspeedbump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kffl%2Fspeedbump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kffl","download_url":"https://codeload.github.com/kffl/speedbump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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","load-testing","network-latency","observability","tcp","tcp-proxy"],"created_at":"2024-08-02T15:00:36.748Z","updated_at":"2025-05-15T15:03:53.549Z","avatar_url":"https://github.com/kffl.png","language":"Go","readme":"# speedbump - TCP proxy with variable latency\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"speedbump logo\" src=\"https://github.com/kffl/speedbump/raw/HEAD/assets/speedbump.gif\" width=\"480\" height=\"auto\"/\u003e\n\u003c/div\u003e\nSpeedbump is a TCP proxy written in Go which allows for simulating variable network latency.\n\n[![CI Workflow](https://github.com/kffl/speedbump/workflows/CI/badge.svg)](https://github.com/kffl/speedbump/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/kffl/speedbump)](https://goreportcard.com/report/github.com/kffl/speedbump) [![Docker Pulls](https://img.shields.io/docker/pulls/kffl/speedbump)](https://hub.docker.com/r/kffl/speedbump) [![Docker Image Version](https://img.shields.io/docker/v/kffl/speedbump)](https://hub.docker.com/r/kffl/speedbump) [![GoDoc](https://godoc.org/github.com/kffl/speedbump/lib?status.svg)](https://godoc.org/github.com/kffl/speedbump/lib)\n\n## Usage\n\n### Installation\n\nThe easiest way to install speedbump is to download pre-built binaries for your platform that are automatically attached to each [release](https://github.com/kffl/speedbump/releases/) under _Assets_. If you wish to build speedbump from source, clone this repository and run `go build`. Alternatively, you can run speedbump as a container using the [kffl/speedbump](https://hub.docker.com/r/kffl/speedbump) image.\n\n### Basic usage examples\n\nSpawn a new instance listening on port 2000 that proxies TCP traffic to localhost:80 with a base latency of 100ms and sine wave amplitude of 100ms (resulting in maximum added latency being 200ms and minimum being 0), period of which is 1 minute:\n\n```\nspeedbump --latency=100ms --sine-amplitude=100ms --sine-period=1m --port=2000 localhost:80\n```\n\nor when running speedbump using the [kffl/speedbump](https://hub.docker.com/r/kffl/speedbump) container image:\n\n```\ndocker run --net=host kffl/speedbump:latest --latency=100ms --sine-amplitude=100ms \\\n           --sine-period=1m --port=2000 localhost:80\n```\n\nSpawn a new instance with a base latency of 300ms and a sawtooth wave latency summand with amplitude of 200ms and period of 2 minutes (visualized by the graph below):\n\n```\nspeedbump --latency=300ms --saw-amplitude=200ms --saw-period=2m --port=2000 localhost:80\n```\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"speedbump sawtooth wave graph\" src=\"https://github.com/kffl/speedbump/raw/HEAD/assets/sawtooth.svg\" width=\"800\" height=\"auto\"/\u003e\n\u003c/div\u003e\n\n### Combining latency summands\n\nIt is possible to run speedbump with multiple latency summands at once:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"speedbump sawtooth + sine graph\" src=\"https://github.com/kffl/speedbump/raw/HEAD/assets/combined.svg\" width=\"800\" height=\"auto\"/\u003e\n\u003c/div\u003e\n\n## CLI Arguments Reference:\n\nOutput of `speedbump --help`:\n\n```\nusage: speedbump [\u003cflags\u003e] \u003cdestination\u003e\n\nTCP proxy for simulating variable network latency.\n\nFlags:\n  --help                  Show context-sensitive help (also try --help-long and\n                          --help-man).\n  --host=\"\"               IP or hostname to listen on. Speedbump will bind to\n                          all available network interfaces if unspecified.\n  --port=8000             Port number to listen on.\n  --buffer=64KB           Size of the buffer used for TCP reads.\n  --queue-size=1024       Size of the delay queue storing read buffers.\n  --latency=5ms           Base latency added to proxied traffic.\n  --log-level=INFO        Log level. Possible values: DEBUG, TRACE, INFO, WARN,\n                          ERROR.\n  --sine-amplitude=0      Amplitude of the latency sine wave.\n  --sine-period=0         Period of the latency sine wave.\n  --saw-amplitude=0       Amplitude of the latency sawtooth wave.\n  --saw-period=0          Period of the latency sawtooth wave.\n  --square-amplitude=0    Amplitude of the latency square wave.\n  --square-period=0       Period of the latency square wave.\n  --triangle-amplitude=0  Amplitude of the latency triangle wave.\n  --triangle-period=0     Period of the latency triangle wave.\n  --version               Show application version.\n\nArgs:\n  \u003cdestination\u003e  TCP proxy destination in host:post format.\n```\n\n## Using speedbump as a library\n\nSpeedbump can be used as a Go library via its `lib` package. Check `lib` [README](lib/README.md) for additional information.\n\n## License\n\nCopyright Paweł Kuffel 2022, licensed under Apache 2.0 License.\n\nSpeedbump logo contains the Go Gopher mascot which was originally designed by Renee French (http://reneefrench.blogspot.com/) and licensed under Creative Commons 3.0 Attributions license.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkffl%2Fspeedbump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkffl%2Fspeedbump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkffl%2Fspeedbump/lists"}