mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Add shadowtls tls config
This commit is contained in:
parent
a620cbcf2c
commit
c095026177
@ -10,8 +10,9 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
STDConfig = tls.Config
|
||||
STDConn = tls.Conn
|
||||
STDConfig = tls.Config
|
||||
STDConn = tls.Conn
|
||||
ConnectionState = tls.ConnectionState
|
||||
)
|
||||
|
||||
type Config interface {
|
||||
@ -33,7 +34,7 @@ type ServerConfig interface {
|
||||
type Conn interface {
|
||||
net.Conn
|
||||
HandshakeContext(ctx context.Context) error
|
||||
ConnectionState() tls.ConnectionState
|
||||
ConnectionState() ConnectionState
|
||||
}
|
||||
|
||||
func ParseTLSVersion(version string) (uint16, error) {
|
||||
|
16
transport/shadowtls/config_119.go
Normal file
16
transport/shadowtls/config_119.go
Normal file
@ -0,0 +1,16 @@
|
||||
//go:build !go1.20
|
||||
|
||||
package shadowtls
|
||||
|
||||
import sTLS "github.com/sagernet/sing-box/transport/shadowtls/tls_go119"
|
||||
|
||||
type (
|
||||
sTLSConfig = sTLS.Config
|
||||
sTLSConnectionState = sTLS.ConnectionState
|
||||
sTLSConn = sTLS.Conn
|
||||
)
|
||||
|
||||
var (
|
||||
sTLSCipherSuites = sTLS.CipherSuites
|
||||
sTLSClient = sTLS.Client
|
||||
)
|
16
transport/shadowtls/config_120.go
Normal file
16
transport/shadowtls/config_120.go
Normal file
@ -0,0 +1,16 @@
|
||||
//go:build go1.20
|
||||
|
||||
package shadowtls
|
||||
|
||||
import sTLS "github.com/sagernet/sing-box/transport/shadowtls/tls"
|
||||
|
||||
type (
|
||||
sTLSConfig = sTLS.Config
|
||||
sTLSConnectionState = sTLS.ConnectionState
|
||||
sTLSConn = sTLS.Conn
|
||||
)
|
||||
|
||||
var (
|
||||
sTLSCipherSuites = sTLS.CipherSuites
|
||||
sTLSClient = sTLS.Client
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user