refactor: replace experimental.fingerprints with custom-certificates and Change the fingerprint verification logic to SSL pinning

This commit is contained in:
Skyxim
2023-01-14 21:08:06 +08:00
parent 2095f4f670
commit b6b6413d04
19 changed files with 91 additions and 97 deletions

View File

@ -4,7 +4,6 @@ import (
"container/list"
"errors"
"fmt"
P "github.com/Dreamacro/clash/component/process"
"net"
"net/netip"
"net/url"
@ -14,6 +13,8 @@ import (
"strings"
"time"
P "github.com/Dreamacro/clash/component/process"
"github.com/Dreamacro/clash/adapter"
"github.com/Dreamacro/clash/adapter/outbound"
"github.com/Dreamacro/clash/adapter/outboundgroup"
@ -116,6 +117,11 @@ type Profile struct {
}
type TLS struct {
RawCert
CustomTrustCert []RawCert `yaml:"custom-certifactes"`
}
type RawCert struct {
Certificate string `yaml:"certificate"`
PrivateKey string `yaml:"private-key"`
}