Skip to content

Commit

Permalink
Chore: remove unused parameter netType (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr328 authored Apr 24, 2020
1 parent 0e56c19 commit 2047b8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions adapters/inbound/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ func (s *SocketAdapter) Metadata() *C.Metadata {
}

// 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.NetWork = netType
metadata.NetWork = C.TCP
metadata.Type = source
if ip, port, err := parseAddr(conn.RemoteAddr().String()); err == nil {
metadata.SrcIP = ip
Expand Down
2 changes: 1 addition & 1 deletion proxy/redir/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ func handleRedir(conn net.Conn) {
return
}
conn.(*net.TCPConn).SetKeepAlive(true)
tunnel.Add(inbound.NewSocket(target, conn, C.REDIR, C.TCP))
tunnel.Add(inbound.NewSocket(target, conn, C.REDIR))
}
2 changes: 1 addition & 1 deletion proxy/socks/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ func handleSocks(conn net.Conn) {
io.Copy(ioutil.Discard, conn)
return
}
tunnel.Add(adapters.NewSocket(target, conn, C.SOCKS, C.TCP))
tunnel.Add(adapters.NewSocket(target, conn, C.SOCKS))
}

0 comments on commit 2047b8e

Please sign in to comment.