TCP TProxy implementation, no UDP or ACL support yet

This commit is contained in:
Toby
2021-04-24 02:56:17 -07:00
parent 444bb5daec
commit 787ed14c4d
7 changed files with 138 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ func Pipe2Way(rw1, rw2 io.ReadWriter, count func(int)) error {
return <-errChan
}
func PipePairWithTimeout(conn *net.TCPConn, stream io.ReadWriteCloser, timeout time.Duration) error {
func PipePairWithTimeout(conn net.Conn, stream io.ReadWriteCloser, timeout time.Duration) error {
errChan := make(chan error, 2)
// TCP to stream
go func() {