Small changes. Fix server browser (SSL/TLS)
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
/// <summary>
|
||||
/// ?
|
||||
/// </summary>
|
||||
public string SocialClubName { get; set; }
|
||||
public string SocialClubName { get; internal set; }
|
||||
/// <summary>
|
||||
/// ?
|
||||
/// </summary>
|
||||
|
@ -18,14 +18,8 @@ namespace CoopClient.Menus
|
||||
Alignment = Main.MainSettings.FlipMenu ? GTA.UI.Alignment.Right : GTA.UI.Alignment.Left
|
||||
};
|
||||
#region SUB
|
||||
/// <summary>
|
||||
/// Don't use it!
|
||||
/// </summary>
|
||||
public Sub.Settings SubSettings = new Sub.Settings();
|
||||
/// <summary>
|
||||
/// Don't use it!
|
||||
/// </summary>
|
||||
public Sub.Servers ServerList = new Sub.Servers();
|
||||
internal Sub.Settings SubSettings = new Sub.Settings();
|
||||
internal Sub.Servers ServerList = new Sub.Servers();
|
||||
#endregion
|
||||
|
||||
#region ITEMS
|
||||
|
@ -67,6 +67,11 @@ namespace CoopClient.Menus.Sub
|
||||
List<ServerListClass> serverList = null;
|
||||
try
|
||||
{
|
||||
// SSL/TLS
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls13 | SecurityProtocolType.Tls12;
|
||||
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||
|
||||
WebClient client = new WebClient();
|
||||
string data = client.DownloadString(Main.MainSettings.MasterServer);
|
||||
serverList = JsonConvert.DeserializeObject<List<ServerListClass>>(data);
|
||||
|
Reference in New Issue
Block a user