MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / install_tor_support

Function install_tor_support

Scripts/Developer Base/Free Internet.py:375–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

373
374
375def install_tor_support() -> Tuple[bool, str]:
376 if is_termux() and which("pkg") and not tor_binary():
377 _run(["pkg", "update", "-y"])
378 if not _run(["pkg", "install", "-y", "tor"]):
379 return False, "Could not install tor with pkg."
380 if not tor_binary():
381 return False, "Tor binary not found. In Termux run: pkg install tor"
382 if not pysocks_available():
383 if not _run([sys.executable, "-m", "pip", "install", "--upgrade", "pysocks"]):
384 return False, "Could not install PySocks. Run: pip install pysocks"
385 return True, "Tor support ready."
386
387
388def start_tor() -> Tuple[bool, str]:

Callers 1

start_torFunction · 0.70

Calls 5

is_termuxFunction · 0.70
whichFunction · 0.70
tor_binaryFunction · 0.70
_runFunction · 0.70
pysocks_availableFunction · 0.70

Tested by

no test coverage detected