mirror of
https://github.com/fatedier/frp.git
synced 2026-04-28 20:19:10 +08:00
frpc: add parameter nat_hole_server_addr (#3351)
This commit is contained in:
@@ -210,8 +210,12 @@ func (sv *XTCPVisitor) handleConn(userConn net.Conn) {
|
||||
return
|
||||
}
|
||||
|
||||
serverAddr := sv.ctl.clientCfg.NatHoleServerAddr
|
||||
if serverAddr == "" {
|
||||
serverAddr = sv.ctl.clientCfg.ServerAddr
|
||||
}
|
||||
raddr, err := net.ResolveUDPAddr("udp",
|
||||
net.JoinHostPort(sv.ctl.clientCfg.ServerAddr, strconv.Itoa(sv.ctl.serverUDPPort)))
|
||||
net.JoinHostPort(serverAddr, strconv.Itoa(sv.ctl.serverUDPPort)))
|
||||
if err != nil {
|
||||
xl.Error("resolve server UDP addr error")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user