mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Changes from v2ray-core (#93)
This commit is contained in:
parent
85619b5a29
commit
6f25191822
14 changed files with 85 additions and 39 deletions
|
@ -1,4 +1,5 @@
|
|||
// +build !windows
|
||||
// +build !android
|
||||
|
||||
package domainsocket_test
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *S
|
|||
lc.Control = nil
|
||||
network = addr.Network()
|
||||
address = addr.Name
|
||||
if runtime.GOOS == "linux" && address[0] == '@' {
|
||||
if (runtime.GOOS == "linux" || runtime.GOOS == "android") && address[0] == '@' {
|
||||
// linux abstract unix domain socket is lockfree
|
||||
if len(address) > 1 && address[1] == '@' {
|
||||
// but may need padding to work with haproxy
|
||||
|
|
|
@ -48,7 +48,7 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSe
|
|||
Net: "unix",
|
||||
}, streamSettings.SocketSettings)
|
||||
if err != nil {
|
||||
return nil, newError("failed to listen Unix Doman Socket on ", address).Base(err)
|
||||
return nil, newError("failed to listen Unix Domain Socket on ", address).Base(err)
|
||||
}
|
||||
newError("listening Unix Domain Socket on ", address).WriteToLog(session.ExportIDToError(ctx))
|
||||
locker := ctx.Value(address.Domain())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue