mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
fixed binding issues
This commit is contained in:
parent
32ce704189
commit
70db0f727f
1 changed files with 6 additions and 1 deletions
|
@ -122,10 +122,15 @@ func (d *VirtualTun) TCPHandle(s *socks5.Server, c *net.TCPConn, r *socks5.Reque
|
|||
return fmt.Errorf("nat table is full")
|
||||
}
|
||||
}
|
||||
conn, err := d.tnet.ListenUDP(&net.UDPAddr{IP: unspecifiedIP, Port: caddr.Port})
|
||||
laddr, err := net.ResolveUDPAddr("udp", fmt.Sprintf(":%d", mappedPort))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
conn, err := d.tnet.ListenUDP(laddr)
|
||||
if err != nil {
|
||||
fmt.Println("fic")
|
||||
return err
|
||||
}
|
||||
entry := &NatEntry{
|
||||
key: srcAddr,
|
||||
srcAddr: caddr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue