From c09bd255afeb4c36e9be65ab6c5a38315763b57d Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Wed, 3 Jun 2026 01:40:24 +0800 Subject: [PATCH] Create AllowInsecure.patch --- .../xray-core/patches/AllowInsecure.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/diy/patches/xray-core/patches/AllowInsecure.patch diff --git a/.github/diy/patches/xray-core/patches/AllowInsecure.patch b/.github/diy/patches/xray-core/patches/AllowInsecure.patch new file mode 100644 index 00000000..7977f4dd --- /dev/null +++ b/.github/diy/patches/xray-core/patches/AllowInsecure.patch @@ -0,0 +1,16 @@ +--- a/infra/conf/transport_internet.go ++++ b/infra/conf/transport_internet.go +@@ -699,12 +699,7 @@ func (c *TLSConfig) Build() (proto.Message, error) { + config.MasterKeyLog = c.MasterKeyLog + + if c.AllowInsecure { +- if time.Now().After(time.Date(2026, 6, 1, 0, 0, 0, 0, time.UTC)) { +- return nil, errors.PrintRemovedFeatureError(`"allowInsecure"`, `"pinnedPeerCertSha256"`) +- } else { +- errors.LogWarning(context.Background(), `"allowInsecure" will be removed automatically after 2026-06-01, please use "pinnedPeerCertSha256"(pcs) and "verifyPeerCertByName"(vcn) instead, PLEASE CONTACT YOUR SERVICE PROVIDER (AIRPORT)`) +- config.AllowInsecure = true +- } ++ config.AllowInsecure = true + } + if c.PinnedPeerCertSha256 != "" { + for v := range strings.SplitSeq(c.PinnedPeerCertSha256, ",") {