1
0
Fork
You've already forked network-virtual-problems
0
Introduces latency for game testing purposes
  • Go 87.5%
  • Dockerfile 6.7%
  • Nix 4.7%
  • Just 1.1%
Find a file
2024年10月06日 16:41:48 +07:00
cmd/app turn ping -> delay, add jitter 2024年10月06日 16:41:48 +07:00
internal turn ping -> delay, add jitter 2024年10月06日 16:41:48 +07:00
mocks Added a few connection unit tests 2020年03月01日 11:08:24 -05:00
.dockerignore Github actions instead of Travis CI for buildx 2020年03月24日 08:30:20 -04:00
.envrc initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
.gitignore initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
Dockerfile remove dependencies to github.com/qdm12/golibs 2024年10月06日 12:52:51 +07:00
flake.lock initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
flake.nix initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
go.mod remove dependencies to github.com/qdm12/golibs 2024年10月06日 12:52:51 +07:00
go.sum remove dependencies to github.com/qdm12/golibs 2024年10月06日 12:52:51 +07:00
justfile turn ping -> delay, add jitter 2024年10月06日 16:41:48 +07:00
LICENSE initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
LICENSE-ORIGINAL initial commit for Network Virtual Problems 2024年10月06日 09:33:16 +07:00
README.md turn ping -> delay, add jitter 2024年10月06日 16:41:48 +07:00

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, arm32v7 and arm32v6 CPU architectures
  • Runs without root as user 1000

Running and Development

  1. Use the following command (this requires you to install nix first):

    nix develop
    
  2. 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.