提交 9af09992 编写于 作者: H hjdhnx

优化仙人模式逻辑

上级 977011a1
无法预览此类型文件
......@@ -219,8 +219,15 @@ def config_render(mode):
# print(dict(app.config))
tt = time()
UA = request.headers['User-Agent']
ISTVB = 'okhttp/3' in UA
logger.info(UA)
ver = getParmas('ver')
logger.info(f'ver:{ver},UA:{UA}')
if ver not in ['1','2']:
ISTVB = 'okhttp/3' in UA
elif ver == '1':
ISTVB = False
elif ver == '2':
ISTVB = True
# print(ISTVB)
if mode == 1:
jyw_ip = getHost(mode)
logger.info(jyw_ip)
......
......@@ -51,7 +51,7 @@
<a href="/rules/clear">缓存文件列表-清除</a>
</div>
<div class="btn">
<a href="{{ getHost(0) }}/config/0">本地配置地址</a>
<a href="{{ getHost(0) }}/config/0?ver=0">本地配置地址</a>
</div>
{% if is_linux %}
<div class="btn">
......@@ -63,7 +63,7 @@
</div>
{% if '192.168' in getHost(1) %}
<div class="btn">
<a href="{{ getHost(1) }}/config/1">局域网配置地址</a>
<a href="{{ getHost(1) }}/config/1?ver=0">局域网配置地址</a>
</div>
{% if is_linux %}
<div class="btn">
......@@ -75,7 +75,7 @@
</div>
{% endif %}
<div class="btn">
<a href="{{ getHost(2) }}/config/2">远程配置地址</a>
<a href="{{ getHost(2) }}/config/2?ver=0">远程配置地址</a>
</div>
{% if is_linux %}
<div class="btn">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册