Skip to content

Commit aea538f

Browse files
committed
5.5.13 refactor codes, fix minor bugs, add log collection function for report issues.
1 parent 19268f3 commit aea538f

56 files changed

Lines changed: 449 additions & 170 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626

2727
### 最新公告:
28-
2023-08-15
29-
* 新版 5.5.0, 提升连接性能
28+
2023-08-19
29+
* 新版 5.5.13, 重构代码,修复bug
3030
* 5.1.0,内置ChatGPT
3131
* 原来是4.x.x 老版本的,需要重新下载新版安装,不能应用内升级。
3232

code/default/gae_proxy/local/cert_util.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
current_path = os.path.dirname(os.path.abspath(__file__))
2020
python_path = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir))
2121
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
22-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data', "gae_proxy"))
23-
if not os.path.isdir(data_path):
24-
data_path = current_path
2522

2623
if __name__ == "__main__":
2724
noarch_lib = os.path.abspath( os.path.join(python_path, 'lib', 'noarch'))
@@ -37,6 +34,11 @@
3734
darwin_lib = os.path.abspath( os.path.join(python_path, 'lib', 'darwin'))
3835
sys.path.append(darwin_lib)
3936

37+
import env_info
38+
data_path = os.path.abspath(os.path.join(env_info.data_path, "gae_proxy"))
39+
if not os.path.isdir(data_path):
40+
data_path = current_path
41+
4042
import utils
4143
from xlog import getLogger
4244
xlog = getLogger("gae_proxy")

code/default/gae_proxy/local/check_ip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
current_path = os.path.dirname(os.path.abspath(__file__))
99
default_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
10-
data_path = os.path.abspath(os.path.join(default_path, os.pardir, os.pardir, 'data'))
11-
module_data_path = os.path.join(data_path, 'gae_proxy')
1210

1311
if __name__ == "__main__":
1412
sys.path.append(default_path)
@@ -28,6 +26,10 @@
2826
extra_lib = "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python"
2927
sys.path.append(extra_lib)
3028

29+
30+
import env_info
31+
32+
module_data_path = os.path.join(env_info.data_path, 'gae_proxy')
3133
import xlog
3234
logger = xlog.getLogger("gae_proxy")
3335

code/default/gae_proxy/local/config.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
import os
22

33
from front_base.config import ConfigBase
4-
import simple_http_client
5-
import utils
64

5+
import utils
6+
import env_info
77
current_path = os.path.dirname(os.path.abspath(__file__))
88
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
9-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data'))
10-
module_data_path = os.path.join(data_path, 'gae_proxy')
9+
10+
module_data_path = os.path.join(env_info.data_path, 'gae_proxy')
1111

1212

1313
headers = {"connection": "close"}
14-
# fqrouter = simple_http_client.request("GET", "http://127.0.0.1:2515/ping", headers=headers, timeout=0.5)
15-
# mobile = fqrouter and "PONG" in fqrouter.text
16-
# del headers, fqrouter
1714

1815

1916
class Config(ConfigBase):

code/default/gae_proxy/local/download_gae_lib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66

77
import simple_http_client
8+
import env_info
89
from xlog import getLogger
910
xlog = getLogger("gae_proxy")
1011

1112
current_path = os.path.dirname(os.path.abspath(__file__))
1213
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
1314
top_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir))
14-
data_path = os.path.abspath( os.path.join(top_path, 'data', 'gae_proxy'))
15+
data_path = os.path.abspath( os.path.join(env_info.data_path, 'gae_proxy'))
1516

1617

1718
def request(url, retry=0, timeout=30):

code/default/gae_proxy/local/front.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
current_path = os.path.dirname(os.path.abspath(__file__))
44
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
5-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data'))
5+
6+
import env_info
7+
data_path = env_info.data_path
68
module_data_path = os.path.join(data_path, 'gae_proxy')
79

810
import xlog

code/default/gae_proxy/local/ipv6_tunnel/common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import os
22
import shlex
33
import subprocess
4-
from .pteredor import teredo_prober
54

5+
from .pteredor import teredo_prober
6+
import env_info
67
import utils
78
from xlog import getLogger
89
xlog = getLogger("gae_proxy")
910

1011
current_path = os.path.dirname(os.path.abspath(__file__))
1112
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, os.pardir))
12-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data', "gae_proxy"))
13+
data_path = os.path.join(env_info.data_path, "gae_proxy")
1314
if not os.path.isdir(data_path):
1415
data_path = current_path
1516

code/default/gae_proxy/local/ipv6_tunnel/win10.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
import time
77
import socket
88
import platform
9+
10+
import env_info
911
from .common import *
1012
from . import win32runas
1113
from .pteredor import local_ip_startswith
1214

1315
current_path = os.path.dirname(os.path.abspath(__file__))
1416
python_path = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir))
1517
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
16-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data', "gae_proxy"))
18+
data_path = os.path.join(env_info.data_path, "gae_proxy")
1719
if not os.path.isdir(data_path):
1820
data_path = current_path
1921

code/default/gae_proxy/local/proxy.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@
4444
current_path = os.path.dirname(os.path.abspath(__file__))
4545
root_path = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir))
4646
gae_proxy_path = os.path.join(root_path, "gae_proxy")
47-
data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data'))
48-
data_gae_proxy_path = os.path.join(data_path, 'gae_proxy')
49-
python_path = root_path
5047

48+
python_path = root_path
5149
noarch_lib = os.path.abspath( os.path.join(python_path, 'lib', 'noarch'))
5250
sys.path.append(noarch_lib)
5351

52+
import env_info
53+
data_path = env_info.data_path
54+
data_gae_proxy_path = os.path.join(data_path, 'gae_proxy')
55+
56+
5457
if sys.platform == "win32":
5558
win32_lib = os.path.abspath( os.path.join(python_path, 'lib', 'win32'))
5659
sys.path.append(win32_lib)

code/default/gae_proxy/local/web_control.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import env_info
2525
import utils
2626

27-
27+
import env_info
2828
from xlog import getLogger
2929
xlog = getLogger("gae_proxy")
3030
from .config import config, direct_config
@@ -38,7 +38,7 @@
3838

3939
root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir))
4040
top_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir))
41-
data_path = os.path.abspath( os.path.join(top_path, 'data', 'gae_proxy'))
41+
data_path = os.path.join(env_info.data_path, 'gae_proxy')
4242
web_ui_path = os.path.join(current_path, os.path.pardir, "web_ui")
4343

4444

0 commit comments

Comments
 (0)