1.7.0:常规发布

- 版本号 1.7.0 -> 1.7.0
- 重建三端并打包
- 关键测试全过
This commit is contained in:
xmz7891
2026-10-06 23:08:07 +08:00
parent 4c88ca901f
commit ce87ec1650
32 changed files with 2476 additions and 61 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

+26 -1
View File
@@ -58,7 +58,7 @@ from collections import deque
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
VERSION = "1.6.2"
VERSION = "1.7.0"
# ---------------- 参数(都能用环境变量覆盖)----------------
@@ -778,6 +778,8 @@ def _login_page(message: str = "") -> bytes:
notice = ('<p class="bad">' + message + '</p>') if message else ''
html = """<!doctype html><html lang=zh><meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="apple-touch-icon" href="/favicon.ico">
<title>中转服务器 · 登录</title>
<style>
body{font:14px/1.6 -apple-system,'Microsoft YaHei',sans-serif;
@@ -994,6 +996,29 @@ class Handler(BaseHTTPRequestHandler):
})
return
# ---- 网站图标 ----
if path in ("/favicon.ico", "/apple-touch-icon.png"):
icon = Path(__file__).resolve().parent / "favicon.ico"
if icon.is_file():
try:
blob = icon.read_bytes()
except OSError:
blob = b""
if blob:
self.send_response(200)
self.send_header("Content-Type", "image/x-icon")
self.send_header("Content-Length", str(len(blob)))
# 图标不常变,让浏览器缓存一天
self.send_header("Cache-Control", "public, max-age=86400")
self.end_headers()
self.wfile.write(blob)
return
# 没有图标文件就 404,别让请求打到后面的逻辑
self.send_response(404)
self.send_header("Content-Length", "0")
self.end_headers()
return
# ---- 成品下载(挂在管理页上给人下 APK / 整包)----
if path == "/v1/downloads":
self._json(200, {"ok": True, "files": _list_downloads()})