Skip to content

Commit

Permalink
Fix default socks & http tunnel port for Tor CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <[email protected]>
  • Loading branch information
LorenEteval committed Aug 30, 2023
1 parent b734028 commit 9286856
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
11 changes: 7 additions & 4 deletions Furious/Action/Connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
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,
Expand Down Expand Up @@ -605,9 +610,7 @@ def fixLoggingRelativePath(attr):

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(
Expand Down
12 changes: 9 additions & 3 deletions Furious/Utility/Utility.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -123,8 +129,8 @@ def clear():

class TorRelaySettingsStorage:
EMPTY_OBJECT = {
'socksTunnelPort': 9050,
'httpsTunnelPort': 9049,
'socksTunnelPort': DEFAULT_TOR_SOCKS_PORT,
'httpsTunnelPort': DEFAULT_TOR_HTTPS_PORT,
'useProxy': True,
'logLevel': 'notice',
'relayEstablishTimeout': 15,
Expand Down

0 comments on commit 9286856

Please sign in to comment.