This repository was archived by the owner on Dec 11, 2019. It is now read-only.
Commit dbf844e 1 parent 8094e1d commit dbf844e Copy full SHA for dbf844e
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 @@ -908,6 +908,11 @@ const api = {
908
908
if ( isSessionPartition ( createProperties . partition ) ) {
909
909
createProperties . parent_partition = ''
910
910
}
911
+ if ( createProperties . isTor ) {
912
+ createProperties . isolated_storage = true
913
+ createProperties . parent_partition = ''
914
+ createProperties . tor_proxy = 'socks5://127.0.0.1:9050'
915
+ }
911
916
}
912
917
913
918
// 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 @@ -659,6 +659,7 @@ function initTor (ses, partition) {
659
659
let proxyconfig = {
660
660
proxyRules : 'socks5://127.0.0.1:9050,direct://'
661
661
}
662
+ // darkdh to diracdeltas: this can be deleted because it is covered by "tor_proxy"
662
663
ses . setProxy ( proxyconfig , ( ) => {
663
664
// Make a request to check.torproject.org to ensure that proxying works
664
665
console . log ( 'checking for Tor proxy' )
@@ -720,6 +721,11 @@ const initPartition = (partition) => {
720
721
if ( isSessionPartition ( partition ) ) {
721
722
options . parent_partition = ''
722
723
}
724
+ if ( partition === 'persist:tor' ) {
725
+ options . isolated_storage = true
726
+ options . parent_partition = ''
727
+ options . tor_proxy = 'socks5://127.0.0.1:9050'
728
+ }
723
729
724
730
let ses = session . fromPartition ( partition , options )
725
731
fns . forEach ( ( fn ) => {
You can’t perform that action at this time.
0 commit comments