mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
proxy: Check ephemeral port range ordering at flag parsing
This commit is contained in:
parent
10c8173120
commit
21d7449851
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue