ChatGPT Pasted CS2 server picker for Linux
Fetches data from the Steam API and blocks IP addresses using iptables
.
Run ./blocker.sh
and enter countries to block.
OR
Run ./blocker.sh
and provide the countries to block as args, like so:
./blocker.sh lhr ams par fra sto2 vie mad sto waw hel
Then say "yes" and enter your password :^)
DO NOT DELETE blocked-ips.txt
Run ./unblocker.sh
.
This will read blocked-ips.txt
and unblock those addresses.
If you don't know what you should block, just run CS2, open console, start the queue and wait for it to output something like:
Obtained direct RTT measurements to relays in 40 POPs. Closest 15 are:
jfk: 79ms
atl: 101ms
ord: 104ms
iad: 115ms
bom2: 141ms
lax: 141ms
bom: 146ms
dfw: 147ms
sea: 155ms
maa2: 161ms
maa: 168ms
hkg: 183ms
jnb: 187ms
sgp: 190ms
lim: 191ms
Confirmed best official datacenter ping: 101 ms
For whatever reason, https://github.com/Jyben/csgo-mm-server-picker no longer works for me and I am not bothered to fix it. These scripts achieve the same result anyway.