-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.py
66 lines (54 loc) · 1.78 KB
/
config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from os import path
class Protocols:
def __init__(self) -> None:
self.__ss = set()
self.__vmess = set()
self.__vless = set()
self.__trojan = set()
@property
def ss(self):
return self.__ss
@ss.setter
def ss(self, ss_link):
if ss_link:
if type(ss_link) == str:
self.__ss.add(ss_link.strip())
elif type(ss_link) == list:
for link in ss_link:
self.__ss.add(link.strip())
@property
def vmess(self):
return self.__vmess
@vmess.setter
def vmess(self, ss_link):
if ss_link:
if type(ss_link) == str:
self.__vmess.add(ss_link.strip())
elif type(ss_link) == list:
for link in ss_link:
self.__vmess.add(link.strip())
@property
def vless(self):
return self.__vless
@vless.setter
def vless(self, ss_link):
if ss_link:
if type(ss_link) == str:
self.__vless.add(ss_link.strip())
elif type(ss_link) == list:
for link in ss_link:
self.__vless.add(link.strip())
@property
def trojan(self):
return self.__trojan
@trojan.setter
def trojan(self, ss_link):
if ss_link:
if type(ss_link) == str:
self.__trojan.add(ss_link.strip())
elif type(ss_link) == list:
for link in ss_link:
self.__trojan.add(link.strip())
channels = open('channels.lst', 'r')
channels = [i.strip() for i in channels.readlines() if i != '\n']
check_node = 'https://reverent-khayyam-zlyspjbuw.liara.run/api/tcp/'