mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-23 05:59:49 +00:00
fix(conf): add Windows support for Unix Domain Socket
This commit is contained in:
parent
b7f21be8bc
commit
b0bf0d7fd5
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/app/dispatcher"
|
"github.com/xtls/xray-core/app/dispatcher"
|
||||||
@ -188,7 +189,7 @@ func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error) {
|
|||||||
} else {
|
} else {
|
||||||
// Listen on specific IP or Unix Domain Socket
|
// Listen on specific IP or Unix Domain Socket
|
||||||
receiverSettings.Listen = c.ListenOn.Build()
|
receiverSettings.Listen = c.ListenOn.Build()
|
||||||
listenDS := c.ListenOn.Family().IsDomain() && (c.ListenOn.Domain()[0] == '/' || c.ListenOn.Domain()[0] == '@')
|
listenDS := c.ListenOn.Family().IsDomain() && (filepath.IsAbs(c.ListenOn.Domain()) || c.ListenOn.Domain()[0] == '@')
|
||||||
listenIP := c.ListenOn.Family().IsIP() || (c.ListenOn.Family().IsDomain() && c.ListenOn.Domain() == "localhost")
|
listenIP := c.ListenOn.Family().IsIP() || (c.ListenOn.Family().IsDomain() && c.ListenOn.Domain() == "localhost")
|
||||||
if listenIP {
|
if listenIP {
|
||||||
// Listen on specific IP, must set PortList
|
// Listen on specific IP, must set PortList
|
||||||
|
Loading…
Reference in New Issue
Block a user