Skip to content

Commit

Permalink
优化连接输出信息
Browse files Browse the repository at this point in the history
  • Loading branch information
dushixiang committed Dec 9, 2020
1 parent 547effc commit c5ae661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 4dnat.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ func copyIO(src, dest net.Conn, wg *sync.WaitGroup) {
func mutualCopyIO(conn0, conn1 net.Conn) {
wg := sync.WaitGroup{}
wg.Add(2)
log.Printf("[*] [%s <-> %s] <--> [%s <-> %s]\n", conn0.RemoteAddr().String(), conn0.LocalAddr().String(), conn1.LocalAddr().String(), conn1.RemoteAddr().String())
log.Printf("[*] [%s <-> %s] :) [%s <-> %s]\n", conn0.RemoteAddr().String(), conn0.LocalAddr().String(), conn1.LocalAddr().String(), conn1.RemoteAddr().String())
go copyIO(conn0, conn1, &wg)
go copyIO(conn1, conn0, &wg)
log.Printf("[-] [%s <-> %s] ~~~~ [%s <-> %s]\n", conn0.RemoteAddr().String(), conn0.LocalAddr().String(), conn1.LocalAddr().String(), conn1.RemoteAddr().String())
log.Printf("[-] [%s <-> %s] :( [%s <-> %s]\n", conn0.RemoteAddr().String(), conn0.LocalAddr().String(), conn1.LocalAddr().String(), conn1.RemoteAddr().String())
wg.Wait()
}

Expand Down

0 comments on commit c5ae661

Please sign in to comment.