chore: Remove legacy XTLS support (#645)

* chore: Remove legacy XTLS support

* chore: Rename function
This commit is contained in:
Hellojack
2023-07-16 23:26:07 +08:00
committed by GitHub
parent cbb8ef5dfe
commit a82745f544
10 changed files with 55 additions and 264 deletions

View File

@@ -4,7 +4,6 @@ import (
"bytes"
"context"
"crypto/tls"
xtls "github.com/xtls/go"
"net"
"net/netip"
"strconv"
@@ -17,9 +16,8 @@ import (
)
var (
globalClientSessionCache tls.ClientSessionCache
globalClientXSessionCache xtls.ClientSessionCache
once sync.Once
globalClientSessionCache tls.ClientSessionCache
once sync.Once
)
func tcpKeepAlive(c net.Conn) {
@@ -36,13 +34,6 @@ func getClientSessionCache() tls.ClientSessionCache {
return globalClientSessionCache
}
func getClientXSessionCache() xtls.ClientSessionCache {
once.Do(func() {
globalClientXSessionCache = xtls.NewLRUClientSessionCache(128)
})
return globalClientXSessionCache
}
func serializesSocksAddr(metadata *C.Metadata) []byte {
var buf [][]byte
addrType := metadata.AddrType()