Feature: enable sniff & disable tun for premium
This commit is contained in:
@@ -22,6 +22,8 @@ var processors = []processor{
|
||||
patchProfile,
|
||||
patchDns,
|
||||
patchProviders,
|
||||
patchTun,
|
||||
patchSniff,
|
||||
validConfig,
|
||||
}
|
||||
|
||||
|
||||
13
core/src/main/golang/native/config/process_open.go
Normal file
13
core/src/main/golang/native/config/process_open.go
Normal 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
|
||||
}
|
||||
17
core/src/main/golang/native/config/process_premium.go
Normal file
17
core/src/main/golang/native/config/process_premium.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user