Полный продакшен-рефактор fix25: split peer/admin, удаление legacy, шифрование secret, auth_id, новые API/роуты и зачистка subscription
This commit is contained in:
@@ -146,7 +146,15 @@ func Hysteria2Url(accountId int64) (string, error) {
|
||||
sni = hysteria2Config.ACME.Domains[0]
|
||||
}
|
||||
|
||||
return buildHysteria2Url(*peer.SecretCiphertext, hostname, port, obfsType, obfsPassword, sni, remark), nil
|
||||
secret := ""
|
||||
if peer.SecretEncrypted != nil {
|
||||
decrypted, decErr := DecryptPeerSecret(*peer.SecretEncrypted)
|
||||
if decErr != nil {
|
||||
return "", decErr
|
||||
}
|
||||
secret = decrypted
|
||||
}
|
||||
return buildHysteria2Url(secret, hostname, port, obfsType, obfsPassword, sni, remark), nil
|
||||
}
|
||||
|
||||
func buildHysteria2Url(conPass string, hostname string, port int, obfsType string, obfsPassword string, sni string, remark string) string {
|
||||
|
||||
Reference in New Issue
Block a user