DEV Community

ARIAN
ARIAN

Posted on

CS2 Matchmaking Fixing Your Ping, I Built a Tool That Picks Your Servers

How I built CS2 Armory a Python tool that gives you full control over which Steam relay servers Counter-Strike 2 connects to, using nothing but Windows Firewall rules

a Python tool that gives you full control over which Steam relay servers Counter-Strike 2

CS2 Matchmaking Keeps Putting You on the Wrong Servers? I Built a Fix

You queue up for a CS2 match The game picks a server, Your ping is 120ms You didnt ask for this.

Valves matchmaking system chooses your Steam Datagram Relay (SDR) servers based on a ping estimate that doesnt always match what you actually experience, Sometimes it works fine Sometimes it routes you through a relay on the other side of the planet.

I got tired of this. So I built CS2 Armory

What CS2 Armory Does

It pulls the live list of SDR relay servers directly from Steams API, groups them by region, and lets you block the ones you dont want using native Windows Firewall rules.

Thats it, No config hacks, No game file modifications, No third-party proxies, Just outbound firewall rules that Steams matchmaking is forced to respect

How It Actually Works

Under the hood, CS2 Armory manages outbound block rules in Windows Firewall, These rules target the IP ranges of specific relay servers, When Steams matchmaking tries to connect to a blocked relay, it cant reach it so it falls back to the servers you've allowed.

The app operates in its own dedicated firewall namespace, It won't touch your other software, your system rules, or anything else, When you click Unblock, every rule it created gets cleanly deleted.

Here's the flow:

1. App fetches live SDR config from Steam API
2. Servers are grouped by region (EU, US, Asia, etc)
3. You pick which regions to keep
4. App creates firewall block rules for everything else
5. CS2 matchmaking is forced to use your allowed servers
6. Click "Unblock" to restore default behavior
Enter fullscreen mode Exit fullscreen mode

Key Features

  • Live Server Sync Pulls current SDR configurations straight from Steam's API. Updates automatically after Valve pushes changes
  • Smart Clustering Groups nearby relay servers together. No scrolling through 200 individual entries
  • One-Click Controls Block everything except your target region, or pick specific servers
  • Custom Presets Save configurations like "EU Only" or "No Asia" and load them instantly
  • Built-in Ping Tool Test latency to each server before deciding.
  • Firewall Diagnostics Check your Windows Firewall status and restore defaults in one click

Why Not Just Edit Game Configs?

A few reasons:

  1. Valve overrides config changes when the game updates. You lose your settings.
  2. Game configs dont target SDR relays directly they affect connection quality settings, not server selection.
  3. Firewall rules are the only thing Steam cannot bypass The client respects outbound rules at the OS level

Running from Source

git clone https://github.com/Arianlavi/cs2armory.git
cd cs2armory
pip install -r requirements.txt
python main.py
Enter fullscreen mode Exit fullscreen mode

Requirements:

  • Windows 10 or 11
  • Python 3.9+
  • Administrator privileges (for firewall rules)

Or just grab the prebuilt .exe from the Releases page and run it

What the Tool Looks Like

The GUI shows all available SDR relay locations, grouped by country/region You can ping servers directly from the app, save presets, and toggle rules with a single button

Everything is designed around speed, open the app, pick your region, hit Block, queue up

Important Disclaimer

CS2 Armory only manages local Windows Firewall rules on your machine. It doesn't modify game files, inject into the CS2 process, or touch any server-side components. It doesn't guarantee lower ping, it influences which relays your client is allowed to connect to. Use it responsibly

Try It Out

The project is fully open source under the MIT license:

🔗 GitHub: github.com/Arianlavi/cs2armory

If it made your matchmaking experience better, drop a ⭐ on the repo. It takes 2 seconds and means a lot

Top comments (0)