Fix default socks & http tunnel port for Tor CLI

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2023-08-30 23:41:42 +08:00
parent c23d4f7cfd
commit 58ebfe96ec
2 changed files with 16 additions and 7 deletions
+7 -4
View File
@@ -6,7 +6,12 @@ from Furious.Action.Routing import BUILTIN_ROUTING_TABLE, BUILTIN_ROUTING
from Furious.Gui.Action import Action
from Furious.Widget.ConnectingProgressBar import ConnectingProgressBar
from Furious.Widget.Widget import MessageBox
from Furious.Utility.Constants import APP, APPLICATION_NAME, PROXY_SERVER_BYPASS
from Furious.Utility.Constants import (
APP,
APPLICATION_NAME,
PROXY_SERVER_BYPASS,
DEFAULT_TOR_HTTPS_PORT,
)
from Furious.Utility.Utility import (
Switch,
SupportConnectedCallback,
@@ -605,9 +610,7 @@ class ConnectAction(Action):
def startTorRelay(self, core, proxyServer, startCounter=0, step=1):
# Redirect Proxy
self.proxyServer = (
f'127.0.0.1:{self.torRelayStorageObj.get("httpsTunnelPort", 9049)}'
)
self.proxyServer = f'127.0.0.1:{self.torRelayStorageObj.get("httpsTunnelPort", DEFAULT_TOR_HTTPS_PORT)}'
try:
timeout = 1000 * int(
+9 -3
View File
@@ -1,5 +1,11 @@
from Furious.Gui.Icon import Icon
from Furious.Utility.Constants import APP, PLATFORM, ROOT_DIR
from Furious.Utility.Constants import (
APP,
PLATFORM,
ROOT_DIR,
DEFAULT_TOR_SOCKS_PORT,
DEFAULT_TOR_HTTPS_PORT,
)
from PySide6 import QtCore
from PySide6.QtWidgets import QApplication
@@ -123,8 +129,8 @@ class RoutesStorage:
class TorRelaySettingsStorage:
EMPTY_OBJECT = {
'socksTunnelPort': 9050,
'httpsTunnelPort': 9049,
'socksTunnelPort': DEFAULT_TOR_SOCKS_PORT,
'httpsTunnelPort': DEFAULT_TOR_HTTPS_PORT,
'useProxy': True,
'logLevel': 'notice',
'relayEstablishTimeout': 15,