Commit e4c4c727 authored by hex's avatar hex

fix and update

parent c8a0c92b
Pipeline #39949 failed
...@@ -176,7 +176,7 @@ public class Menu : WindowServantSP ...@@ -176,7 +176,7 @@ public class Menu : WindowServantSP
{ {
isDownloadingSuperPre = true; isDownloadingSuperPre = true;
// 定义常量和路径 // 定义常量和路径
const string downloadUrl = "https://cdn02.moecube.com:444/ygopro-super-pre/archive/ygopro-super-pre.ypk"; const string downloadUrl = "https://cdntx.moecube.com/ygopro-super-pre/archive/ygopro-super-pre.ypk";
string expansionsDir = "expansions"; string expansionsDir = "expansions";
string ypkFileName = "ygopro-super-pre.ypk"; string ypkFileName = "ygopro-super-pre.ypk";
string zipFileName = "ygopro-super-pre.zip"; string zipFileName = "ygopro-super-pre.zip";
......
...@@ -576,7 +576,7 @@ public class Program : MonoBehaviour ...@@ -576,7 +576,7 @@ public class Program : MonoBehaviour
bool lflistUpdated = false; bool lflistUpdated = false;
bool stringsUpdated = false; bool stringsUpdated = false;
// 1. 下载 cards.cdb // 1. 下载 cards.cdb
string cardsUrl = "https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/cards.cdb"; string cardsUrl = "https://cdntx.moecube.com/koishipro/ygopro-database/zh-CN/cards.cdb";
string cardsPath = Path.Combine(dbDir, "cards.cdb"); string cardsPath = Path.Combine(dbDir, "cards.cdb");
yield return StartCoroutine( yield return StartCoroutine(
UnityFileDownloader.DownloadFileWithHeadCheck( UnityFileDownloader.DownloadFileWithHeadCheck(
...@@ -594,7 +594,7 @@ public class Program : MonoBehaviour ...@@ -594,7 +594,7 @@ public class Program : MonoBehaviour
); );
// 2. 下载 lflist.conf // 2. 下载 lflist.conf
string lflistUrl = "https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/lflist.conf"; string lflistUrl = "https://cdntx.moecube.com/koishipro/ygopro-database/zh-CN/lflist.conf";
string lflistPath = Path.Combine(dbDir, "lflist.conf"); string lflistPath = Path.Combine(dbDir, "lflist.conf");
yield return StartCoroutine( yield return StartCoroutine(
UnityFileDownloader.DownloadFileWithHeadCheck( UnityFileDownloader.DownloadFileWithHeadCheck(
...@@ -612,7 +612,7 @@ public class Program : MonoBehaviour ...@@ -612,7 +612,7 @@ public class Program : MonoBehaviour
); );
// 3. 下载 strings.conf // 3. 下载 strings.conf
string stringsUrl = string stringsUrl =
"https://cdn02.moecube.com:444/koishipro/ygopro-database/zh-CN/strings.conf"; "https://cdntx.moecube.com/koishipro/ygopro-database/zh-CN/strings.conf";
string stringsPath = Path.Combine(dbDir, "strings.conf"); string stringsPath = Path.Combine(dbDir, "strings.conf");
yield return StartCoroutine( yield return StartCoroutine(
UnityFileDownloader.DownloadFileWithHeadCheck( UnityFileDownloader.DownloadFileWithHeadCheck(
......
...@@ -246,7 +246,7 @@ public class GameTextureManager ...@@ -246,7 +246,7 @@ public class GameTextureManager
else if (pic.type == GameTextureType.card_picture && pic.code != 0 && AutoPicDownload) else if (pic.type == GameTextureType.card_picture && pic.code != 0 && AutoPicDownload)
{ {
// 文件不存在,且是卡图,则尝试下载 // 文件不存在,且是卡图,则尝试下载
string url = "https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/" + pic.code.ToString() + ".jpg"; string url = "https://cdntx.moecube.com/images/ygopro-images-zh-CN/" + pic.code.ToString() + ".jpg";
string finalPath = "picture/card/" + pic.code.ToString() + ".jpg"; string finalPath = "picture/card/" + pic.code.ToString() + ".jpg";
lock (_lock) lock (_lock)
......
...@@ -29,40 +29,40 @@ public static class GlobalCertificateManager ...@@ -29,40 +29,40 @@ public static class GlobalCertificateManager
SslPolicyErrors sslPolicyErrors SslPolicyErrors sslPolicyErrors
) )
{ {
// 都是从 cdn02 的官方资源下载,hook 掉不验证证书可以提高下载速度,但是有一定的安全风险 // 都是从的官方资源下载,hook 掉不验证证书可以提高下载速度,但是有一定的安全风险
return true; // return true;
// // Case 1: 证书本身没有问题,直接通过 // Case 1: 证书本身没有问题,直接通过
// if (sslPolicyErrors == SslPolicyErrors.None) if (sslPolicyErrors == SslPolicyErrors.None)
// { {
// return true; return true;
// } }
// // Case 2: 如果错误是 RemoteCertificateChainErrors, // Case 2: 如果错误是 RemoteCertificateChainErrors,
// // 这通常意味着证书链有问题,比如找不到吊销列表或者根证书不受信任。 // 这通常意味着证书链有问题,比如找不到吊销列表或者根证书不受信任。
// // 我们将尝试进行一次忽略吊销检查的自定义验证。 // 我们将尝试进行一次忽略吊销检查的自定义验证。
// if ((sslPolicyErrors & SslPolicyErrors.RemoteCertificateChainErrors) != 0) if ((sslPolicyErrors & SslPolicyErrors.RemoteCertificateChainErrors) != 0)
// { {
// // 创建一个新的证书链对象 // 创建一个新的证书链对象
// X509Chain customChain = new X509Chain(); X509Chain customChain = new X509Chain();
// // 设置自定义验证策略 // 设置自定义验证策略
// customChain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; // <-- 核心:不检查证书吊销 customChain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; // <-- 核心:不检查证书吊销
// customChain.ChainPolicy.VerificationFlags = customChain.ChainPolicy.VerificationFlags =
// X509VerificationFlags.AllowUnknownCertificateAuthority; // 可选:如果你的服务器是自签名证书,需要加上这句。如果服务器证书是由受信任的公共CA颁发的,可以去掉这句。 X509VerificationFlags.AllowUnknownCertificateAuthority; // 可选:如果你的服务器是自签名证书,需要加上这句。如果服务器证书是由受信任的公共CA颁发的,可以去掉这句。
// // 使用 X509Certificate2,因为它包含更完整的信息 // 使用 X509Certificate2,因为它包含更完整的信息
// X509Certificate2 cert2 = new X509Certificate2(certificate); X509Certificate2 cert2 = new X509Certificate2(certificate);
// // 使用自定义策略进行验证 // 使用自定义策略进行验证
// bool isChainValid = customChain.Build(cert2); bool isChainValid = customChain.Build(cert2);
// // 如果自定义验证构建成功,说明在忽略吊销检查的前提下,证书是可信的 // 如果自定义验证构建成功,说明在忽略吊销检查的前提下,证书是可信的
// if (isChainValid) if (isChainValid)
// { {
// return true; return true;
// } }
// } }
// // Case 3: 对于其他错误(如名称不匹配 RemoteCertificateNameMismatch)或自定义验证失败, // Case 3: 对于其他错误(如名称不匹配 RemoteCertificateNameMismatch)或自定义验证失败,
// // 我们认为证书无效。 // 我们认为证书无效。
// Debug.LogErrorFormat("证书验证失败. SslPolicyErrors: {0}", sslPolicyErrors); Debug.LogErrorFormat("证书验证失败. SslPolicyErrors: {0}", sslPolicyErrors);
// return false; return false;
} }
} }
...@@ -53,13 +53,13 @@ public class SelectServer : WindowServantSP ...@@ -53,13 +53,13 @@ public class SelectServer : WindowServantSP
set_version("0x" + String.Format("{0:X}", Config.ClientVersion)); set_version("0x" + String.Format("{0:X}", Config.ClientVersion));
//方便免修改 [selectServerWithRoomlist.prefab] //方便免修改 [selectServerWithRoomlist.prefab]
serversList.items.Add("[OCG]MYGO"); serversList.items.Add("[OCG]Koishi");
serversList.items.Add("[OCG]MYGO 2");
serversList.items.Add("[OCG]EXP");
serversList.items.Add("[OCG]233 1"); serversList.items.Add("[OCG]233 1");
serversList.items.Add("[OCG]233 2"); serversList.items.Add("[OCG]233 2");
serversList.items.Add("[OCG]233 约战"); serversList.items.Add("[OCG]233 约战");
serversList.items.Add("[OCG]Koishi"); serversList.items.Add("[OCG]MYGO");
serversList.items.Add("[OCG]MYGO 2");
serversList.items.Add("[OCG]EXP");
serversList.items.Add("决斗编年史"); serversList.items.Add("决斗编年史");
serversList.items.Add("2Pick轮抽"); serversList.items.Add("2Pick轮抽");
if ( if (
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment