{"id":22650924,"url":"https://github.com/mohammed90/caddy-throttle-listener","last_synced_at":"2026-03-09T11:02:45.303Z","repository":{"id":264290175,"uuid":"883959915","full_name":"mohammed90/caddy-throttle-listener","owner":"mohammed90","description":"Caddy module to throttle incoming connection bandwidth","archived":false,"fork":false,"pushed_at":"2024-11-05T22:07:31.000Z","size":11,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T13:48:20.637Z","etag":null,"topics":["bandwidth","caddy","caddy-plugin","throttling"],"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/mohammed90.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":"2024-11-05T22:07:13.000Z","updated_at":"2025-02-08T23:05:54.000Z","dependencies_parsed_at":"2024-11-23T06:37:48.065Z","dependency_job_id":null,"html_url":"https://github.com/mohammed90/caddy-throttle-listener","commit_stats":null,"previous_names":["mohammed90/caddy-throttle-listener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammed90/caddy-throttle-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-throttle-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-throttle-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-throttle-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-throttle-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammed90","download_url":"https://codeload.github.com/mohammed90/caddy-throttle-listener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammed90%2Fcaddy-throttle-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bandwidth","caddy","caddy-plugin","throttling"],"created_at":"2024-12-09T08:48:56.171Z","updated_at":"2026-03-09T11:02:45.295Z","avatar_url":"https://github.com/mohammed90.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Caddy Throttle Listener\n==========================\n\nA Caddy module that provides bandwidth throttling and chaos engineering features for incoming connections. This module allows you to simulate real-world network conditions by adding bandwidth limits, latency, and jitter. Note that the throttling applies for all bytes transmitted on the connection, including TLS handshake and HTTP headers.\n\n## Overview\n\nThis module allows you to throttle incoming connections to your Caddy server to prevent abuse and simulate chaotic network conditions for testing purposes. It provides:\n\n- **Bandwidth Throttling**: Limit upload/download speeds per connection\n- **Latency Injection**: Add fixed delays to simulate slow networks\n- **Jitter**: Add random delays to simulate unstable networks\n\nPerfect for preventing abuse, ensuring fair resource usage, and testing how your applications handle real-world network conditions.\n\n## Install\n\nFollow the xcaddy install process [here](https://github.com/caddyserver/xcaddy#install).\n\nThen, build Caddy with this Go module plugged in. For example:\n\n```shell\nxcaddy build --with github.com/mohammed90/caddy-throttle-listener\n```\n\n## Caddyfile Example\n\n\n```caddyfile\n{\n\tservers {\n\t\tlistener_wrappers {\n\t\t\tthrottle {\n\t\t\t\tdown 1MiB\n\t\t\t\tup 1MiB\n\t\t\t}\n\t\t\ttls\n\t\t}\n\t}\n}\nexample.com {\n\troot * /var/www/html\n\tfile_server\n}\n```\n\n## Configuration Options\n\n### Basic Throttling\n\n```caddyfile\n{\n\tservers {\n\t\tlistener_wrappers {\n\t\t\tthrottle {\n\t\t\t\tdown 512KB    # Download limit per connection\n\t\t\t\tup 1MB       # Upload limit per connection\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n### Chaos Engineering Features\n\nAdd network latency and jitter to test application resilience:\n\n```caddyfile\n{\n\tservers {\n\t\tlistener_wrappers {\n\t\t\tthrottle {\n\t\t\t\t# Bandwidth limits\n\t\t\t\tdown 1MiB\n\t\t\t\tup 512KB\n\t\t\t\t\n\t\t\t\t# Chaos engineering\n\t\t\t\tlatency 100ms    # Fixed delay per read/write\n\t\t\t\tjitter 50ms      # Random delay (0-50ms) per operation\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n### Testing Scenarios\n\n#### Slow Network Simulation\n```caddyfile\nthrottle {\n\tdown 64KB\n\tup 32KB\n\tlatency 200ms\n\tjitter 100ms\n}\n```\n\n#### High-Latency Connection (Satellite/Cellular)\n```caddyfile\nthrottle {\n\tlatency 800ms\n\tjitter 200ms\n}\n```\n\n#### Unstable Connection\n```caddyfile\nthrottle {\n\tjitter 500ms  # High jitter without base latency\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy-throttle-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammed90%2Fcaddy-throttle-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammed90%2Fcaddy-throttle-listener/lists"}