mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
refactor: docstring for checkIsRelayURLAcceptable
Related: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40378.
This commit is contained in:
parent
eb13b2ff4b
commit
50bed1e67a
1 changed files with 7 additions and 1 deletions
|
@ -688,7 +688,13 @@ func (sf *SnowflakeProxy) runSession(sid string) {
|
|||
}
|
||||
}
|
||||
|
||||
// Returns nil if the relayURL is acceptable
|
||||
// Returns nil if the relayURL is acceptable.
|
||||
// This is a pure function.
|
||||
// If the hostname in the `relayURL` is not an IP address
|
||||
// (but a name instead, e.g. `localhost`),
|
||||
// this function will _not_ perform a DNS request to figure out
|
||||
// if the name resolves to a private IP address,
|
||||
// i.e. the private / public check will effectively be skipped.
|
||||
func checkIsRelayURLAcceptable(
|
||||
allowedHostNamePattern string,
|
||||
allowPrivateIPs bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue