add remoteAddr in NewProxyResp message
This commit is contained in:
1 parent
9a5f0c23c4
commit
3f6799c06a
7 files changed
+102
-60
No files matched your search
@@ -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