mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Add NAT Type measurement command line flag
It is important to include unit in flag name to prevent user from making mistake.
This commit is contained in:
parent
4c8a166178
commit
ac97ce7136
2 changed files with 7 additions and 1 deletions
|
@ -105,6 +105,8 @@ type SnowflakeProxy struct {
|
|||
RelayURL string
|
||||
// NATProbeURL is the URL of the probe service we use for NAT checks
|
||||
NATProbeURL string
|
||||
// NATTypeMeasurementIntervalSecond is time in second before NAT type is retested
|
||||
NATTypeMeasurementIntervalSecond uint
|
||||
shutdown chan struct{}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ func main() {
|
|||
unsafeLogging := flag.Bool("unsafe-logging", false, "prevent logs from being scrubbed")
|
||||
keepLocalAddresses := flag.Bool("keep-local-addresses", false, "keep local LAN address ICE candidates")
|
||||
relayURL := flag.String("relay", sf.DefaultRelayURL, "websocket relay URL")
|
||||
NATTypeMeasurementIntervalSecond := flag.Uint("nat-type-measurement-interval-second", 0,
|
||||
"the time interval in second before NAT type is retested, 0 disables retest")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
|
@ -27,6 +29,8 @@ func main() {
|
|||
BrokerURL: *rawBrokerURL,
|
||||
KeepLocalAddresses: *keepLocalAddresses,
|
||||
RelayURL: *relayURL,
|
||||
|
||||
NATTypeMeasurementIntervalSecond: *NATTypeMeasurementIntervalSecond,
|
||||
}
|
||||
|
||||
var logOutput io.Writer = os.Stderr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue