Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor-browser-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Georg Koppen
tor-browser-build
Commits
d3a75053
Commit
d3a75053
authored
4 years ago
by
Alex Catarineu
Browse files
Options
Downloads
Patches
Plain Diff
Bug 33845: Rebase namecoin torbutton patch
parent
5a2948b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/firefox/namecoin-torbutton.patch
+58
-17
58 additions, 17 deletions
projects/firefox/namecoin-torbutton.patch
with
58 additions
and
17 deletions
projects/firefox/namecoin-torbutton.patch
+
58
−
17
View file @
d3a75053
diff --git a/chrome/content/tor-circuit-display.js b/chrome/content/tor-circuit-display.js
index
5ecbe7d
..
f
77
1150
100644
index
119f6fca
..
4
77
b0302
100644
--- a/chrome/content/tor-circuit-display.js
+++ b/chrome/content/tor-circuit-display.js
@@ -4
9
,7 +4
9
,11 @@
let credentialsToNodeDataMap = new Map(),
@@ -4
8
,7 +4
8
,11 @@
let credentialsToNodeDataMap = new Map(),
knownCircuitIDs = new Map(),
// A mutable map that records the SOCKS credentials for the
// latest channels for each browser + domain.
...
...
@@ -15,7 +15,7 @@ index 5ecbe7d..f771150 100644
// __trimQuotes(s)__.
// Removes quotation marks around a quoted string.
@@ -12
6
,6 +13
0
,28 @@
let getCircuitStatusByID = async function (aController, circuitID) {
@@ -1
3
2,6 +13
6
,28 @@
let getCircuitStatusByID = async function (aController, circuitID) {
return null;
};
...
...
@@ -44,7 +44,7 @@ index 5ecbe7d..f771150 100644
// __collectIsolationData(aController, updateUI)__.
// Watches for STREAM SENTCONNECT events. When a SENTCONNECT event occurs, then
// we assume isolation settings (SOCKS username+password) are now fixed for the
@@ -1
39
,6 +1
65
,15 @@
let collectIsolationData = function (aController, updateUI) {
@@ -1
45
,6 +1
71
,15 @@
let collectIsolationData = function (aController, updateUI) {
"STREAM",
streamEvent => streamEvent.StreamStatus === "SENTCONNECT",
async (streamEvent) => {
...
...
@@ -52,7 +52,7 @@ index 5ecbe7d..f771150 100644
+ // Collect any stream target that might be an onion.
+ if (streamEvent && streamEvent.StreamID && streamEvent.Target) {
+ let targetDomain = streamEvent.Target.split(":")[0];
+
if (targetDomain.endsWith(".onion")) {
+
if (targetDomain.endsWith(".onion")) {
+ bitToOnionMap[bitTargets[streamEvent.StreamID]] = targetDomain;
+ logger.eclog(3, "mapped " + bitTargets[streamEvent.StreamID] + " to " + targetDomain);
+ }
...
...
@@ -60,10 +60,10 @@ index 5ecbe7d..f771150 100644
if (!knownCircuitIDs.get(streamEvent.CircuitID)) {
logger.eclog(3, "streamEvent.CircuitID: " + streamEvent.CircuitID);
knownCircuitIDs.set(streamEvent.CircuitID, true);
@@ -306,12 +341,14 @@
let updateCircuitDisplay = function () {
(i === 0 && nodeData[0].type !== "bridge") ?
["span", { class: "circuit-guard-info" }, uiString("guard")] : null);
@@ -312,7 +347,9 @@
let updateCircuitDisplay = function () {
}
let domainParts = [];
- if (domain.endsWith(".onion")) {
+ logger.eclog(3, "bit to onion map:" + JSON.stringify(bitToOnionMap) + ", domain: " + domain);
+ let mappedOnion = bitToOnionMap[domain];
...
...
@@ -71,13 +71,54 @@ index 5ecbe7d..f771150 100644
for (let i = 0; i < 3; ++i) {
li(uiString("relay"));
}
@@ -325,24 +362,28 @@
let updateCircuitDisplay = function () {
domainParts.push(domain);
}
- li(domain);
+ li(domain, " ", mappedOnion ? ["span", { class: "circuit-ip-address" }, mappedOnion] : null);
- // We use a XUL html:span element so that the tooltiptext is displayed.
- li([
- "html:span",
- {
- class: "circuit-onion",
- onclick: `
- this.classList.add("circuit-onion-copied");
- Cc[
- "@mozilla.org/widget/clipboardhelper;1"
- ].getService(Ci.nsIClipboardHelper).copyString(this.getAttribute("data-onion"))
- `,
- "data-onion": domain,
- "data-text-clicktocopy": torbutton_get_property_string("torbutton.circuit_display.click_to_copy"),
- "data-text-copied": torbutton_get_property_string("torbutton.circuit_display.copied"),
- tooltiptext: domain,
- },
- ...domainParts,
- ]);
+ if (mappedOnion) {
+ li(domain, " ", ["span", { class: "circuit-ip-address" }, mappedOnion]);
+ } else {
+ // We use a XUL html:span element so that the tooltiptext is displayed.
+ li([
+ "html:span",
+ {
+ class: "circuit-onion",
+ onclick: `
+ this.classList.add("circuit-onion-copied");
+ Cc[
+ "@mozilla.org/widget/clipboardhelper;1"
+ ].getService(Ci.nsIClipboardHelper).copyString(this.getAttribute("data-onion"))
+ `,
+ "data-onion": domain,
+ "data-text-clicktocopy": torbutton_get_property_string("torbutton.circuit_display.click_to_copy"),
+ "data-text-copied": torbutton_get_property_string("torbutton.circuit_display.copied"),
+ tooltiptext: domain,
+ },
+ ...domainParts,
+ ]);
+ }
// Hide the note about guards if we are using a bridge.
document.getElementById("circuit-guard-note-container").style.display =
(nodeData[0].type === "bridge") ? "none" : "block";
@@ -418,6 +455,7 @@
let setupDisplay = function (ipcFile, host, port, password, enablePrefName) {
@@ -450,6 +491,7 @@
let setupDisplay = function (enablePrefName) {
stopCollectingIsolationData = null,
stopCollectingBrowserCredentials = null,
stopEnsuringCorrectPopupDimensions = null,
...
...
@@ -85,17 +126,17 @@ index 5ecbe7d..f771150 100644
stop = function() {
syncDisplayWithSelectedTab(false);
if (myController) {
@@ -4
30
,6 +
468
,9 @@
let setupDisplay = function (
ipcFile, host, port, password,
enablePrefName) {
@@ -4
62
,6 +
504
,9 @@
let setupDisplay = function (enablePrefName) {
if (stopEnsuringCorrectPopupDimensions) {
stopEnsuringCorrectPopupDimensions();
}
+
if (stopCollectingBitTargets) {
+
stopCollectingBitTargets();
+
}
+
if (stopCollectingBitTargets) {
+
stopCollectingBitTargets();
+
}
myController = null;
}
},
@@ -4
44
,6 +
485
,7 @@
let setupDisplay = function (
ipcFile, host, port, password,
enablePrefName) {
@@ -4
75
,6 +
520
,7 @@
let setupDisplay = function (enablePrefName) {
stop();
});
syncDisplayWithSelectedTab(true);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment