Feature: enable sniff & disable tun for premium

This commit is contained in:
Kr328
2022-07-01 13:50:32 +08:00
parent a56b372a39
commit c2c09f52cc
3 changed files with 32 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ var processors = []processor{
patchProfile, patchProfile,
patchDns, patchDns,
patchProviders, patchProviders,
patchTun,
patchSniff,
validConfig, validConfig,
} }

View File

@@ -0,0 +1,13 @@
//go:build !premium
package config
import "github.com/Dreamacro/clash/config"
func patchTun(cfg *config.RawConfig, _ string) error {
return nil
}
func patchSniff(cfg *config.RawConfig, _ string) error {
return nil
}

View File

@@ -0,0 +1,17 @@
//go:build premium
package config
import "github.com/Dreamacro/clash/config"
func patchTun(cfg *config.RawConfig, _ string) error {
cfg.Tun.Enable = false
return nil
}
func patchSniff(cfg *config.RawConfig, _ string) error {
cfg.Experimental.SniffTLSSNI = true
return nil
}