We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca5d5c8 commit a2f62a6Copy full SHA for a2f62a6
desktop_bin/run.go
@@ -9,6 +9,8 @@ import (
9
)
10
11
type runXrayConfig struct {
12
+ // tun / proxy
13
+ Mode string `json:"mode,omitempty"`
14
// tun
15
TunName string `json:"tunName,omitempty"`
16
TunPriority int `json:"tunPriority,omitempty"`
@@ -30,10 +32,12 @@ func runXray(configPath string) error {
30
32
if err != nil {
31
33
return err
34
}
- err = initIpRoute(config.TunName, config.TunPriority)
- if err != nil {
35
- return err
+ if config.Mode == "tun" {
36
+ err = initIpRoute(config.TunName, config.TunPriority)
37
+ if err != nil {
38
+ return err
39
+ }
40
+ dns.InitDns(config.Dns, config.BindInterface)
41
- dns.InitDns(config.Dns, config.BindInterface)
42
return xray.RunXray(config.DatDir, config.ConfigPath)
43
0 commit comments