1010from psutil import Popen
1111
1212import binaries
13- import bridge_proxy
1413import helpers
15- from bridge_proxy import PORT as BRIDGE_PROXY_PORT
1614
1715if TYPE_CHECKING :
1816 from typing_extensions import TypedDict
@@ -61,13 +59,12 @@ def is_port_in_use(port: int) -> bool:
6159 return s .connect_ex (("0.0.0.0" , port )) == 0
6260
6361
64- def check_bridge_and_proxy_status () -> None :
65- """Reporting the status of bridge and proxy , for debugging purposes"""
62+ def check_bridge_status () -> None :
63+ """Reporting the status of bridge, for debugging purposes"""
6664 log (f"Is bridge running - { is_port_in_use (BRIDGE_PORT )} " )
67- log (f"Is bridge proxy running - { is_port_in_use (BRIDGE_PROXY_PORT )} " )
6865
6966
70- def start (version : str , proxy : bool = False , output_to_logfile : bool = True ) -> None :
67+ def start (version : str , output_to_logfile : bool = True ) -> None :
7168 log ("Starting" )
7269 global BRIDGE
7370 global VERSION_RUNNING
@@ -87,7 +84,7 @@ def start(version: str, proxy: bool = False, output_to_logfile: bool = True) ->
8784 # not to still think the bridge is running
8885 if BRIDGE is not None and not is_running ():
8986 log ("Bridge was probably killed by user manually, resetting local state" )
90- stop (proxy = proxy )
87+ stop ()
9188
9289 if BRIDGE is not None :
9390 log ("WARNING: Bridge is already running, not spawning a new one" , "red" )
@@ -158,14 +155,11 @@ def get_command_list() -> list[str]:
158155
159156 VERSION_RUNNING = version
160157
161- if proxy :
162- bridge_proxy .start ()
163-
164158 time .sleep (0.5 )
165- check_bridge_and_proxy_status ()
159+ check_bridge_status ()
166160
167161
168- def stop (proxy : bool = True ) -> None :
162+ def stop () -> None :
169163 log ("Stopping" )
170164 global BRIDGE
171165 global VERSION_RUNNING
@@ -190,8 +184,5 @@ def stop(proxy: bool = True) -> None:
190184 BRIDGE = None
191185 VERSION_RUNNING = None
192186
193- if proxy :
194- bridge_proxy .stop ()
195-
196187 time .sleep (0.5 )
197- check_bridge_and_proxy_status ()
188+ check_bridge_status ()
0 commit comments