mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
make tun config compatible with premium
This commit is contained in:
parent
9475799615
commit
ba6fdd2962
@ -209,7 +209,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
|
||||
Tun: Tun{
|
||||
Enable: false,
|
||||
Stack: "gvisor",
|
||||
DnsHijack: []string{"192.18.0.2:53"},
|
||||
DnsHijack: []string{"0.0.0.0:53"},
|
||||
AutoRoute: true,
|
||||
AutoDetectInterface: true,
|
||||
},
|
||||
|
@ -38,8 +38,8 @@ type tunLinux struct {
|
||||
|
||||
// OpenTunDevice return a TunDevice according a URL
|
||||
func OpenTunDevice(tunAddress string, autoRoute bool) (TunDevice, error) {
|
||||
deviceURL, _ := url.Parse("dev://meta")
|
||||
mtu, _ := strconv.ParseInt(deviceURL.Query().Get("mtu"), 0, 32)
|
||||
deviceURL, _ := url.Parse("dev://meta?mtu=9000")
|
||||
mtu, _ := strconv.ParseUint(deviceURL.Query().Get("mtu"), 10, 32)
|
||||
|
||||
t := &tunLinux{
|
||||
url: deviceURL.String(),
|
||||
|
Loading…
Reference in New Issue
Block a user