You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
using Sog;
|
|
using ProtoCSStruct;
|
|
using Sog.IO;
|
|
|
|
namespace Game
|
|
{
|
|
/// <summary>
|
|
/// ip黑白名单列表
|
|
/// </summary>
|
|
public static class LimitIPList
|
|
{
|
|
private static FileStringIDList m_whiteList = null; //内测版本更新白名单
|
|
private static FileStringIDList m_whiteDeviceIdList = null;
|
|
|
|
|
|
/// <summary>
|
|
/// 检验是否在内测版本白名单中
|
|
/// </summary>
|
|
/// <param name="ip"></param>
|
|
/// <returns></returns>
|
|
public static bool IsInWhiteList(string ip, string deviceId)
|
|
{
|
|
if (string.IsNullOrEmpty(ip) && string.IsNullOrEmpty(deviceId))
|
|
{
|
|
return false;
|
|
}
|
|
return LimitIpDevice.CheckInWhiteIp(ip) || LimitIpDevice.CheckInWhiteDeviceId(deviceId);
|
|
}
|
|
|
|
public static void Clear()
|
|
{
|
|
LimitIpDevice.Clear();
|
|
}
|
|
|
|
}
|
|
}
|
|
|