- Go 87.5%
- Dockerfile 6.7%
- Nix 4.7%
- Just 1.1%
Network Virtual Problems
Description
Adds extra latency to all players on a UDP proxy. Forked from https://github.com/qdm12/pingodown.
Purpose
This project is being repurposed as a way to add artificial delay, packet drops, etc. to test the performance of a game server. Below is how a game and client interacts, in high level.
If we are playing locally, as in to test the game, there will be little to no delay between client and server. This is bad, because we can't feel any latency, which will exist in real play. This is why we need to implement a proxy server (this repository) inbetween the server and the client. The diagram will look like the one below.
The word "introduce chaos" means the proxy server will add delays, packet drops, jitter, and right-left-wing-leaning opinions. This simulates a real and poor network condition that player might experience. Especially if they are located in Indonesia.
Features
- UDP Proxy server for clients of a game server with extra delay options
- Forces the highest latency of the server clients to all the clients
- Uses ICMP to find the round trip from the server to each of the connected clients
- Tiny 7.3MB Docker image (uncompressed)
- Compatible with
amd64,386,arm64,arm32v7andarm32v6CPU architectures - Runs without root as user
1000
Running and Development
-
Use the following command (this requires you to install nix first):
nix develop -
Then you can run the project with:
just run
Environment variables
| Environment variable | Default | Possible values | Description |
|---|---|---|---|
SERVER_ADDRESS |
hostname:port | The server to proxy packets to, i.e. myiporhost:9009 |
|
LISTEN_ADDRESS |
:8000 |
Listening proxy address | |
DELAY |
100ms |
Artificial delay added for each connection | |
JITTER |
0ms |
Artificial random delay added for each connection | |
TZ |
Asia/Jakarta |
string | Timezone, for your logs timestampts essentially |
License
This repository is under an AGPLv3-or-later unless otherwise indicated. This project was forked from https://github.com/m0nad/go-ping-proxy, commit 76e43adaec with MIT license. For the preservation of Open Source, this project have been forked and any changes forward will be licensed with AGPLv3-or-later. Please also support the original author.