|
|
@@ -10,13 +10,14 @@ import (
|
|
10
|
10
|
)
|
|
11
|
11
|
|
|
12
|
12
|
type Config struct {
|
|
13
|
|
- Debug bool `json:"debug"`
|
|
14
|
|
- Secret mtglib.Secret `json:"secret"`
|
|
15
|
|
- BindTo TypeHostPort `json:"bind-to"`
|
|
16
|
|
- TCPBuffer TypeBytes `json:"tcp-buffer"`
|
|
17
|
|
- PreferIP TypePreferIP `json:"prefer-ip"`
|
|
18
|
|
- CloakPort TypePort `json:"cloak-port"`
|
|
19
|
|
- Defense struct {
|
|
|
13
|
+ Debug bool `json:"debug"`
|
|
|
14
|
+ Secret mtglib.Secret `json:"secret"`
|
|
|
15
|
+ BindTo TypeHostPort `json:"bind-to"`
|
|
|
16
|
+ TCPBuffer TypeBytes `json:"tcp-buffer"`
|
|
|
17
|
+ PreferIP TypePreferIP `json:"prefer-ip"`
|
|
|
18
|
+ CloakPort TypePort `json:"cloak-port"`
|
|
|
19
|
+ Concurrency uint `json:"concurrency"`
|
|
|
20
|
+ Defense struct {
|
|
20
|
21
|
Time struct {
|
|
21
|
22
|
Enabled bool `json:"enabled"`
|
|
22
|
23
|
AllowSkewness TypeDuration `json:"allow-skewness"`
|
|
|
@@ -80,13 +81,14 @@ func (c *Config) String() string {
|
|
80
|
81
|
}
|
|
81
|
82
|
|
|
82
|
83
|
type configRaw struct {
|
|
83
|
|
- Debug bool `toml:"debug" json:"debug,omitempty"`
|
|
84
|
|
- Secret string `toml:"secret" json:"secret"`
|
|
85
|
|
- BindTo string `toml:"bind-to" json:"bind-to"`
|
|
86
|
|
- TCPBuffer string `toml:"tcp-buffer" json:"tcp-buffer,omitempty"`
|
|
87
|
|
- PreferIP string `toml:"prefer-ip" json:"prefer-ip,omitempty"`
|
|
88
|
|
- CloakPort uint `toml:"cloak-port" json:"cloak-port,omitempty"`
|
|
89
|
|
- Defense struct {
|
|
|
84
|
+ Debug bool `toml:"debug" json:"debug,omitempty"`
|
|
|
85
|
+ Secret string `toml:"secret" json:"secret"`
|
|
|
86
|
+ BindTo string `toml:"bind-to" json:"bind-to"`
|
|
|
87
|
+ TCPBuffer string `toml:"tcp-buffer" json:"tcp-buffer,omitempty"`
|
|
|
88
|
+ PreferIP string `toml:"prefer-ip" json:"prefer-ip,omitempty"`
|
|
|
89
|
+ CloakPort uint `toml:"cloak-port" json:"cloak-port,omitempty"`
|
|
|
90
|
+ Concurrency uint `toml:"concurrency" json:"concurrency,omitempty"`
|
|
|
91
|
+ Defense struct {
|
|
90
|
92
|
Time struct {
|
|
91
|
93
|
Enabled bool `toml:"enabled" json:"enabled,omitempty"`
|
|
92
|
94
|
AllowSkewness string `toml:"allow-skewness" json:"allow-skewness,omitempty"`
|