mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Use a config struct for snowflake client options
This commit is contained in:
parent
e6715cb4ee
commit
4acc08cc60
2 changed files with 23 additions and 8 deletions
|
@ -141,8 +141,15 @@ func main() {
|
|||
|
||||
iceAddresses := strings.Split(strings.TrimSpace(*iceServersCommas), ",")
|
||||
|
||||
transport, err := sf.NewSnowflakeClient(*brokerURL, *ampCacheURL, *frontDomain, iceAddresses,
|
||||
*keepLocalAddresses || *oldKeepLocalAddresses, *max)
|
||||
config := sf.ClientConfig{
|
||||
BrokerURL: *brokerURL,
|
||||
AmpCacheURL: *ampCacheURL,
|
||||
FrontDomain: *frontDomain,
|
||||
ICEAddresses: iceAddresses,
|
||||
KeepLocalAddresses: *keepLocalAddresses || *oldKeepLocalAddresses,
|
||||
Max: *max,
|
||||
}
|
||||
transport, err := sf.NewSnowflakeClient(config)
|
||||
if err != nil {
|
||||
log.Fatal("Failed to start snowflake transport: ", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue