mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Check for an invalid broker URL at a higher level.
Instead of returning nil from NewBrokerChannel and having WebRTCDialer.Catch check for nil, let NewBrokerChannel return an error and bail out before calling WebRTCDialer.Catch. Suggested by cohosh. https://bugs.torproject.org/33040#comment:3
This commit is contained in:
parent
f1ab65b1c0
commit
2fb52c8639
2 changed files with 7 additions and 7 deletions
|
@ -130,7 +130,10 @@ func main() {
|
|||
snowflakes := sf.NewPeers(*max)
|
||||
|
||||
// Use potentially domain-fronting broker to rendezvous.
|
||||
broker := sf.NewBrokerChannel(*brokerURL, *frontDomain, sf.CreateBrokerTransport())
|
||||
broker, err := sf.NewBrokerChannel(*brokerURL, *frontDomain, sf.CreateBrokerTransport())
|
||||
if err != nil {
|
||||
log.Fatalf("parsing broker URL: %v", err)
|
||||
}
|
||||
snowflakes.Tongue = sf.NewWebRTCDialer(broker, iceServers)
|
||||
|
||||
// Use a real logger to periodically output how much traffic is happening.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue