mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Enhance testing
This commit is contained in:
parent
e22f397d84
commit
2d128985ba
2 changed files with 9 additions and 6 deletions
|
@ -682,7 +682,10 @@ func checkIsRelayURLAcceptable(
|
|||
return fmt.Errorf("rejected Relay URL: private IPs are not allowed")
|
||||
}
|
||||
} else {
|
||||
ipArray, _ := net.LookupIP(hostname)
|
||||
ipArray, err := net.LookupIP(hostname)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Could not look up IP %s", hostname)
|
||||
}
|
||||
for _, ip := range ipArray {
|
||||
if !isRemoteAddress(ip) {
|
||||
return fmt.Errorf("rejected Relay URL: private IPs are not allowed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue