Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hex
ygopro2
Commits
e4c4c727
Commit
e4c4c727
authored
Aug 06, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix and update
parent
c8a0c92b
Pipeline
#39949
failed
Changes
6
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
228 additions
and
103 deletions
+228
-103
Assets/SibylSystem/Menu/Menu.cs
Assets/SibylSystem/Menu/Menu.cs
+1
-1
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+3
-3
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+1
-1
Assets/SibylSystem/ResourceManagers/GlobalCertificateManager.cs
.../SibylSystem/ResourceManagers/GlobalCertificateManager.cs
+32
-32
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+4
-4
UserSettings/Layouts/default-2021.dwlt
UserSettings/Layouts/default-2021.dwlt
+187
-62
No files found.
Assets/SibylSystem/Menu/Menu.cs
View file @
e4c4c727
...
@@ -176,7 +176,7 @@ public class Menu : WindowServantSP
...
@@ -176,7 +176,7 @@ public class Menu : WindowServantSP
{
{
isDownloadingSuperPre
=
true
;
isDownloadingSuperPre
=
true
;
// 定义常量和路径
// 定义常量和路径
const
string
downloadUrl
=
"https://cdn
02.moecube.com:444
/ygopro-super-pre/archive/ygopro-super-pre.ypk"
;
const
string
downloadUrl
=
"https://cdn
tx.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"
;
...
...
Assets/SibylSystem/Program.cs
View file @
e4c4c727
...
@@ -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://cdn
02.moecube.com:444
/koishipro/ygopro-database/zh-CN/cards.cdb"
;
string
cardsUrl
=
"https://cdn
tx.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://cdn
02.moecube.com:444
/koishipro/ygopro-database/zh-CN/lflist.conf"
;
string
lflistUrl
=
"https://cdn
tx.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://cdn
02.moecube.com:444
/koishipro/ygopro-database/zh-CN/strings.conf"
;
"https://cdn
tx.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
(
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
e4c4c727
...
@@ -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://cdn
02.moecube.com:444
/images/ygopro-images-zh-CN/"
+
pic
.
code
.
ToString
()
+
".jpg"
;
string
url
=
"https://cdn
tx.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
)
...
...
Assets/SibylSystem/ResourceManagers/GlobalCertificateManager.cs
View file @
e4c4c727
...
@@ -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
;
}
}
}
}
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
e4c4c727
...
@@ -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
(
...
...
UserSettings/Layouts/default-2021.dwlt
View file @
e4c4c727
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment