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