This repository was archived by the owner on Dec 11, 2019. It is now read-only.
Commit dcfa949 1 parent 6bbf6ab commit dcfa949 Copy full SHA for dcfa949
File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1004,6 +1004,11 @@ const api = {
1004
1004
if ( isSessionPartition ( createProperties . partition ) ) {
1005
1005
createProperties . parent_partition = ''
1006
1006
}
1007
+ if ( createProperties . isTor ) {
1008
+ createProperties . isolated_storage = true
1009
+ createProperties . parent_partition = ''
1010
+ createProperties . tor_proxy = 'socks5://127.0.0.1:9050'
1011
+ }
1007
1012
}
1008
1013
1009
1014
// Tabs are allowed to be initially discarded (unloaded) if they are regular tabs
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ module.exports.newTorIdentityMenuItem = () => {
108
108
label : locale . translation ( 'newTorIdentity' ) ,
109
109
click : function ( item , focusedWindow ) {
110
110
// XXX new tor circuits
111
- let torSession = electron . session . fromPartition ( 'tor' )
111
+ let torSession = electron . session . fromPartition ( 'persist: tor' )
112
112
torSession . clearCache ( ( ) => { console . log ( 'cleared tor cache' ) } )
113
113
torSession . clearStorageData ( { } , ( ) => {
114
114
console . log ( 'cleared tor storage' )
Original file line number Diff line number Diff line change @@ -662,6 +662,7 @@ function initTor (ses, partition) {
662
662
let proxyconfig = {
663
663
proxyRules : 'socks5://127.0.0.1:9050,direct://'
664
664
}
665
+ // darkdh to diracdeltas: this can be deleted because it is covered by "tor_proxy"
665
666
ses . setProxy ( proxyconfig , ( ) => {
666
667
// Make a request to check.torproject.org to ensure that proxying works
667
668
console . log ( 'checking for Tor proxy' )
@@ -723,6 +724,11 @@ const initPartition = (partition) => {
723
724
if ( isSessionPartition ( partition ) ) {
724
725
options . parent_partition = ''
725
726
}
727
+ if ( partition === 'persist:tor' ) {
728
+ options . isolated_storage = true
729
+ options . parent_partition = ''
730
+ options . tor_proxy = 'socks5://127.0.0.1:9050'
731
+ }
726
732
727
733
let ses = session . fromPartition ( partition , options )
728
734
fns . forEach ( ( fn ) => {
You can’t perform that action at this time.
0 commit comments