Intercepting Websocket Messages To Analyze Geoguessr Party Games

submited by
Style Pass
2024-12-23 11:00:04

My friends and I play GeoGuessr every Wednesday. It’s a small yet awesome tradition of ours, a reason to get together on Discord every week. Being a naturally curious person, I had a lot of questions to ask. What is our top score? How often do we confuse UK with New Zealand? Do we ever get Ukraine wrong? Imagine my disappointment, when I realized that GeoGuessr provides neither such stats, nor any kind of records of our games. So I had to collect this data myself.

Since I already had some experience intercepting requests with browser extensions, I figured this was the way to go. There was only one catch - GeoGuessr uses WebSockets to synchronize game state between players. But it shouldn’t be much harder to intercept WebSocket messages rather than HTTP requests, right? WRONG!

“webRequest” - Add event listeners for the various stages of making an HTTP request, which includes websocket requests on ws:// and wss://.

Leave a Comment