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
+4
View File
@@ -4,6 +4,7 @@ import (
"crypto/sha256"
"fmt"
"trojan/core"
"trojan/managerconfig"
"trojan/util"
)
@@ -52,5 +53,8 @@ func SetDomain(domain string) {
// GetDomainAndPort 获取域名和端口
func GetDomainAndPort() (string, int) {
config := core.GetConfig()
if managed, err := managerconfig.Load(); err == nil && managed.Public.Port != 0 {
return config.SSl.Sni, managed.Public.Port
}
return config.SSl.Sni, config.LocalPort
}