Skip to content

Commit

Permalink
enable VPN check for non-steam users
Browse files Browse the repository at this point in the history
  • Loading branch information
Licho1 committed Aug 21, 2024
1 parent 6d19c32 commit 32d7248
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/.idea.Zero-K/.idea/projectSettingsUpdater.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Shared/PlasmaShared/GlobalConst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void SetMode(ModeType newMode)
public const string BomberIcon = "/img/fleets/neutral.png";
public const string WarpIcon = "/img/warpcore.png";

public const bool VpnCheckEnabled = false;
public const bool VpnCheckEnabled = true;

public const double EurosToKudos = 10.0;
public const string TeamEmail = "Zero-K team <[email protected]>";
Expand Down
2 changes: 1 addition & 1 deletion ZkLobbyServer/LoginChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public async Task<LoginCheckerResponse> DoLogin(Login login, string ip, List<ulo
userID,
installID);

if (!acc.HasVpnException && GlobalConst.VpnCheckEnabled) if (HasVpn(ip, acc, db)) return BlockLogin("Connection using proxy or VPN is not allowed! (You can ask for exception)", acc, ip, userID, installID);
if (!acc.HasVpnException && GlobalConst.VpnCheckEnabled && !acc.SteamID.HasValue) if (HasVpn(ip, acc, db)) return BlockLogin("Connection using proxy or VPN is not allowed! (You can ask for exception)", acc, ip, userID, installID);

return ret;
}
Expand Down

0 comments on commit 32d7248

Please sign in to comment.