Let it run server / client independently

This commit is contained in:
killian 2024-03-08 22:12:22 -08:00
parent 8f969574e2
commit 42a63716e2
3 changed files with 16 additions and 3 deletions

View File

View File

@ -0,0 +1,10 @@
from ..base_device import Device
device = Device()
def main(server_url):
device.server_url = server_url
device.start()
if __name__ == "__main__":
main()

View File

@ -86,8 +86,11 @@ def run(
client_thread.start()
try:
server_thread.join()
tunnel_thread.join()
client_thread.join()
if server:
server_thread.join()
if expose:
tunnel_thread.join()
if client:
client_thread.join()
except KeyboardInterrupt:
os.kill(os.getpid(), signal.SIGINT)