mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-25 03:06:45 +08:00
fix(sub): restore client email in panel copy/QR link remark (#5532)
Display-context links (Clients page QR + Information modals and the sub info page) dropped the client email from the link fragment in 3.4.0, showing only the inbound remark. Append the email back so the imported profile keeps its per-client label: inbound-host-email when a host is set, inbound-email otherwise. The usage template stays bypassed in display context, so no traffic or expiry data leaks.
This commit is contained in:
@@ -524,13 +524,13 @@ func (s *SubService) genTemplatedRemark(inbound *model.Inbound, client model.Cli
|
||||
return ctx.configName()
|
||||
}
|
||||
|
||||
// genHostRemark builds one host endpoint's remark for a specific client. The
|
||||
// config name is always the inbound's own remark; the host's remark is surfaced
|
||||
// only through the {{HOST}} token. In the subscription body the rest of the
|
||||
// remark template still applies; displays show just the config name.
|
||||
// genHostRemark builds one host endpoint's remark for a specific client. In the
|
||||
// subscription body the {{HOST}} token carries the host's remark and the rest of
|
||||
// the template still applies; displays show the config name, host and email.
|
||||
func (s *SubService) genHostRemark(inbound *model.Inbound, client model.Client, hostRemark string, transport string) string {
|
||||
if !s.subscriptionBody {
|
||||
return remarkContext{inbound: inbound, hostRemark: hostRemark}.configName()
|
||||
name := remarkContext{inbound: inbound, hostRemark: hostRemark}.configName()
|
||||
return fallbackRemark(name, hostRemark, client.Email)
|
||||
}
|
||||
return s.genTemplatedRemark(inbound, client, hostRemark, transport)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user