Chore: remove unused parameter netType (#651)
This commit is contained in:
parent
0e56c195bb
commit
2047b8eda1
3 changed files with 4 additions and 4 deletions
|
@ -19,9 +19,9 @@ func (s *SocketAdapter) Metadata() *C.Metadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSocket is SocketAdapter generator
|
// NewSocket is SocketAdapter generator
|
||||||
func NewSocket(target socks5.Addr, conn net.Conn, source C.Type, netType C.NetWork) *SocketAdapter {
|
func NewSocket(target socks5.Addr, conn net.Conn, source C.Type) *SocketAdapter {
|
||||||
metadata := parseSocksAddr(target)
|
metadata := parseSocksAddr(target)
|
||||||
metadata.NetWork = netType
|
metadata.NetWork = C.TCP
|
||||||
metadata.Type = source
|
metadata.Type = source
|
||||||
if ip, port, err := parseAddr(conn.RemoteAddr().String()); err == nil {
|
if ip, port, err := parseAddr(conn.RemoteAddr().String()); err == nil {
|
||||||
metadata.SrcIP = ip
|
metadata.SrcIP = ip
|
||||||
|
|
|
@ -55,5 +55,5 @@ func handleRedir(conn net.Conn) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conn.(*net.TCPConn).SetKeepAlive(true)
|
conn.(*net.TCPConn).SetKeepAlive(true)
|
||||||
tunnel.Add(inbound.NewSocket(target, conn, C.REDIR, C.TCP))
|
tunnel.Add(inbound.NewSocket(target, conn, C.REDIR))
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,5 +64,5 @@ func handleSocks(conn net.Conn) {
|
||||||
io.Copy(ioutil.Discard, conn)
|
io.Copy(ioutil.Discard, conn)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
tunnel.Add(adapters.NewSocket(target, conn, C.SOCKS, C.TCP))
|
tunnel.Add(adapters.NewSocket(target, conn, C.SOCKS))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue