feat: Support user specify udp packet size in config (#1794)

This commit is contained in:
Tank
2020-05-07 17:47:36 +08:00
committed by GitHub
parent 7266154d54
commit d193519329
8 changed files with 43 additions and 8 deletions

View File

@ -196,7 +196,7 @@ func (pxy *UdpProxy) Run() (remoteAddr string, err error) {
// Response will be wrapped to be forwarded by work connection to server.
// Close readCh and sendCh at the end.
go func() {
udp.ForwardUserConn(udpConn, pxy.readCh, pxy.sendCh)
udp.ForwardUserConn(udpConn, pxy.readCh, pxy.sendCh, int(pxy.serverCfg.UdpPacketSize))
pxy.Close()
}()
return remoteAddr, nil