feat: 添加tls sni 嗅探
# Conflicts: # tunnel/statistic/tracker.go # tunnel/tunnel.go
This commit is contained in:
@ -14,6 +14,7 @@ type Enhancer interface {
|
||||
IsExistFakeIP(net.IP) bool
|
||||
FindHostByIP(net.IP) (string, bool)
|
||||
FlushFakeIP() error
|
||||
InsertHostByIP(net.IP, string)
|
||||
}
|
||||
|
||||
func FakeIPEnabled() bool {
|
||||
@ -56,6 +57,12 @@ func IsExistFakeIP(ip net.IP) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func InsertHostByIP(ip net.IP, host string) {
|
||||
if mapper := DefaultHostMapper; mapper != nil {
|
||||
mapper.InsertHostByIP(ip, host)
|
||||
}
|
||||
}
|
||||
|
||||
func FindHostByIP(ip net.IP) (string, bool) {
|
||||
if mapper := DefaultHostMapper; mapper != nil {
|
||||
return mapper.FindHostByIP(ip)
|
||||
|
Reference in New Issue
Block a user