mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Update Relay Pattern format to include dollar sign
This commit is contained in:
parent
ddf72025d1
commit
97dea533da
4 changed files with 24 additions and 15 deletions
|
@ -30,7 +30,6 @@ import (
|
|||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/namematcher"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
@ -43,6 +42,7 @@ import (
|
|||
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/event"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/messages"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/namematcher"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/task"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/util"
|
||||
"git.torproject.org/pluggable-transports/snowflake.git/v2/common/websocketconn"
|
||||
|
@ -582,6 +582,10 @@ func (sf *SnowflakeProxy) Start() error {
|
|||
return fmt.Errorf("invalid relay url: %s", err)
|
||||
}
|
||||
|
||||
if !namematcher.IsValidRule(sf.RelayDomainNamePattern) {
|
||||
return fmt.Errorf("invalid relay domain name pattern")
|
||||
}
|
||||
|
||||
config = webrtc.Configuration{
|
||||
ICEServers: []webrtc.ICEServer{
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue