{"id":15442953,"url":"https://github.com/maribelacosta/delay-proxy","last_synced_at":"2025-07-09T01:36:33.998Z","repository":{"id":62567571,"uuid":"144040707","full_name":"maribelacosta/delay-proxy","owner":"maribelacosta","description":"An HTTP proxy that introduces network delays to the response from the server ","archived":false,"fork":false,"pushed_at":"2018-08-09T12:47:02.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-29T08:19:52.696Z","etag":null,"topics":["delay","http","http-server","networking","proxy","proxy-server","pypi-packages","python27"],"latest_commit_sha":null,"homepage":"","language":"Python","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/maribelacosta.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}},"created_at":"2018-08-08T16:33:12.000Z","updated_at":"2018-08-10T09:37:34.000Z","dependencies_parsed_at":"2022-11-03T16:30:41.589Z","dependency_job_id":null,"html_url":"https://github.com/maribelacosta/delay-proxy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/maribelacosta/delay-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maribelacosta%2Fdelay-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maribelacosta%2Fdelay-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maribelacosta%2Fdelay-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maribelacosta%2Fdelay-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maribelacosta","download_url":"https://codeload.github.com/maribelacosta/delay-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maribelacosta%2Fdelay-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260133813,"owners_count":22963800,"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":["delay","http","http-server","networking","proxy","proxy-server","pypi-packages","python27"],"created_at":"2024-10-01T19:32:08.273Z","updated_at":"2025-06-16T09:33:54.377Z","avatar_url":"https://github.com/maribelacosta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/144040707.svg)](https://zenodo.org/badge/latestdoi/144040707)\n[![PyPI version](https://badge.fury.io/py/delay-proxy.svg)](https://badge.fury.io/py/delay-proxy)\n\n# delay-proxy\n\nAn HTTP proxy in Python 2.7 that introduces network delays to the response from a server.\n\nThe network delays (in milliseconds) follow a random [Gamma distribution](https://en.wikipedia.org/wiki/Gamma_distribution) with parameters `alpha` and `beta`. \n\n## Download and Install\nDownload or clone this repository. Execute the following command in the `delay-proxy` folder. \n\n```\n[sudo] python setup.py install\n```\n\n## Execution and Parameters\nTo start a proxy, execute the following command: \n```\nrun-delay-proxy port server alpha beta randomseed [buffsize]\n```\n\n- `port`: Listening port for the proxy (int).\n- `server`: IP address and port of the server (ip:port).\n- `alpha`: Alpha parameter for gamma distribution (int).\n- `beta`: Beta parameter for gamma distribution (float).\n- `randomseed`: Seed for the delays in the proxy (int). Using the same seed allows to reproduce the sequence of delays. \n- `buffsize`:  Buffersize that specifies the size of the data chunks sent to the client (int).\n\n## Example of Usage\n\nIn the following example, the proxy listens in the port `8005` and contacts the server `http://127.0.0.1:5000/db`. \nThe response from the server is sent to the client with network delays (in milliseconds) that follow a Gamma distribution with parameters `alpha = 10` and `beta = 3.0`. The seed used for generating the delays is `1`. \n\n```\n# Delaying the answer from a server. \nrun-delay-proxy 8005 http://127.0.0.1:5000/db 10 3.0 1\n```\n\nIn the following example, the answer from the server is partitioned in chunks of size `1024` characters. \nEach chunk from the server is sent to the client with the network delays as specified in the previous example. \n```\n# Delaying chunks of the answer from a server. \nrun-delay-proxy 8005 http://127.0.0.1:5000/db 10 3.0 1 1024 \n```\n\n## How to Cite\nUse the DOI provided in this README.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaribelacosta%2Fdelay-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaribelacosta%2Fdelay-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaribelacosta%2Fdelay-proxy/lists"}