Skip to content

Commit 32d7248

Browse files
committed
enable VPN check for non-steam users
1 parent 6d19c32 commit 32d7248

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.idea/.idea.Zero-K/.idea/projectSettingsUpdater.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Shared/PlasmaShared/GlobalConst.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static void SetMode(ModeType newMode)
195195
public const string BomberIcon = "/img/fleets/neutral.png";
196196
public const string WarpIcon = "/img/warpcore.png";
197197

198-
public const bool VpnCheckEnabled = false;
198+
public const bool VpnCheckEnabled = true;
199199

200200
public const double EurosToKudos = 10.0;
201201
public const string TeamEmail = "Zero-K team <team@zero-k.info>";

ZkLobbyServer/LoginChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public async Task<LoginCheckerResponse> DoLogin(Login login, string ip, List<ulo
173173
userID,
174174
installID);
175175

176-
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);
176+
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);
177177

178178
return ret;
179179
}

0 commit comments

Comments
 (0)