mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-22 17:46:48 +08:00
TLS ECH client: Use chrome-fingerprint and add padding; Add "h2c" and echSockopt
; Fix some issues (#4949)
Completes https://github.com/XTLS/Xray-core/pull/3813
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package tls
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -40,7 +41,7 @@ func TestECHDial(t *testing.T) {
|
||||
}
|
||||
wg.Wait()
|
||||
// check cache
|
||||
echConfigCache, ok := GlobalECHConfigCache.Load("encryptedsni.com|udp://1.1.1.1")
|
||||
echConfigCache, ok := GlobalECHConfigCache.Load("encryptedsni.com|udp://1.1.1.1" + "|" + fmt.Sprintf("%p", config.EchSocketSettings))
|
||||
if !ok {
|
||||
t.Error("ECH config cache not found")
|
||||
|
||||
@@ -74,7 +75,7 @@ func TestECHDialFail(t *testing.T) {
|
||||
_, err = io.ReadAll(resp.Body)
|
||||
common.Must(err)
|
||||
// check cache
|
||||
echConfigCache, ok := GlobalECHConfigCache.Load("cloudflare.com|udp://1.1.1.1")
|
||||
echConfigCache, ok := GlobalECHConfigCache.Load("cloudflare.com|udp://1.1.1.1" + "|" + fmt.Sprintf("%p", config.EchSocketSettings))
|
||||
if !ok {
|
||||
t.Error("ECH config cache not found")
|
||||
}
|
||||
|
Reference in New Issue
Block a user