mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
improvement(proxy): don't panic on invalid relayURL
Though prior to this change the panic could only happen if the default relayURL set by the proxy is invalid, since `datachannelHandler` is only called after a succesful `checkIsRelayURLAcceptable()`, which ensures that it _is_ valid. But in the case of invalid default relay URL, a warning is printed already.
This commit is contained in:
parent
71828580bb
commit
0f0f118827
1 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,8 @@ func (sf *SnowflakeProxy) datachannelHandler(conn *webRTCConn, remoteAddr net.Ad
|
|||
|
||||
u, err := url.Parse(relayURL)
|
||||
if err != nil {
|
||||
log.Fatalf("invalid relay url: %s", err)
|
||||
log.Printf("invalid relay url: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
if remoteAddr != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue