From 0c64d7e56ac74c148161fc77f09a3af87245b602 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Mon, 11 Jul 2022 13:44:27 +0800 Subject: [PATCH] chore: fingerprint style --- component/tls/config.go | 4 +--- docs/config.yaml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/component/tls/config.go b/component/tls/config.go index 9309b503..fc28dc81 100644 --- a/component/tls/config.go +++ b/component/tls/config.go @@ -8,7 +8,6 @@ import ( "encoding/hex" "fmt" xtls "github.com/xtls/go" - "strings" "sync" "time" ) @@ -63,8 +62,7 @@ func AddCertFingerprint(fingerprint string) error { } func convertFingerprint(fingerprint string) (*[32]byte, error) { - fp := strings.Replace(fingerprint, ":", "", -1) - fpByte, err := hex.DecodeString(fp) + fpByte, err := hex.DecodeString(fingerprint) if err != nil { return nil, err } diff --git a/docs/config.yaml b/docs/config.yaml index f791537b..18a5fb79 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -30,7 +30,7 @@ experimental: # 证书指纹,SHA256格式,补充校验TLS证书 # 可使用 openssl x509 -noout -fingerprint -sha256 -inform pem -in yourcert.pem 获取 fingerprints: - - "8F:11:1F:A9:AD:3C:D8:E9:17:A1:18:52:2C:AC:39:EA:33:74:1B:3B:BE:73:F9:1C:EC:E5:48:D5:CC:B0:E5:E8" + - "8F111FA9AD3CD8E917A118522CAC39EA33741B3BBE73F91CECE548D5CCB0E5E8" # 忽略大小写 # 类似于/etc/hosts, 仅支持配置单个IP hosts: # '*.clash.dev': 127.0.0.1