Sign inSign up
pingodown logo

qmcgaw/pingodown

By qmcgaw

•Updated over 6 years ago

See https://github.com/qdm12/pingodown

Image
0

2.4K

qmcgaw/pingodown repository overview

⁠PingODown

Adds extra latency to all players on a UDP proxy

⁠

Build status Docker Pulls Docker Stars Image size Image version

Join Slack channel GitHub last commit GitHub commit activity GitHub issues

⁠Purpose

I have a home server hosting a shooting game server⁠ but my friends are in America and Europe, and they all have different 'ping' to the server.

As a fellow gopher and having pity of the 150ms ping of my friend, I wrote this UDP proxy program which induces latency to all the players such that players physically near the server can have extra latency, to give equal chances to far away players.

⁠Features

  • UDP Proxy server for clients of a game server with extra ping 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
  • Docker image tags and sizes⁠
  • Runs without root as user 1000

⁠Setup

  1. Use the following command:

    docker run -d -p 8000:8000/udp -e SERVER_ADDRESS=yourhost:9009 qmcgaw/pingodown
    

    You can also use docker-compose.yml⁠ with:

    docker-compose up -d
    
  2. You can update the image with docker pull qmcgaw/pingodown

⁠Environment variables
Environment variableDefaultPossible valuesDescription
SERVER_ADDRESShostname:portThe server to proxy packets to, i.e. myiporhost:9009
LISTEN_ADDRESS:8000Listening proxy address
PING100msArtificial ping added for each connection
TZAmerica/MontrealstringTimezone, for your logs timestampts essentially

⁠Development

⁠Using VSCode and Docker
  1. Install Docker⁠
    • On Windows, share a drive with Docker Desktop and have the project on that partition
    • On OSX, share your project directory with Docker Desktop
  2. With Visual Studio Code⁠, install the remote containers extension⁠
  3. In Visual Studio Code, press on F1 and select Remote-Containers: Open Folder in Container...
  4. Your dev environment is ready to go!... and it's running in a container :+1:

See also contributing⁠

⁠TODOs

  • Web UI
    • Ping per player slider
    • Random ping variation, for extra fun
  • Unit testing
  • Integration testing with 2 udp clients and 1 udp server (a lot of work sadly)

⁠License

This repository is under an MIT license⁠ unless otherwise indicated

Tag summary

Content type

Image

Digest

Size

2.6 MB

Last updated

over 6 years ago

docker pull qmcgaw/pingodown