Feature: enable sniff & disable tun for premium
This commit is contained in:
1 parent
a56b372a39
commit
c2c09f52cc
3 files changed
+32
No files matched your search
@@ -22,6 +22,8 @@ var processors = []processor{
|
|||||||
patchProfile,
|
patchProfile,
|
||||||
patchDns,
|
patchDns,
|
||||||
patchProviders,
|
patchProviders,
|
||||||
|
patchTun,
|
||||||
|
patchSniff,
|
||||||
validConfig,
|
validConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
Reference in new issue
Block a user