[](https://zenodo.org/badge/latestdoi/144040707)
# delay-proxy
An HTTP proxy in Python 2.7 that introduces network delays to the response from a server.
The network delays (in milliseconds) follow a random [Gamma distribution](https://en.wikipedia.org/wiki/Gamma_distribution) with parameters alpha and beta.
## Download and Install Download or clone this repository. Execute the following command in the delay-proxy folder.
` [sudo] python setup.py install `
## Execution and Parameters To start a proxy, execute the following command: ` run-delay-proxy port server alpha beta randomseed [buffsize] `
port: Listening port for the proxy (int).
server: IP address and port of the server (ip:port).
alpha: Alpha parameter for gamma distribution (int).
beta: Beta parameter for gamma distribution (float).
randomseed: Seed for the delays in the proxy (int). Using the same seed allows to reproduce the sequence of delays.
buffsize: Buffersize that specifies the size of the data chunks sent to the client (int).
## Example of Usage
In the following example, the proxy listens in the port 8005 and contacts the server http://127.0.0.1:5000/db. The 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.
` # Delaying the answer from a server. run-delay-proxy 8005 http://127.0.0.1:5000/db 10 3.0 1 `
In the following example, the answer from the server is partitioned in chunks of size 1024 characters. Each chunk from the server is sent to the client with the network delays as specified in the previous example. ` # Delaying chunks of the answer from a server. run-delay-proxy 8005 http://127.0.0.1:5000/db 10 3.0 1 1024 `
## How to Cite Use the DOI provided in this README.
Release files for delay-proxy 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| delay-proxy-0.1.2.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| delay_proxy-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / delay-proxy-0.1.2.tar.gz
| Download URL | delay-proxy-0.1.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0239d1772c3fd3f6fe5eda84804885ba11efc3a9c3749975faed22ffaca8e94a
|
|
BLAKE2b-256 checksum How to use checksums |
284ec393c05875daac8e30acb671ca813c576e6db416e3db7a16637845abdb62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|
Release files / delay_proxy-0.1.2-py3-none-any.whl
| Download URL | delay_proxy-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c417355fea42441c9fbf0fc09dc7724ec62521946dee0daa825e06ea78da8a6
|
|
BLAKE2b-256 checksum How to use checksums |
133ccbcecc78e6e4db9deef00b7ea796bbc0a62737321c04fc1670ddda95aa69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
|