Building a crypto casino frontend but geolocation is a pain in the ass

rk_designs

New Member
Messages
68
Reaction score
0
Location
Vancouver, BC

I'm working on a small slot machine game in vanilla JS for an offshore casino, and the geolocation API is driving me up the wall. I'm in a state where online gambling is basically illegal, so I have to use a VPN just to test my own damn code. But the site still detects the VPN through some JS trickery (probably WebRTC or IP mismatch). So I can't even load the page without it throwing a 403.

I've tried overriding navigator.geolocation.getCurrentPosition with a fake position, but the backend still catches it because they're checking the IP against a database. So client-side spoofing isn't enough. Anyone know a way to make the front-end not leak the real IP? I'm using a decent VPN but apparently they can see through it.

Also, my bank keeps blocking my card when I try to deposit on these sites, so I'm stuck with crypto. But the crypto payment gateway they use has a front-end that's a mess. Buttons don't work on mobile, the QR code is tiny, etc. I could fix it but I don't have access to their code. So I'm just venting.

Anyway, if anyone has a working JS snippet to detect or bypass VPN checks, I'd appreciate it. Or if you know a non-KYC casino that doesn't have such aggressive geoblocking, let me know. I'm tired of jumping through hoops just to lose money.

LisaW_

New Member
Messages
53
Reaction score
0
Location
Edinburgh, UK

I'm pretty new to this stuff too so take it with a grain of salt, but I don't think there's a front-end fix for the IP check. That's happening on their server before your JS even runs. Spoofing navigator.geolocation only fools things that read it in the browser, it's not gonna beat a database lookup on your actual IP.

The crypto gateway thing sounds like the bigger headache honestly. Mobile buttons that just don't fire is brutal, is it the QR modal specifically or the whole page?

And ngl, testing your own code on a site that's already flagged with a VPN on is a good way to get your account nuked for nothing. Not worth it imo.

ChrisM85

New Member
Messages
62
Reaction score
0
Location
Dublin, IE

Lisa's right that the IP check is server-side, but that doesn't mean there's no front-end angle. WebRTC is the leak nobody patches. Even with the VPN on, WebRTC can hand over your real local and public IP to anything that asks, and a huge chunk of "VPN detection" scripts are literally just reading that. Kill WebRTC in the browser (about:config on Firefox, or an extension) and a good number of those 403s just stop. Won't fix the datacenter ASN problem though.

Which is the other thing. "Decent VPN" means nothing if it's a datacenter IP. Those ranges are public, every geo database has them flagged before you even connect. You need residential or mobile proxies if you want to actually look like a real user. Costs more, setup is annoying, but it's the only thing that's ever gotten me onto the aggressive sites. Nord and the usual suspects are basically useless for this.

On the crypto gateway, which one is it? The tiny QR thing is usually just a stray max-width in the CSS, you can patch that live in devtools if you're only trying to deposit. Buttons not firing on mobile is a different beast, usually a listener attached before the DOM renders. And yeah the bank thing, mine flagged a $40 crypto onramp last month and locked my card for a week. Fun stuff. If you've got a shortlist of non-KYC sites that don't geofence this hard, I'd take it.

FrostyBear

New Member
Messages
67
Reaction score
0
Location
Brisbane, AU

Wait, WebRTC actually leaks through a VPN? I always figured that was kind of a myth since it needs your permission for stuff.

Tried a blocker extension on Chrome ages ago and got mixed results, but tbh I never checked whether it was doing anything at all. Is Firefox the better move here, or does the extension route actually work?

And Chris, what even are residential proxies in practice? Actual people renting out their home connection? Feels like half the sites selling them are just scamming, the last proxy I tried tanked my speed so hard I bailed in a day.

You must log in or register to reply here.