This commit is contained in:
problematicconsumer
2024-01-19 21:27:41 +03:30
parent 2d5bb586ec
commit bb006e10d3
2 changed files with 41 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ type ConfigOptions struct {
GeoIPPath string `json:"geoip-path"`
GeoSitePath string `json:"geosite-path"`
Rules []Rule `json:"rules"`
MuxOptions
TLSTricks
}
@@ -47,6 +48,13 @@ type TLSTricks struct {
PaddingSize string `json:"tls-padding-size"`
}
type MuxOptions struct {
EnableMux bool `json:"enable-mux"`
MuxPadding bool `json:"mux-padding"`
MaxStreams int `json:"mux-max-streams"`
MuxProtocol string `json:"mux-protocol"`
}
func DefaultConfigOptions() *ConfigOptions {
return &ConfigOptions{
ExecuteAsIs: false,
@@ -76,6 +84,12 @@ func DefaultConfigOptions() *ConfigOptions {
GeoIPPath: "geoip.db",
GeoSitePath: "geosite.db",
Rules: []Rule{},
MuxOptions: MuxOptions{
EnableMux: true,
MuxPadding: true,
MaxStreams: 8,
MuxProtocol: "h2mux",
},
TLSTricks: TLSTricks{
EnableFragment: false,
FragmentSize: "10-100",