Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Tor binary path will be passed from browser-laptop
Browse files Browse the repository at this point in the history
  • Loading branch information
jumde committed Mar 16, 2018
1 parent ffcf06f commit f14bc9c
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 71 deletions.
7 changes: 6 additions & 1 deletion app/browser/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const bookmarkOrderCache = require('../common/cache/bookmarkOrderCache')
const ledgerState = require('../common/state/ledgerState')
const {getWindow} = require('./windows')
const activeTabHistory = require('./activeTabHistory')
const path = require('path')

let adBlockRegions
let currentPartitionNumber = 0
Expand Down Expand Up @@ -1016,7 +1017,11 @@ const api = {
createProperties.isolated_storage = true
createProperties.parent_partition = ''
createProperties.tor_proxy = 'socks5://127.0.0.1:9050'
createProperties.tor_path = getExtensionsPath('tor') + "/tor"
if (process.platform === 'win32') {
createProperties.tor_path = path.join(getExtensionsPath('bin'), 'tor.exe').quote()
} else {
createProperties.tor_path = path.join(getExtensionsPath('bin'), 'tor')
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,11 @@ const initPartition = (partition) => {
options.isolated_storage = true
options.parent_partition = ''
options.tor_proxy = 'socks5://127.0.0.1:9050'
options.tor_path = getExtensionsPath('tor') + "/tor"
if (process.platform === 'win32') {
options.tor_path = path.join(getExtensionsPath('bin'), 'tor.exe').quote()
} else {
options.tor_path = path.join(getExtensionsPath('bin'), 'tor')
}
}

let ses = session.fromPartition(partition, options)
Expand Down
Loading

0 comments on commit f14bc9c

Please sign in to comment.