rogerxavier commited on
Commit
829012f
·
verified ·
1 Parent(s): 414265f

Update server/decoder.py

Browse files
Files changed (1) hide show
  1. server/decoder.py +3 -2
server/decoder.py CHANGED
@@ -44,7 +44,7 @@ class ListDecoder(BaseDecoder):
44
  (4 - len(_config_str) % 4) * "="
45
  )
46
 
47
- if "trojan" in config_str and "0.0.0.0" not in config_str and '美国' not in nameinfo and '443' not in config_str:
48
  # 使用正则表达式去除 type=... 参数,包括#前的部分
49
  # 这里我们匹配 &type= 后面跟着任意字符直到下一个 & 或 # 或字符串结束 ,去除type=tcp== 或者type=tcp= 这类影响链接的多余部分
50
  _encoded_config_str_without_type = re.sub(r'([&?]type=[^&#]*)', '',_encoded_config_str)
@@ -59,7 +59,8 @@ class ListDecoder(BaseDecoder):
59
  vmess_info_str = json.dumps(vmess_info_json,ensure_ascii=False)#不转译中文
60
  if ('倍率提示'not in vmess_info_str)and('导航' not in vmess_info_str) and('443' not in vmess_info_str):
61
  yield config_str.replace('allowInsecure=0', 'allowInsecure=1')
62
- if ("ss://" in config_str) and ("套餐" not in nameinfo) and('到期' not in nameinfo) and('流量' not in nameinfo) and('剩余' not in nameinfo):
 
63
  #shadowsocks节点保留
64
  yield config_str
65
 
 
44
  (4 - len(_config_str) % 4) * "="
45
  )
46
 
47
+ if "trojan" in config_str and "0.0.0.0" not in config_str and '专线' not in nameinfo and '443' not in config_str:
48
  # 使用正则表达式去除 type=... 参数,包括#前的部分
49
  # 这里我们匹配 &type= 后面跟着任意字符直到下一个 & 或 # 或字符串结束 ,去除type=tcp== 或者type=tcp= 这类影响链接的多余部分
50
  _encoded_config_str_without_type = re.sub(r'([&?]type=[^&#]*)', '',_encoded_config_str)
 
59
  vmess_info_str = json.dumps(vmess_info_json,ensure_ascii=False)#不转译中文
60
  if ('倍率提示'not in vmess_info_str)and('导航' not in vmess_info_str) and('443' not in vmess_info_str):
61
  yield config_str.replace('allowInsecure=0', 'allowInsecure=1')
62
+ if ("ss://" in config_str) and ("套餐" not in nameinfo) and('到期' not in nameinfo) and('流量' not in nameinfo)
63
+ and('剩余' not in nameinfo) and ('专线' not in nameinfo):
64
  #shadowsocks节点保留
65
  yield config_str
66