Merge pull request #216 from 9seconds/configure-fallback-dc

Add configuration option allow-fallback-on-unknown-dc
This commit is contained in:
Sergey Arkhipov
2021-10-04 15:09:47 +03:00
committed by GitHub
7 changed files with 66 additions and 36 deletions
+2
View File
@@ -184,6 +184,8 @@ func runProxy(conf *config.Config, version string) error {
BufferSize: conf.TCPBuffer.Get(mtglib.DefaultBufferSize),
DomainFrontingPort: conf.DomainFrontingPort.Get(mtglib.DefaultDomainFrontingPort),
PreferIP: conf.PreferIP.Get(mtglib.DefaultPreferIP),
AllowFallbackOnUnknownDC: conf.AllowFallbackOnUnknownDC.Get(false),
}
proxy, err := mtglib.NewProxy(opts)
+1
View File
@@ -71,6 +71,7 @@ func (s *SimpleRun) Run(cli *CLI, version string) error { // nolint: cyclop
}
conf.Debug.Value = s.Debug
conf.AllowFallbackOnUnknownDC.Value = true
conf.Defense.AntiReplay.Enabled.Value = true
if err := conf.Validate(); err != nil {