A way to detect if a user is using a vpn

Goal:
I want to know if there is some way to know if someone is using a vpn.

Issue:
I have a game where you can collect countryballs and launch your own. You can only launch countryballs of your own country. People in my game are changing their vpn to other countries to unlock all the country balls.

Extra Detail:
I currently use LocalizationService to get the country.

2 Likes

I don’t believe there’s a good way of doing it. Only way I could think of doing it is by storing the player’s country when they first join.

What if I tracked joins together with country at that join to be able to see what country they joined with most often?

So it could look something like this:

Joins = {
17188382 = “UK”,
18282717 = “US”,
81828228 = “UK”
}

The numbers I can get using os.time

2 Likes

unless you had their IP you can’t do much also what’s the point of blocking them if they’re using a vpn?

Yeah, this is something you can do as well. Issue is a player can notice this and spam rejoin until country2 > country1. I don’t think your issue is completely avoidable. This comes down to making sure the feature itself isn’t unfair/abusable.

Some countries are supposed to be rare to get like tuvalu (a small pacific island). People with vpn can with a few clicks get this countryball by simply changing their vpn location.

What if I used the dates to also calculate the time between joins and maybe invalidate it if it’s for example over 2 joins in an hour? Maybe with the correct balance this could work out.

What if someone disconnects and wants to play again?
This also wouldn’t really fix ur issue, they’d just have to wait an hour to try again.

As far as I know, there is no way to detect if a user is using a VPN, even if we had their IP (which im pretty sure isn’t something roblox would give to developers anyway).

What I mean is that if someone joins 3 times with a different country then I would not detect any new country for the joins in the coming for example, hour. This would still allow the player to join, just not to change country.

I will experiment with the things I mentioned in the future and see if I can find some kind of workaround for this problem. I will also post the code that I end up with in this post.

There are many ways you could make this more annoying and tedious for someone trying to use a VPN. At the end of the day though, people will figure out how to bypass this and decrease the value of countryballs.

1 Like

ohhh, that should work.

even though it should work, can’t you just make the content available depending on what country they’re in, and not store/unlock it

Wait, what do you mean with this?

Like, your original comment insinuates that the player is unlocking content from joining in another country. You can just make it so it only allows you to play as the country ball as the country you’re in currently, and not store that data anywhere. edit - save that you’ve played as that country ball before

It won’t bypass your VPN issue, but its best to just make it like that instead

Yeah just check their country only the first time they join the game and save that. I would reccomend adding stateballs to your game and let people self identify states if they are in US since there will be so many american players so most of the players will only ever have a USA countryball.

I just forgot about one thing, with alt accounts they can bypass all my systems so it will not work even if I manage to create a workaround.

I think if you don’t want to go with this solution, I would personally make countryballs available to anyone. You can find other means of adding value and demand to your game such as abilities or effects unlocked by playing the game during events, etc.

If people are joining with alts it will increase your analytics of how many unique acounts are joining your game therefore improving your status on the roblox algorithm. I don’t think its an issue.

I don’t fully agree with what you’re offering as a solution, however I think you are right about there not being much possible than saving on the first join. I will still experiment and see what I can do though.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.