make tun config compatible with premium
This commit is contained in:
parent
13392ea6b4
commit
b1ce65f78c
1 changed files with 8 additions and 10 deletions
|
@ -98,11 +98,10 @@ type Profile struct {
|
||||||
|
|
||||||
// Tun config
|
// Tun config
|
||||||
type Tun struct {
|
type Tun struct {
|
||||||
Enable bool `yaml:"enable" json:"enable"`
|
Enable bool `yaml:"enable" json:"enable"`
|
||||||
Stack string `yaml:"stack" json:"stack"`
|
Stack string `yaml:"stack" json:"stack"`
|
||||||
DnsHijack []string `yaml:"dns-hijack" json:"dns-hijack"`
|
DnsHijack []string `yaml:"dns-hijack" json:"dns-hijack"`
|
||||||
AutoRoute bool `yaml:"auto-route" json:"auto-route"`
|
AutoRoute bool `yaml:"auto-route" json:"auto-route"`
|
||||||
AutoDetectInterface bool `yaml:"auto-detect-interface" json:"auto-detect-interface"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Script config
|
// Script config
|
||||||
|
@ -207,11 +206,10 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
|
||||||
Proxy: []map[string]interface{}{},
|
Proxy: []map[string]interface{}{},
|
||||||
ProxyGroup: []map[string]interface{}{},
|
ProxyGroup: []map[string]interface{}{},
|
||||||
Tun: Tun{
|
Tun: Tun{
|
||||||
Enable: false,
|
Enable: false,
|
||||||
Stack: "gvisor",
|
Stack: "gvisor",
|
||||||
DnsHijack: []string{"192.18.0.2:53"},
|
DnsHijack: []string{"192.18.0.2:53"},
|
||||||
AutoRoute: true,
|
AutoRoute: true,
|
||||||
AutoDetectInterface: true,
|
|
||||||
},
|
},
|
||||||
DNS: RawDNS{
|
DNS: RawDNS{
|
||||||
Enable: false,
|
Enable: false,
|
||||||
|
|
Loading…
Reference in a new issue