From de63bf935449a25d0fcfc0d852a5e781bf666d34 Mon Sep 17 00:00:00 2001 From: Igor Kamyshnikov Date: Sat, 27 Dec 2025 21:02:44 +0000 Subject: [PATCH] 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. --- sub/subService.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sub/subService.go b/sub/subService.go index 55bddf7f..8c5b8af3 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -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 "" }