1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-24 12:14:42 -05:00
sub2clash/model/sub.go

38 lines
1.5 KiB
Go
Raw Normal View History

2023-09-12 06:40:24 -04:00
package model
type Subscription struct {
Port int `yaml:"port,omitempty"`
SocksPort int `yaml:"socks-port,omitempty"`
2023-09-13 01:47:22 -04:00
AllowLan bool `yaml:"allow-lan"`
2023-09-12 06:40:24 -04:00
Mode string `yaml:"mode,omitempty"`
2023-09-13 01:47:22 -04:00
LogLevel string `yaml:"logger-level,omitempty"`
2023-09-12 06:40:24 -04:00
ExternalController string `yaml:"external-controller,omitempty"`
Proxies []Proxy `yaml:"proxies,omitempty"`
ProxyGroups []ProxyGroup `yaml:"proxy-groups,omitempty"`
Rules []string `yaml:"rules,omitempty"`
RuleProviders map[string]RuleProvider `yaml:"rule-providers,omitempty,omitempty"`
}
type ProxyGroup struct {
2023-09-12 12:46:17 -04:00
Name string `yaml:"name,omitempty"`
Type string `yaml:"type,omitempty"`
Proxies []string `yaml:"proxies,omitempty"`
IsCountryGrop bool `yaml:"-"`
2023-09-13 01:47:22 -04:00
Url string `yaml:"url,omitempty"`
Interval int `yaml:"interval,omitempty"`
Tolerance int `yaml:"tolerance,omitempty"`
Lazy bool `yaml:"lazy"`
2023-09-12 06:40:24 -04:00
}
type RuleProvider struct {
Type string `yaml:"type,omitempty"`
Behavior string `yaml:"behavior,omitempty"`
2023-09-13 01:47:22 -04:00
Url string `yaml:"url,omitempty"`
2023-09-12 06:40:24 -04:00
Path string `yaml:"path,omitempty"`
Interval int `yaml:"interval,omitempty"`
}
type Payload struct {
Rules []string `yaml:"payload,omitempty"`
}