Loading netwerk/base/moz.build +1 −0 Original line number Diff line number Diff line Loading @@ -301,6 +301,7 @@ LOCAL_INCLUDES += [ '/docshell/base', '/dom/base', '/netwerk/protocol/http', '/netwerk/socket', '/security/pkix/include' ] Loading netwerk/base/nsProtocolProxyService.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "nsIPrefService.h" #include "nsIPrefBranch.h" #include "nsThreadUtils.h" #include "nsSOCKSIOLayer.h" #include "nsString.h" #include "nsNetUtil.h" #include "nsNetCID.h" Loading Loading @@ -387,16 +388,6 @@ proxy_GetBoolPref(nsIPrefBranch *aPrefBranch, aResult = temp; } static inline bool IsHostDomainSocket(const nsACString& aHost) { #ifdef XP_UNIX return Substring(aHost, 0, 5) == "file:"; #else return false; #endif // XP_UNIX } //---------------------------------------------------------------------------- static const int32_t PROXYCONFIG_DIRECT4X = 3; Loading Loading @@ -1862,7 +1853,7 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel, if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && !mSOCKSProxyTarget.IsEmpty() && (IsHostDomainSocket(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { (IsHostLocalTarget(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { host = &mSOCKSProxyTarget; if (mSOCKSProxyVersion == 4) type = kProxyType_SOCKS4; Loading Loading @@ -1900,7 +1891,7 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel, port = mFTPProxyPort; } else if (!mSOCKSProxyTarget.IsEmpty() && (IsHostDomainSocket(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { (IsHostLocalTarget(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { host = &mSOCKSProxyTarget; if (mSOCKSProxyVersion == 4) type = kProxyType_SOCKS4; Loading netwerk/base/nsProtocolProxyService.h +2 −1 Original line number Diff line number Diff line Loading @@ -382,7 +382,8 @@ protected: nsCString mHTTPSProxyHost; int32_t mHTTPSProxyPort; // mSOCKSProxyTarget could be a host or a domain socket path. // mSOCKSProxyTarget could be a host, a domain socket path, // or a named-pipe name. nsCString mSOCKSProxyTarget; int32_t mSOCKSProxyPort; int32_t mSOCKSProxyVersion; Loading netwerk/dns/DNS.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ void NetAddrToPRNetAddr(const NetAddr *addr, PRNetAddr *prAddr) prAddr->local.family = PR_AF_LOCAL; memcpy(prAddr->local.path, addr->local.path, sizeof(addr->local.path)); } #elif defined(XP_WIN) else if (addr->raw.family == AF_LOCAL) { prAddr->local.family = PR_AF_LOCAL; memcpy(prAddr->local.path, addr->local.path, sizeof(addr->local.path)); } #endif } Loading netwerk/dns/DNS.h +7 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ #include "winsock2.h" #endif #ifndef AF_LOCAL #define AF_LOCAL 1 // used for named pipe #endif #define IPv6ADDR_IS_LOOPBACK(a) \ (((a)->u32[0] == 0) && \ ((a)->u32[1] == 0) && \ Loading Loading @@ -103,8 +107,9 @@ union NetAddr { IPv6Addr ip; /* the actual 128 bits of address */ uint32_t scope_id; /* set of interfaces for a scope */ } inet6; #if defined(XP_UNIX) struct { /* Unix domain socket address */ #if defined(XP_UNIX) || defined(XP_WIN) struct { /* Unix domain socket or Windows Named Pipes address */ uint16_t family; /* address family (AF_UNIX) */ char path[104]; /* null-terminated pathname */ } local; Loading Loading
netwerk/base/moz.build +1 −0 Original line number Diff line number Diff line Loading @@ -301,6 +301,7 @@ LOCAL_INCLUDES += [ '/docshell/base', '/dom/base', '/netwerk/protocol/http', '/netwerk/socket', '/security/pkix/include' ] Loading
netwerk/base/nsProtocolProxyService.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "nsIPrefService.h" #include "nsIPrefBranch.h" #include "nsThreadUtils.h" #include "nsSOCKSIOLayer.h" #include "nsString.h" #include "nsNetUtil.h" #include "nsNetCID.h" Loading Loading @@ -387,16 +388,6 @@ proxy_GetBoolPref(nsIPrefBranch *aPrefBranch, aResult = temp; } static inline bool IsHostDomainSocket(const nsACString& aHost) { #ifdef XP_UNIX return Substring(aHost, 0, 5) == "file:"; #else return false; #endif // XP_UNIX } //---------------------------------------------------------------------------- static const int32_t PROXYCONFIG_DIRECT4X = 3; Loading Loading @@ -1862,7 +1853,7 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel, if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && !mSOCKSProxyTarget.IsEmpty() && (IsHostDomainSocket(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { (IsHostLocalTarget(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { host = &mSOCKSProxyTarget; if (mSOCKSProxyVersion == 4) type = kProxyType_SOCKS4; Loading Loading @@ -1900,7 +1891,7 @@ nsProtocolProxyService::Resolve_Internal(nsIChannel *channel, port = mFTPProxyPort; } else if (!mSOCKSProxyTarget.IsEmpty() && (IsHostDomainSocket(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { (IsHostLocalTarget(mSOCKSProxyTarget) || mSOCKSProxyPort > 0)) { host = &mSOCKSProxyTarget; if (mSOCKSProxyVersion == 4) type = kProxyType_SOCKS4; Loading
netwerk/base/nsProtocolProxyService.h +2 −1 Original line number Diff line number Diff line Loading @@ -382,7 +382,8 @@ protected: nsCString mHTTPSProxyHost; int32_t mHTTPSProxyPort; // mSOCKSProxyTarget could be a host or a domain socket path. // mSOCKSProxyTarget could be a host, a domain socket path, // or a named-pipe name. nsCString mSOCKSProxyTarget; int32_t mSOCKSProxyPort; int32_t mSOCKSProxyVersion; Loading
netwerk/dns/DNS.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,11 @@ void NetAddrToPRNetAddr(const NetAddr *addr, PRNetAddr *prAddr) prAddr->local.family = PR_AF_LOCAL; memcpy(prAddr->local.path, addr->local.path, sizeof(addr->local.path)); } #elif defined(XP_WIN) else if (addr->raw.family == AF_LOCAL) { prAddr->local.family = PR_AF_LOCAL; memcpy(prAddr->local.path, addr->local.path, sizeof(addr->local.path)); } #endif } Loading
netwerk/dns/DNS.h +7 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ #include "winsock2.h" #endif #ifndef AF_LOCAL #define AF_LOCAL 1 // used for named pipe #endif #define IPv6ADDR_IS_LOOPBACK(a) \ (((a)->u32[0] == 0) && \ ((a)->u32[1] == 0) && \ Loading Loading @@ -103,8 +107,9 @@ union NetAddr { IPv6Addr ip; /* the actual 128 bits of address */ uint32_t scope_id; /* set of interfaces for a scope */ } inet6; #if defined(XP_UNIX) struct { /* Unix domain socket address */ #if defined(XP_UNIX) || defined(XP_WIN) struct { /* Unix domain socket or Windows Named Pipes address */ uint16_t family; /* address family (AF_UNIX) */ char path[104]; /* null-terminated pathname */ } local; Loading