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

@ -13,10 +13,6 @@ import (
"github.com/Dreamacro/clash/tunnel"
)
var (
tun = tunnel.Instance()
)
type SockListener struct {
net.Listener
address string
@ -68,5 +64,5 @@ func handleSocks(conn net.Conn) {
io.Copy(ioutil.Discard, conn)
return
}
tun.Add(adapters.NewSocket(target, conn, C.SOCKS, C.TCP))
tunnel.Add(adapters.NewSocket(target, conn, C.SOCKS, C.TCP))
}