mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 08:47:09 +00:00
chore: add some comments for the fingerprint verifier
This commit is contained in:
@@ -103,6 +103,9 @@ func GetTLSConfig(opt Option) (tlsConfig *tls.Config, err error) {
|
||||
return nil, err
|
||||
}
|
||||
tlsConfig.VerifyConnection = func(state tls.ConnectionState) error {
|
||||
// [ConnectionState.ServerName] can return the actual ServerName needed for verification,
|
||||
// avoiding inconsistencies caused by [tlsConfig.ServerName] being modified after the [NewFingerprintVerifier] call.
|
||||
// https://github.com/golang/go/issues/36736#issuecomment-587925536
|
||||
return verifier(state.PeerCertificates, state.ServerName)
|
||||
}
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
|
||||
Reference in New Issue
Block a user