Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
torbutton
Commits
7fffae28
Commit
7fffae28
authored
Jan 22, 2017
by
Arthur Edelstein
Committed by
Georg Koppen
Apr 04, 2017
Browse files
Bug 21201.2: Isolate by firstPartyDomain from OriginAttributes
parent
1b7ce9f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/domain-isolator.js
View file @
7fffae28
...
...
@@ -29,11 +29,6 @@ let mozilla = {};
mozilla
.
protocolProxyService
=
Cc
[
"
@mozilla.org/network/protocol-proxy-service;1
"
]
.
getService
(
Ci
.
nsIProtocolProxyService
);
// __mozilla.thirdPartyUtil__.
// Mozilla's Thirdy Party Utilities, for figuring out first party domain.
mozilla
.
thirdPartyUtil
=
Cc
[
"
@mozilla.org/thirdpartyutil;1
"
]
.
getService
(
Ci
.
mozIThirdPartyUtil
);
// __mozilla.registerProxyChannelFilter(filterFunction, positionIndex)__.
// Registers a proxy channel filter with the Mozilla Protocol Proxy Service,
// which will help to decide the proxy to be used for a given channel.
...
...
@@ -133,11 +128,8 @@ tor.isolateCircuitsByDomain = function () {
return
aProxy
;
try
{
let
channel
=
aChannel
.
QueryInterface
(
Ci
.
nsIChannel
),
firstPartyURI
=
mozilla
.
thirdPartyUtil
.
getFirstPartyURIFromChannel
(
channel
,
true
)
.
QueryInterface
(
Ci
.
nsIURI
),
firstPartyDomain
=
mozilla
.
thirdPartyUtil
.
getFirstPartyHostForIsolation
(
firstPartyURI
),
let
channel
=
aChannel
.
QueryInterface
(
Ci
.
nsIChannel
);
firstPartyDomain
=
channel
.
loadInfo
.
originAttributes
.
firstPartyDomain
,
proxy
=
aProxy
.
QueryInterface
(
Ci
.
nsIProxyInfo
),
replacementProxy
=
tor
.
socksProxyCredentials
(
aProxy
,
firstPartyDomain
);
logger
.
eclog
(
3
,
"
tor SOCKS:
"
+
channel
.
URI
.
spec
+
"
via
"
+
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment