Create AllowInsecure.patch

This commit is contained in:
kiddin9 2026-06-03 01:40:24 +08:00 committed by GitHub
parent 4efb3994e1
commit c09bd255af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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, ",") {