mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-01-13 01:02:46 +00:00
vless: use Inbound Listen address in Subscription service
vless manual connection link and subscription produced connection link are aligned. subscription service now returns an IP address configured on Inbound, instead of subscription service IP, which is consistent when the address, returned by QR code for manual vless link distribution.
This commit is contained in:
parent
4c797dc154
commit
de63bf9354
1 changed files with 7 additions and 1 deletions
|
|
@ -317,7 +317,13 @@ func (s *SubService) genVmessLink(inbound *model.Inbound, email string) string {
|
|||
}
|
||||
|
||||
func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
|
||||
address := s.address
|
||||
var address string
|
||||
if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" {
|
||||
address = s.address
|
||||
} else {
|
||||
address = inbound.Listen
|
||||
}
|
||||
|
||||
if inbound.Protocol != model.VLESS {
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue