mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-28 15:14:34 +08:00
speed test
This commit is contained in:
parent
a75879109a
commit
ccd76f438b
2 changed files with 4 additions and 4 deletions
|
|
@ -59,7 +59,7 @@ func (p *Proxy) ProxyToRemote() {
|
|||
log.Println("ERRR READ: ", err)
|
||||
continue
|
||||
}
|
||||
go func() {
|
||||
go func(buf []byte, n int) {
|
||||
|
||||
if peerI, ok := peers[p.Config.RemoteKey]; ok {
|
||||
var srcPeerKeyHash, dstPeerKeyHash string
|
||||
|
|
@ -80,7 +80,7 @@ func (p *Proxy) ProxyToRemote() {
|
|||
if err != nil {
|
||||
log.Println("Failed to send to remote: ", err)
|
||||
}
|
||||
}()
|
||||
}(buf, n)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func (p *ProxyServer) Listen(ctx context.Context) {
|
|||
log.Println("RECV ERROR: ", err)
|
||||
continue
|
||||
}
|
||||
go func() {
|
||||
go func(buffer []byte, source *net.UDPAddr, n int) {
|
||||
|
||||
var srcPeerKeyHash, dstPeerKeyHash string
|
||||
n, srcPeerKeyHash, dstPeerKeyHash = packet.ExtractInfo(buffer, n)
|
||||
|
|
@ -143,7 +143,7 @@ func (p *ProxyServer) Listen(ctx context.Context) {
|
|||
// }
|
||||
|
||||
// }
|
||||
}()
|
||||
}(buffer, source, n)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue