diff --git a/app/browser/tabs.js b/app/browser/tabs.js index d24b3e22425..6469cb677de 100644 --- a/app/browser/tabs.js +++ b/app/browser/tabs.js @@ -908,6 +908,11 @@ const api = { if (isSessionPartition(createProperties.partition)) { createProperties.parent_partition = '' } + if (createProperties.isTor) { + createProperties.isolated_storage = true + createProperties.parent_partition = '' + createProperties.tor_proxy = 'socks5://127.0.0.1:9050' + } } // Tabs are allowed to be initially discarded (unloaded) if they are regular tabs diff --git a/app/common/commonMenu.js b/app/common/commonMenu.js index 9c4d90a1326..02adf67974c 100644 --- a/app/common/commonMenu.js +++ b/app/common/commonMenu.js @@ -108,7 +108,7 @@ module.exports.newTorIdentityMenuItem = () => { label: locale.translation('newTorIdentity'), click: function (item, focusedWindow) { // XXX new tor circuits - let torSession = electron.session.fromPartition('tor') + let torSession = electron.session.fromPartition('persist:tor') torSession.clearCache(() => { console.log('cleared tor cache') }) torSession.clearStorageData({}, () => { console.log('cleared tor storage') diff --git a/app/filtering.js b/app/filtering.js index 02dd8c13090..5293f1a817c 100644 --- a/app/filtering.js +++ b/app/filtering.js @@ -659,6 +659,7 @@ function initTor (ses, partition) { let proxyconfig = { proxyRules: 'socks5://127.0.0.1:9050,direct://' } + // darkdh to diracdeltas: this can be deleted because it is covered by "tor_proxy" ses.setProxy(proxyconfig, () => { // Make a request to check.torproject.org to ensure that proxying works console.log('checking for Tor proxy') @@ -720,6 +721,11 @@ const initPartition = (partition) => { if (isSessionPartition(partition)) { options.parent_partition = '' } + if (partition === 'persist:tor') { + options.isolated_storage = true + options.parent_partition = '' + options.tor_proxy = 'socks5://127.0.0.1:9050' + } let ses = session.fromPartition(partition, options) fns.forEach((fn) => {