Update uTLS usage

* Update new uTLS fingerprints

* Update documentation
This commit is contained in:
Hellojack 2022-10-26 19:31:57 +08:00 committed by 世界
parent 22f06f582b
commit 217ffb2f95
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 19 additions and 5 deletions

View file

@ -3,7 +3,6 @@
package tls package tls
import ( import (
"context"
"crypto/tls" "crypto/tls"
"crypto/x509" "crypto/x509"
"net" "net"
@ -42,10 +41,6 @@ type utlsConnWrapper struct {
*utls.UConn *utls.UConn
} }
func (c *utlsConnWrapper) HandshakeContext(ctx context.Context) error {
return c.UConn.Handshake()
}
func (c *utlsConnWrapper) ConnectionState() tls.ConnectionState { func (c *utlsConnWrapper) ConnectionState() tls.ConnectionState {
state := c.Conn.ConnectionState() state := c.Conn.ConnectionState()
return tls.ConnectionState{ return tls.ConnectionState{
@ -140,6 +135,14 @@ func newUTLSClient(router adapter.Router, serverAddress string, options option.O
id = utls.HelloChrome_Auto id = utls.HelloChrome_Auto
case "firefox": case "firefox":
id = utls.HelloFirefox_Auto id = utls.HelloFirefox_Auto
case "edge":
id = utls.HelloEdge_Auto
case "safari":
id = utls.HelloSafari_Auto
case "360":
id = utls.Hello360_Auto
case "qq":
id = utls.HelloQQ_Auto
case "ios": case "ios":
id = utls.HelloIOS_Auto id = utls.HelloIOS_Auto
case "android": case "android":

View file

@ -192,10 +192,15 @@ Available fingerprint values:
* chrome * chrome
* firefox * firefox
* edge
* safari
* 360
* qq
* ios * ios
* android * android
* random * random
Chrome fingerprint will be used if empty.
### ACME Fields ### ACME Fields

View file

@ -192,10 +192,16 @@ uTLS 是 "crypto/tls" 的一个分支,它提供了 ClientHello 指纹识别阻
* chrome * chrome
* firefox * firefox
* edge
* safari
* 360
* qq
* ios * ios
* android * android
* random * random
默认使用 chrome 指纹。
### ACME 字段 ### ACME 字段
!!! warning "" !!! warning ""