[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbirdy/master] Update Enigmail values for custom proxy settings (#22569)
commit 9e23c0a02f5acf75b8a2711e90ab44df0429310a
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date: Tue Jun 20 10:48:29 2017 -0400
Update Enigmail values for custom proxy settings (#22569)
When custom proxy setting are set, those changes should also reflect in
Enigmail's keyserver settings, as is done for Tor and JonDos.
---
chrome/content/preferences.js | 32 ++++++++++++--------------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index ebfc13a..8a91ddb 100644
--- a/chrome/content/preferences.js
+++ b/chrome/content/preferences.js
@@ -46,6 +46,9 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
if (anonService === "jondo") {
proxy = "http://127.0.0.1:4001";
}
+ if (anonService === "custom") {
+ proxy = "socks5h://" + pub.prefs.getCharPref("network.proxy.socks") + ":" + pub.prefs.getIntPref("network.proxy.socks_port");
+ }
opts += "--keyserver-options=no-try-dns-srv,http-proxy=" + proxy + " ";
}
@@ -255,6 +258,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.setPanelSettings(pub.strBundle.GetStringFromName("torbirdy.enabled.custom"), "green");
pub.prefs.setIntPref(pub.prefBranch + 'proxy', 2);
+ pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("custom"));
};
pub.setProxyTransparent = function() {
@@ -262,6 +266,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.setPanelSettings(pub.strBundle.GetStringFromName("torbirdy.enabled.torification"), "red");
pub.prefs.setIntPref(pub.prefBranch + 'proxy', 3);
+ pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("tor"));
};
/*
@@ -320,6 +325,13 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.prefs.setBoolPref(pub.prefBranch + 'startup_folder', false);
}
+ // Thunderbird's email wizard - default: false
+ if (pub.emailWizard.checked) {
+ pub.prefs.setBoolPref(pub.prefBranch + 'emailwizard', true);
+ } else {
+ pub.prefs.setBoolPref(pub.prefBranch + 'emailwizard', false);
+ }
+
// Fetch all messages for all accounts.
// default: false
// Only change the state if it is required.
@@ -360,26 +372,6 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
pub.prefs.setBoolPref(pub.prefBranch + 'enigmail.confirmemail', false);
}
- // Thunderbird's email wizard - default: false
- if (pub.emailWizard.checked) {
- pub.prefs.setBoolPref(pub.prefBranch + 'emailwizard', true);
- } else {
- pub.prefs.setBoolPref(pub.prefBranch + 'emailwizard', false);
- }
-
- if (index === 1) {
- // JonDo.
- if (pub.anonCustomService.selectedIndex === 0) {
- pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("jondo"));
- }
- // Whonix.
- if (pub.anonCustomService.selectedIndex === 1) {
- pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("tor"));
- }
- }
- if (index === 0 || index === 2 || index === 3) {
- pub.setPreferences("extensions.enigmail.agentAdditionalParam", pub.setEnigmailPrefs("tor"));
- }
};
/*
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits