feat(inbounds): support Unix domain socket path in Listen field (#4429)
UDS listen already worked for proxying (the listen string is passed to xray verbatim and port 0 is accepted), and the Go sub/link layer already ignores the bind listen. The only gap was the frontend resolveAddr, which would put a socket-path listen into share/sub links (e.g. vless://uuid@/run/xray/x.sock:0). resolveAddr now treats a path-style listen (starting with / or @) as having no client-reachable address and falls back to hostOverride/hostname. Adds a test and a Listen-field help hint across all locales.
This commit is contained in:
18 files changed
+55
-21
No files matched your search
@@ -245,10 +245,7 @@ func (s *ClientService) SyncInbound(tx *gorm.DB, inboundId int, clients []model.
|
||||
if incoming.CreatedAt > 0 && (row.CreatedAt == 0 || incoming.CreatedAt < row.CreatedAt) {
|
||||
row.CreatedAt = incoming.CreatedAt
|
||||
}
|
||||
preservedUpdatedAt := row.UpdatedAt
|
||||
if incoming.UpdatedAt > preservedUpdatedAt {
|
||||
preservedUpdatedAt = incoming.UpdatedAt
|
||||
}
|
||||
preservedUpdatedAt := max(incoming.UpdatedAt, row.UpdatedAt)
|
||||
row.UpdatedAt = preservedUpdatedAt
|
||||
if err := tx.Save(row).Error; err != nil {
|
||||
return err
|
||||
|
||||
@@ -570,7 +570,8 @@
|
||||
"getNewCert": "احصل على شهادة جديدة",
|
||||
"mldsa65Seed": "mldsa65 Seed",
|
||||
"mldsa65Verify": "mldsa65 Verify",
|
||||
"getNewSeed": "احصل على Seed جديد"
|
||||
"getNewSeed": "احصل على Seed جديد",
|
||||
"listenHelp": "يمكنك أيضًا إدخال مسار Unix socket (مثل /run/xray/in.sock) للاستماع على socket بدلاً من منفذ TCP — في هذه الحالة اضبط المنفذ على 0."
|
||||
},
|
||||
"info": {
|
||||
"mode": "الوضع",
|
||||
|
||||
@@ -570,7 +570,8 @@
|
||||
"getNewCert": "Get New Cert",
|
||||
"mldsa65Seed": "mldsa65 Seed",
|
||||
"mldsa65Verify": "mldsa65 Verify",
|
||||
"getNewSeed": "Get New Seed"
|
||||
"getNewSeed": "Get New Seed",
|
||||
"listenHelp": "You can also enter a Unix socket path (e.g. /run/xray/in.sock) to listen on a socket instead of a TCP port — set Port to 0 in that case."
|
||||
},
|
||||
"info": {
|
||||
"mode": "Mode",
|
||||
|
||||
Loaded 3 of 18 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user