feat: add compatible Trojan manager image

This commit is contained in:
chermack
2026-07-26 05:01:15 +08:00
parent 059be96536
commit cb17d56cae
26 changed files with 320 additions and 41 deletions
+6 -6
View File
@@ -48,20 +48,20 @@ func ControlMenu() {
}
// Restart 重启trojan
func Restart() {
func Restart() error {
util.OpenPort(core.GetConfig().LocalPort)
util.SystemctlRestart("trojan")
return util.SystemctlRestart("trojan")
}
// Start 启动trojan
func Start() {
func Start() error {
util.OpenPort(core.GetConfig().LocalPort)
util.SystemctlStart("trojan")
return util.SystemctlStart("trojan")
}
// Stop 停止trojan
func Stop() {
util.SystemctlStop("trojan")
func Stop() error {
return util.SystemctlStop("trojan")
}
// Status 获取trojan状态