Feature: make tls sni sniffing switch config

This commit is contained in:
yaling888
2022-05-16 01:34:25 +08:00
parent 891a56fd99
commit 3d25f16b3b
6 changed files with 48 additions and 21 deletions

View File

@ -112,6 +112,7 @@ func GetGeneral() *config.General {
Mode: tunnel.Mode(),
LogLevel: log.Level(),
IPv6: !resolver.DisableIPv6,
Sniffing: tunnel.Sniffing(),
Tun: P.GetTunConf(),
}
@ -217,6 +218,11 @@ func updateGeneral(general *config.General, force bool) {
bindAddress := general.BindAddress
P.SetBindAddress(bindAddress)
sniffing := general.Sniffing
tunnel.SetSniffing(sniffing)
log.Infoln("Use TLS SNI sniffer: %v", sniffing)
tcpIn := tunnel.TCPIn()
udpIn := tunnel.UDPIn()