mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
fixup! Add broker and server side rejection based on proxy version
This commit is contained in:
parent
6ec0025e93
commit
f6faa93eff
1 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ func NewBrokerContext(
|
||||||
metricsLogger,
|
metricsLogger,
|
||||||
allowedRelayPattern,
|
allowedRelayPattern,
|
||||||
presumedPatternForLegacyClient,
|
presumedPatternForLegacyClient,
|
||||||
"1.3",
|
"1.0",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ func main() {
|
||||||
flag.BoolVar(&disableGeoip, "disable-geoip", false, "don't use geoip for stats collection")
|
flag.BoolVar(&disableGeoip, "disable-geoip", false, "don't use geoip for stats collection")
|
||||||
flag.StringVar(&metricsFilename, "metrics-log", "", "path to metrics logging output")
|
flag.StringVar(&metricsFilename, "metrics-log", "", "path to metrics logging output")
|
||||||
flag.BoolVar(&unsafeLogging, "unsafe-logging", false, "prevent logs from being scrubbed")
|
flag.BoolVar(&unsafeLogging, "unsafe-logging", false, "prevent logs from being scrubbed")
|
||||||
flag.StringVar(&minProxyVersion, "min-proxy-version", "1.3", "the minimum version of the Snowflake proxy that the broker will accept")
|
flag.StringVar(&minProxyVersion, "min-proxy-version", "1.0", "the minimum version of the Snowflake proxy that the broker will accept")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
@ -266,7 +266,7 @@ func main() {
|
||||||
|
|
||||||
metricsLogger := log.New(metricsFile, "", 0)
|
metricsLogger := log.New(metricsFile, "", 0)
|
||||||
|
|
||||||
ctx := NewBrokerContext(metricsLogger, allowedRelayPattern, presumedPatternForLegacyClient)
|
ctx := NewBrokerContextWithMinProxyVersion(metricsLogger, allowedRelayPattern, presumedPatternForLegacyClient, minProxyVersion)
|
||||||
|
|
||||||
if bridgeListFilePath != "" {
|
if bridgeListFilePath != "" {
|
||||||
bridgeListFile, err := os.Open(bridgeListFilePath)
|
bridgeListFile, err := os.Open(bridgeListFilePath)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue