detect running tor in background

pull/269/head
larteyoh 3 weeks ago
parent 59ad2f461d
commit 98e35fb1ed

@ -1614,10 +1614,14 @@ Item {
anchors.right: parent.right
width: settingsStack.comboBoxWidth; indicatorWidth: settingsStack.comboBoxButtonWidth
model: ["None", "Tor", "i2p"]
currentIndex: ProxyManager.hasTor() ? model.indexOf("Tor") : model.indexOf("None")//model.indexOf(Script.getJsonRootObject()["proxy"]["type"])
currentIndex: (ProxyManager.hasTor() || ProxyManager.isTorRunning()) ? model.indexOf("Tor") : model.indexOf("None")//model.indexOf(Script.getJsonRootObject()["proxy"]["type"])
Component.onCompleted: {
if(ProxyManager.hasTor()) {
ProxyManager.startTorDaemon()
} else {
if(ProxyManager.isTorRunning()) {
ProxyManager.useTorProxy()
}
}
}
onActivated: {

Loading…
Cancel
Save