Add command to connect an address

This commit is contained in:
世界
2023-03-18 20:26:58 +08:00
parent c7f89ad88e
commit e5f3bb6344
6 changed files with 204 additions and 50 deletions

View File

@@ -10,6 +10,7 @@ import (
type ClashServer interface {
Service
PreStarter
Mode() string
StoreSelected() bool
CacheFile() ClashCacheFile

15
adapter/prestart.go Normal file
View File

@@ -0,0 +1,15 @@
package adapter
type PreStarter interface {
PreStart() error
}
func PreStart(starter any) error {
if preService, ok := starter.(PreStarter); ok {
err := preService.PreStart()
if err != nil {
return err
}
}
return nil
}