mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
webrtc.NewIceServer already does this split / validation
It also expects to be called with a non-empty string, which isn't the case with this Split which always envokes the loop at least once. If -ice was omitted, an error was logged.
This commit is contained in:
parent
58556dc07b
commit
bbb5a6aca2
1 changed files with 2 additions and 5 deletions
|
@ -145,11 +145,8 @@ func main() {
|
|||
log.Println("\n\n\n --- Starting Snowflake Client ---")
|
||||
|
||||
var iceServers IceServerList
|
||||
log.Println("IceServerList:")
|
||||
for _, server := range strings.Split(*iceServersCommas, ",") {
|
||||
// TODO: STUN / TURN url format validation?
|
||||
log.Println(server)
|
||||
option := webrtc.OptionIceServer(server)
|
||||
if len(strings.TrimSpace(*iceServersCommas)) > 0 {
|
||||
option := webrtc.OptionIceServer(*iceServersCommas)
|
||||
iceServers = append(iceServers, option)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue