mirror of
https://github.com/fatedier/frp.git
synced 2025-07-22 22:01:55 +07:00
add remoteAddr in NewProxyResp message
This commit is contained in:
@ -110,3 +110,12 @@ func PortRangesCut(portRanges [][2]int64, port int64) [][2]int64 {
|
||||
}
|
||||
return tmpRanges
|
||||
}
|
||||
|
||||
func CanonicalAddr(host string, port int) (addr string) {
|
||||
if port == 80 || port == 443 {
|
||||
addr = host
|
||||
} else {
|
||||
addr = fmt.Sprintf("%s:%d", host, port)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user