无多路复用版本

This commit is contained in:
wenyifan
2022-09-05 14:21:33 +08:00
parent 1c49851d13
commit c4c6f1c4ff
5 changed files with 86 additions and 16 deletions

View File

@ -68,8 +68,10 @@ func handler(conn net.Conn, targetAddress string, fakeAddress string) {
if err != nil {
return
}
go io.Copy(realConnection, conn)
go io.Copy(conn, realConnection)
p := &PackAppData{Conn: conn}
go io.Copy(realConnection, p)
go io.Copy(p, realConnection)
}
func processHandshake(src net.Conn, dst net.Conn, waitCh chan int) {