Skip to content

Commit c4b39d8

Browse files
authored
分离测试分支和正式分支
新增 index.html 文件,创建 AI Studio Proxy 的状态页面,包含服务器状态、监听地址和 API 端点信息,优化用户…
2 parents f509218 + 9182f33 commit c4b39d8

1 file changed

Lines changed: 141 additions & 0 deletions

File tree

index.html

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>AI Studio Proxy - Status</title>
7+
<style>
8+
body {
9+
background-color: #1a1a1a; /* 深色背景 */
10+
color: #00FF00; /* 亮绿色文本 */
11+
font-family: ui-monospace, 'Consolas', 'Menlo', 'Courier New', monospace; /* 优先系统等宽字体 */
12+
margin: 0;
13+
padding: 20px;
14+
line-height: 1.6;
15+
}
16+
.container {
17+
max-width: 800px;
18+
margin: 20px auto; /* 稍微居中容器 */
19+
padding: 25px;
20+
border: 1px solid #00FF00; /* 绿色边框 */
21+
box-shadow: 0 0 10px rgba(0, 255, 0, 0.3); /* 柔和的绿色辉光效果 */
22+
background-color: #0d0d0d; /* 稍有区别的深色 */
23+
border-radius: 5px; /* 添加圆角 */
24+
}
25+
26+
h1 {
27+
color: #FFFFFF; /* 白色标题 */
28+
text-align: center;
29+
margin-bottom: 20px;
30+
border-bottom: 1px dashed #00FF00;
31+
padding-bottom: 10px;
32+
}
33+
h2 {
34+
color: #FFFFFF;
35+
margin-top: 25px;
36+
margin-bottom: 10px;
37+
font-size: 1.1em;
38+
border-bottom: 1px solid #444;
39+
padding-bottom: 5px;
40+
}
41+
.status {
42+
font-weight: bold;
43+
margin-bottom: 20px;
44+
padding: 10px;
45+
background-color: rgba(0, 255, 0, 0.1); /* 轻微绿色背景 */
46+
border-left: 3px solid #00FF00;
47+
}
48+
.status.ok {
49+
color: #00FF00; /* 绿色状态 */
50+
}
51+
.status.error { /* 备用:用于可能的错误状态 */
52+
color: #FF0000; /* 红色状态 */
53+
background-color: rgba(255, 0, 0, 0.1);
54+
border-left: 3px solid #FF0000;
55+
}
56+
hr {
57+
border: none;
58+
border-top: 1px dashed #444; /* 稍亮的虚线 */
59+
margin: 30px 0; /* 增大上下边距 */
60+
}
61+
.endpoints ul {
62+
list-style-type: none; /* 移除默认列表符号 */
63+
padding-left: 0;
64+
}
65+
.endpoints li::before {
66+
content: '> '; /* 添加终端风格的前缀 */
67+
color: #888; /* 暗淡的前缀颜色 */
68+
}
69+
.endpoints li {
70+
margin-bottom: 5px;
71+
}
72+
strong {
73+
color: #FFFFFF; /* 白色强调 */
74+
}
75+
a {
76+
color: #00FFFF; /* 青色链接 */
77+
text-decoration: none;
78+
transition: color 0.2s ease-in-out; /* 添加颜色过渡效果 */
79+
}
80+
a:hover {
81+
text-decoration: underline;
82+
color: #FFFFFF; /* 悬停时变白 */
83+
}
84+
.description {
85+
color: #cccccc; /* 稍浅的灰色描述文字 */
86+
font-style: italic;
87+
}
88+
.footer {
89+
margin-top: 30px;
90+
text-align: center;
91+
font-size: 0.9em;
92+
color: #888; /* 暗淡的页脚 */
93+
}
94+
/* Blinking cursor simulation */
95+
.blinking-cursor::after {
96+
content: '_';
97+
animation: blink 1s step-end infinite;
98+
margin-left: 5px;
99+
}
100+
@keyframes blink {
101+
from, to { color: transparent; }
102+
50% { color: #00FF00; }
103+
}
104+
</style>
105+
</head>
106+
<body>
107+
<div class="container">
108+
<h1>AI Studio Proxy Server</h1>
109+
110+
<!-- 假设服务器启动总是成功的 -->
111+
<p class="status ok">STATUS: RUNNING | Playwright Connection: [ ACTIVE ] <span class="blinking-cursor"></span></p>
112+
113+
<hr>
114+
115+
<p>代理服务器已启动,正在监听请求...</p>
116+
117+
<div class="endpoints">
118+
<h2>Listening Address & Endpoints:</h2>
119+
<p><strong>Base URL:</strong> <a href="http://localhost:2048/" target="_blank" title="Refresh this page">http://localhost:2048/</a></p>
120+
<ul>
121+
<li><strong>API (Completions):</strong> /v1/chat/completions</li>
122+
<li><strong>API (Models):</strong> /v1/models</li>
123+
<li><strong>Health Check:</strong> <a href="/health" target="_blank">/health</a></li>
124+
<li><strong>Web UI (This Page):</strong> /</li>
125+
</ul>
126+
</div>
127+
128+
<hr>
129+
130+
<p class="description">
131+
This service proxies requests to Google AI Studio via Playwright automation,<br>
132+
providing an OpenAI-compatible API interface.<br>
133+
Ensure the Chrome debugging instance and the AI Studio page remain active.
134+
</p>
135+
136+
<p class="footer">
137+
:: G33K_STYL3 ENGAGED :: | <a href="https://github.com/CJackHwang/AIstudioProxyAPI" target="_blank" title="View Project on GitHub">Project on GitHub</a> | <a href="https://github.com/CJackHwang" target="_blank" title="Author's GitHub Profile">Author's GitHub</a>
138+
</p>
139+
</div>
140+
</body>
141+
</html>

0 commit comments

Comments
 (0)