Feature: add default-nameserver and outbound interface

This commit is contained in:
Dreamacro
2020-02-15 21:42:46 +08:00
parent f69f635e0b
commit d75cb069d9
28 changed files with 578 additions and 347 deletions

View File

@ -9,10 +9,6 @@ import (
"github.com/Dreamacro/clash/tunnel"
)
var (
tun = tunnel.Instance()
)
type RedirListener struct {
net.Listener
address string
@ -59,5 +55,5 @@ func handleRedir(conn net.Conn) {
return
}
conn.(*net.TCPConn).SetKeepAlive(true)
tun.Add(inbound.NewSocket(target, conn, C.REDIR, C.TCP))
tunnel.Add(inbound.NewSocket(target, conn, C.REDIR, C.TCP))
}