Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d1f3e68

Browse files
committedJan 11, 2022
优化
1 parent 668a7b8 commit d1f3e68

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed
 

‎002-V2rayPool/core/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def __kill_threading(self):
254254
pass
255255
util.sys_proxy_off()
256256

257-
def __child_thread(self, url: str, isSysOn: False):
257+
def __child_thread(self, url: str, isSysOn=False):
258258
self.generateAndWrite(url)
259259
# 执行就可,不需要知道结果
260260
if Config.get_v2ray_core_path() is None:
@@ -266,11 +266,11 @@ def __child_thread(self, url: str, isSysOn: False):
266266
if isSysOn:
267267
util.sys_v2ray_on()
268268

269-
def v2ray_start(self, url: str, isSysOn: False):
269+
def v2ray_start(self, url: str, isSysOn=False):
270270
self.__kill_threading()
271271
self.__child_thread(url, isSysOn)
272272

273-
def v2ray_start_with_log(self, url: str, isSysOn: False):
273+
def v2ray_start_with_log(self, url: str, isSysOn=False):
274274
try:
275275
self.v2ray_start(url, isSysOn)
276276
except Exception as e:

‎002-V2rayPool/core/config.json

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,34 @@
2828
],
2929
"outbounds": [
3030
{
31-
"protocol": "shadowsocks",
31+
"protocol": "vmess",
3232
"settings": {
33-
"servers": [
33+
"vnext": [
3434
{
35-
"address": "139.99.62.207",
36-
"method": "aes-256-gcm",
37-
"ota": false,
38-
"password": "cdBIDV42DCwnfIN",
39-
"port": 8119
35+
"address": "42.157.8.162",
36+
"port": 50002,
37+
"users": [
38+
{
39+
"id": "418048af-a293-4b99-9b0c-98ca3580dd24",
40+
"alterId": 64,
41+
"security": "aes-128-gcm"
42+
}
43+
]
4044
}
4145
]
46+
},
47+
"streamSettings": {
48+
"security": "",
49+
"tlsSettings": {},
50+
"wsSettings": {},
51+
"httpSettings": {},
52+
"network": "tcp",
53+
"kcpSettings": {},
54+
"tcpSettings": {},
55+
"quicSettings": {}
56+
},
57+
"mux": {
58+
"enabled": true
4259
}
4360
},
4461
{
@@ -49,6 +66,13 @@
4966
"tag": "direct"
5067
}
5168
],
69+
"dns": {
70+
"servers": [
71+
"8.8.8.8",
72+
"8.8.4.4",
73+
"localhost"
74+
]
75+
},
5276
"routing": {
5377
"domainStrategy": "IPIfNonMatch",
5478
"rules": [

‎002-V2rayPool/db/db_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def __add_urls_de_dup(self, all_urls: [], new_urls: []) -> []:
2929
continue
3030
all_urls.append(temp)
3131

32-
def start_random_v2ray_by_local(self):
32+
def start_random_v2ray_by_local(self, isSysOn=False):
3333
"""从本地随机启动一个可用的proxy"""
3434
urls = self.load_enable_urls_by_local()
3535
for url in urls:
36-
if client.Creator().v2ray_start_with_log(random.choice(urls)) is False:
36+
if client.Creator().v2ray_start_with_log(random.choice(urls),isSysOn) is False:
3737
time.sleep(1)
3838
continue
3939
time.sleep(2)

0 commit comments

Comments
 (0)
Please sign in to comment.