浏览代码

Update uTLS usage

* Update new uTLS fingerprints

* Update documentation
Hellojack 3 年之前
父节点
当前提交
217ffb2f95
共有 3 个文件被更改,包括 19 次插入5 次删除
  1. 8 5
      common/tls/utls_client.go
  2. 5 0
      docs/configuration/shared/tls.md
  3. 6 0
      docs/configuration/shared/tls.zh.md

+ 8 - 5
common/tls/utls_client.go

@@ -3,7 +3,6 @@
 package tls
 
 import (
-	"context"
 	"crypto/tls"
 	"crypto/x509"
 	"net"
@@ -42,10 +41,6 @@ type utlsConnWrapper struct {
 	*utls.UConn
 }
 
-func (c *utlsConnWrapper) HandshakeContext(ctx context.Context) error {
-	return c.UConn.Handshake()
-}
-
 func (c *utlsConnWrapper) ConnectionState() tls.ConnectionState {
 	state := c.Conn.ConnectionState()
 	return tls.ConnectionState{
@@ -140,6 +135,14 @@ func newUTLSClient(router adapter.Router, serverAddress string, options option.O
 		id = utls.HelloChrome_Auto
 	case "firefox":
 		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":
 		id = utls.HelloIOS_Auto
 	case "android":

+ 5 - 0
docs/configuration/shared/tls.md

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

+ 6 - 0
docs/configuration/shared/tls.zh.md

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