chore: remove Script mode residual code.
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user