Skip to content

Commit

Permalink
fix(stuninput): sync with tor-browser-build
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed May 31, 2023
1 parent bc54bee commit df9677a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions internal/stuninput/stuninput.go
Expand Up @@ -9,23 +9,24 @@ import (

// TODO(bassosimone): we need to keep this list in sync with
// the list internally used by TPO's snowflake.
var inputs = []string{
"stun.voip.blackberry.com:3478",
"stun.antisip.com:3478",
"stun.bluesip.net:3478",
"stun.dus.net:3478",
"stun.epygi.com:3478",
"stun.sonetel.com:3478",
"stun.sonetel.net:3478",
"stun.uls.co.za:3478",
"stun.voipgate.com:3478",
"stun.voys.nl:3478",
//
// We should sync with https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/blob/main/projects/common/bridges_list.snowflake.txt
var inputs = map[string]bool{
"stun.l.google.com:19302": true,
"stun.antisip.com:3478": true,
"stun.bluesip.net:3478": true,
"stun.dus.net:3478": true,
"stun.epygi.com:3478": true,
"stun.sonetel.com:3478": true,
"stun.uls.co.za:3478": true,
"stun.voipgate.com:3478": true,
"stun.voys.nl:3478": true,
}

// AsSnowflakeInput formats the input in the format
// that is expected by snowflake.
func AsSnowflakeInput() (output []string) {
for _, input := range inputs {
for input := range inputs {
output = append(output, fmt.Sprintf("stun:%s", input))
}
return
Expand All @@ -34,7 +35,7 @@ func AsSnowflakeInput() (output []string) {
// AsnStunReachabilityInput formats the input in
// the format that is expected by stunreachability.
func AsnStunReachabilityInput() (output []string) {
for _, input := range inputs {
for input := range inputs {
serio := (&url.URL{Scheme: "stun", Host: input})
output = append(output, serio.String())
}
Expand Down

0 comments on commit df9677a

Please sign in to comment.