This is an automated email from the git hooks/post-receive script.
meskio pushed a change to branch main in repository pluggable-transports/snowflake.
from 39df9b3 Fix uTLS issue number in ChangeLog. new 10c8173 proxy: Fix ephemeral ports range CLI flag (again) new 21d7449 proxy: Check ephemeral port range ordering at flag parsing new ac85628 Merge remote-tracking branch 'gitlab/mr/107'
The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: proxy/lib/snowflake.go | 5 ++++- proxy/main.go | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-)
This is an automated email from the git hooks/post-receive script.
meskio pushed a commit to branch main in repository pluggable-transports/snowflake.
commit 10c8173120cd205b54f446c9d0671572e8acc20b Author: KokaKiwi kokakiwi+tor@kokakiwi.net AuthorDate: Wed Oct 12 19:33:38 2022 +0200
proxy: Fix ephemeral ports range CLI flag (again) --- proxy/lib/snowflake.go | 5 ++++- proxy/main.go | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/proxy/lib/snowflake.go b/proxy/lib/snowflake.go index 6891be0..f8a0f2c 100644 --- a/proxy/lib/snowflake.go +++ b/proxy/lib/snowflake.go @@ -354,7 +354,10 @@ func (sf *SnowflakeProxy) makeWebRTCAPI() *webrtc.API { settingsEngine := webrtc.SettingEngine{}
if sf.EphemeralMinPort != 0 && sf.EphemeralMaxPort != 0 { - settingsEngine.SetEphemeralUDPPortRange(sf.EphemeralMinPort, sf.EphemeralMaxPort) + err := settingsEngine.SetEphemeralUDPPortRange(sf.EphemeralMinPort, sf.EphemeralMaxPort) + if err != nil { + log.Fatal("Invalid port range: min > max") + } }
settingsEngine.SetICEMulticastDNSMode(ice.MulticastDNSModeDisabled) diff --git a/proxy/main.go b/proxy/main.go index 38c07b0..146a1f3 100644 --- a/proxy/main.go +++ b/proxy/main.go @@ -2,7 +2,6 @@ package main
import ( "flag" - "fmt" "io" "io/ioutil" "log" @@ -31,7 +30,7 @@ func main() { SummaryInterval := flag.Duration("summary-interval", time.Hour, "the time interval to output summary, 0s disables summaries. Valid time units are "s", "m", "h". ") verboseLogging := flag.Bool("verbose", false, "increase log verbosity") - ephemeralPortsRangeFlag := flag.String("ephemeral-ports-range", "ICE UDP ephemeral ports range (format:"[min]:[max]")", "") + ephemeralPortsRangeFlag := flag.String("ephemeral-ports-range", "", "ICE UDP ephemeral ports range (format:"<min>:<max>")")
var ephemeralPortsRange []uint16 = []uint16{0, 0}
@@ -52,10 +51,14 @@ func main() { log.Fatal(err) }
+ if ephemeralMinPort == 0 || ephemeralMaxPort == 0 { + log.Fatal("Ephemeral port cannot be zero") + } + ephemeralPortsRange = []uint16{uint16(ephemeralMinPort), uint16(ephemeralMaxPort)} + } else { + log.Fatalf("Bad range port format: %v", *ephemeralPortsRangeFlag) } - - fmt.Printf("Bad range port format: %v", ephemeralPortsRangeFlag) }
proxy := sf.SnowflakeProxy{
This is an automated email from the git hooks/post-receive script.
meskio pushed a commit to branch main in repository pluggable-transports/snowflake.
commit 21d74498518a600f9ad2124cb4da23d721b7fb41 Author: KokaKiwi kokakiwi+tor@kokakiwi.net AuthorDate: Fri Oct 14 21:40:07 2022 +0200
proxy: Check ephemeral port range ordering at flag parsing --- proxy/main.go | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/proxy/main.go b/proxy/main.go index 146a1f3..ea8f427 100644 --- a/proxy/main.go +++ b/proxy/main.go @@ -54,6 +54,9 @@ func main() { if ephemeralMinPort == 0 || ephemeralMaxPort == 0 { log.Fatal("Ephemeral port cannot be zero") } + if ephemeralMinPort > ephemeralMaxPort { + log.Fatal("Invalid port range: min > max") + }
ephemeralPortsRange = []uint16{uint16(ephemeralMinPort), uint16(ephemeralMaxPort)} } else {
This is an automated email from the git hooks/post-receive script.
meskio pushed a commit to branch main in repository pluggable-transports/snowflake.
commit ac8562803ab9621d037bd1b3710c59799c7aa6d5 Merge: 39df9b3 21d7449 Author: meskio meskio@torproject.org AuthorDate: Mon Oct 17 12:36:19 2022 +0200
Merge remote-tracking branch 'gitlab/mr/107'
proxy/lib/snowflake.go | 5 ++++- proxy/main.go | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-)
tor-commits@lists.torproject.org