Skip to content

Commit

Permalink
代码精简
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Dec 1, 2020
1 parent 62360f6 commit d38febc
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 82 deletions.
6 changes: 1 addition & 5 deletions v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,7 @@ profileInit() {
[[ -z $(grep PYTHONIOENCODING=utf-8 ~/$ENV_FILE) ]] && echo "export PYTHONIOENCODING=utf-8" >> ~/$ENV_FILE && source ~/$ENV_FILE

#全新安装的新配置
if [[ ${INSTALL_WAY} == 0 ]];then
v2ray new
else
v2ray convert
fi
[[ ${INSTALL_WAY} == 0 ]] && v2ray new

echo ""
}
Expand Down
2 changes: 1 addition & 1 deletion v2ray_util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '3.8.8'
__version__ = '3.8.9'

from .util_core.trans import _
1 change: 0 additions & 1 deletion v2ray_util/global_setting/iptables_ctr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import platform
import subprocess
import pkg_resources
Expand Down
Binary file modified v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.mo
Binary file not shown.
7 changes: 0 additions & 7 deletions v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.po
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@ msgstr "生成客户端json"

### client.py end ###

### converter.py start ###

msgid "tranfrom to v2ray new version json.."
msgstr "转换配置文件格式中.."

### converter.py end ###

### group.py start ###

msgid "HTTPS Socks5 don't support telegram share link"
Expand Down
2 changes: 0 additions & 2 deletions v2ray_util/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def parse_arg():
updateSh()
elif sys.argv[1] == "new":
V2ray.new()
elif sys.argv[1] == "convert":
V2ray.convert()
elif sys.argv[1] == "log":
V2ray.log()
elif sys.argv[1] == "cdn":
Expand Down
56 changes: 0 additions & 56 deletions v2ray_util/util_core/converter.py

This file was deleted.

6 changes: 0 additions & 6 deletions v2ray_util/util_core/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ def read_json(self):
with open(self.path, 'r') as json_file:
self.config = json.load(json_file)

if "inbounds" not in self.config:
import converter
self.modify_time = os.path.getmtime(self.path)
with open(self.path, 'r') as json_file:
self.config = json.load(json_file)

#读取配置文件大框架
conf_inbounds = self.config["inbounds"]
conf_rules = self.config["routing"]["rules"]
Expand Down
4 changes: 0 additions & 4 deletions v2ray_util/util_core/v2ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ def stop(cls):
else:
cls.run("systemctl stop v2ray", "stop")

@classmethod
def convert(cls):
from .converter import ConfigConverter

@classmethod
def check(cls):
if not os.path.exists("/etc/v2ray_util/util.cfg"):
Expand Down

0 comments on commit d38febc

Please sign in to comment.