Remove integration with gotd

This commit is contained in:
9seconds
2026-02-16 16:30:10 +01:00
parent 82679ec20f
commit 8e87405d3e
14 changed files with 14 additions and 208 deletions
-1
View File
@@ -263,7 +263,6 @@ func runProxy(conf *config.Config, version string) error { //nolint: funlen
AllowFallbackOnUnknownDC: conf.AllowFallbackOnUnknownDC.Get(false),
TolerateTimeSkewness: conf.TolerateTimeSkewness.Value,
DCOverrides: dcOverrides,
DCUpdateEach: conf.DCUpdateEach.Get(0),
}
proxy, err := mtglib.NewProxy(opts)
-1
View File
@@ -80,7 +80,6 @@ func (s *SimpleRun) Run(cli *CLI, version string) error { //nolint: cyclop,funle
conf.Debug.Value = s.Debug
conf.AllowFallbackOnUnknownDC.Value = true
conf.Defense.AntiReplay.Enabled.Value = true
conf.DCUpdateEach.Value = 0
if err := conf.Validate(); err != nil {
return fmt.Errorf("invalid result configuration: %w", err)
-1
View File
@@ -68,7 +68,6 @@ type Config struct {
DC TypeDC `json:"dc"`
IPs []TypeHostPort `json:"ips"`
} `json:"dcOverrides"`
DCUpdateEach TypeDuration `json:"dcUpdateEach"`
}
func (c *Config) Validate() error {
+1 -2
View File
@@ -60,10 +60,9 @@ type tomlConfig struct {
} `toml:"prometheus" json:"prometheus,omitempty"`
} `toml:"stats" json:"stats,omitempty"`
DCOverrides []struct {
DC int `toml:"dc" json:"dc"`
DC uint `toml:"dc" json:"dc"`
IPs []string `toml:"ips" json:"ips"`
} `toml:"dc-overrides" json:"dcOverrides,omitempty"`
DCUpdateEach string `toml:"dc-update-each" json:"dcUpdateEach,omitempty"`
}
func Parse(rawData []byte) (*Config, error) {
+2 -2
View File
@@ -24,11 +24,11 @@ func (t *TypeDC) Set(value string) error {
return nil
}
func (t *TypeDC) UnmarshalText(data []byte) error {
func (t *TypeDC) UnmarshalJSON(data []byte) error {
return t.Set(string(data))
}
func (t TypeDC) MarshalText() ([]byte, error) {
func (t TypeDC) MarshalJSON() ([]byte, error) {
return []byte(t.String()), nil
}