chore: remove Script mode residual code.

This commit is contained in:
CHIZI-0618
2022-05-14 13:00:33 +08:00
parent d4dcbce9cb
commit 5bd5f1bfda
7 changed files with 0 additions and 51 deletions

View File

@ -29,7 +29,6 @@ var Path = func() *path {
type path struct {
homeDir string
configFile string
scriptDir string
}
// SetHomeDir is used to set the configuration path
@ -123,23 +122,6 @@ func (p *path) GeoSite() string {
return P.Join(p.homeDir, "GeoSite.dat")
}
func (p *path) ScriptDir() string {
if len(p.scriptDir) != 0 {
return p.scriptDir
}
if dir, err := os.MkdirTemp("", Name+"-"); err == nil {
p.scriptDir = dir
} else {
p.scriptDir = P.Join(os.TempDir(), Name)
_ = os.MkdirAll(p.scriptDir, 0o644)
}
return p.scriptDir
}
func (p *path) Script() string {
return P.Join(p.ScriptDir(), "clash_script.py")
}
func (p *path) GetAssetLocation(file string) string {
return P.Join(p.homeDir, file)
}

View File

@ -13,7 +13,6 @@ const (
DstPort
Process
ProcessPath
Script
RuleSet
Network
Uid
@ -49,8 +48,6 @@ func (rt RuleType) String() string {
return "Process"
case ProcessPath:
return "ProcessPath"
case Script:
return "Script"
case MATCH:
return "Match"
case RuleSet: