-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (28 loc) · 798 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from multiprocessing import freeze_support, Process
from time import sleep
import dns
import grpc_server
import lcx_server
import lcx_server_ios
_lcx_port = 9443
_lcx_ios_port = 443
_dns_port = 53
if __name__ == "__main__":
freeze_support()
grpc_process = Process(target=grpc_server.serve, daemon=True)
grpc_process.start()
lcx_process = Process(
target=lcx_server.start, args=(_lcx_port,), daemon=True)
lcx_process.start()
lcx_ios_process = Process(
target=lcx_server_ios.start, args=(_lcx_ios_port,), daemon=True)
lcx_ios_process.start()
dns.start(_dns_port)
try:
grpc_process.join()
lcx_process.join()
lcx_ios_process.join()
while True:
sleep(1)
except KeyboardInterrupt:
pass