Onionr/static-data/official-plugins/tor/starttor.py

20 lines
446 B
Python
Raw Normal View History

2022-02-21 21:15:26 +00:00
from time import sleep
import stem.process
from utils.identifyhome import identify_home
from torfilepaths import control_socket
from torfilepaths import tor_data_dir
2022-02-21 21:15:26 +00:00
def start_tor():
tor_process = stem.process.launch_tor_with_config(
config={
'SocksPort': 'auto OnionTrafficOnly',
'DataDirectory': tor_data_dir,
'ControlSocket': control_socket,
},
2022-02-21 21:15:26 +00:00
completion_percent=100
)