forked from FunctionClub/V2ray.Fun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
264 lines (237 loc) · 11.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>V2ray.fun - 运行状态</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<link rel="stylesheet" href="/static/css/mdui.min.css">
<script src="/static/js/mdui.min.js"></script>
</head>
<body class="mdui-appbar-with-toolbar mdui-theme-primary-teal mdui-theme-accent-light-blue mdui-loaded mdui-drawer-body-left">
<header class="mdui-appbar mdui-appbar-fixed">
<div class="mdui-toolbar mdui-color-theme">
<span class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-drawer="{target: '#main-drawer', swipe: true}"><i class="mdui-icon material-icons">menu</i></span>
<a href="./" class="mdui-typo-headline mdui-hidden-xs">V2ray.fun</a>
<a href="" class="mdui-typo-title">运行状态</a>
<div class="mdui-toolbar-spacer"></div>
<a href="https://github.com/FunctionClub/" target="_blank" class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-tooltip="{content: 'Github'}">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve" class="mdui-icon" style="width: 24px;height:24px;">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#ffffff" d="M18,1.4C9,1.4,1.7,8.7,1.7,17.7c0,7.2,4.7,13.3,11.1,15.5
c0.8,0.1,1.1-0.4,1.1-0.8c0-0.4,0-1.4,0-2.8c-4.5,1-5.5-2.2-5.5-2.2c-0.7-1.9-1.8-2.4-1.8-2.4c-1.5-1,0.1-1,0.1-1
c1.6,0.1,2.5,1.7,2.5,1.7c1.5,2.5,3.8,1.8,4.7,1.4c0.1-1.1,0.6-1.8,1-2.2c-3.6-0.4-7.4-1.8-7.4-8.1c0-1.8,0.6-3.2,1.7-4.4
c-0.2-0.4-0.7-2.1,0.2-4.3c0,0,1.4-0.4,4.5,1.7c1.3-0.4,2.7-0.5,4.1-0.5c1.4,0,2.8,0.2,4.1,0.5c3.1-2.1,4.5-1.7,4.5-1.7
c0.9,2.2,0.3,3.9,0.2,4.3c1,1.1,1.7,2.6,1.7,4.4c0,6.3-3.8,7.6-7.4,8c0.6,0.5,1.1,1.5,1.1,3c0,2.2,0,3.9,0,4.5
c0,0.4,0.3,0.9,1.1,0.8c6.5-2.2,11.1-8.3,11.1-15.5C34.3,8.7,27,1.4,18,1.4z"></path>
</svg>
</a>
</div>
</header>
<div class="mdui-drawer" id="main-drawer">
<div class="mdui-list" mdui-collapse="{accordion: true}">
<div class="mdui-collapse-item mdui-collapse-item-open">
<div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-blue">near_me</i>
<div class="mdui-list-item-content">控制面板</div>
<i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
</div>
<div class="mdui-collapse-item-body mdui-list">
<a href="index.html" class="mdui-list-item mdui-ripple mdui-list-item-active">运行状态</a>
<a href="config.html" class="mdui-list-item mdui-ripple">修改连接</a>
<a href="app.html" class="mdui-list-item mdui-ripple ">软件下载</a>
<a href="log.html" class="mdui-list-item mdui-ripple ">运行日志</a>
</div>
</div>
</div>
</div>
<div class="mdui-container">
<p></p>
<div class="mdui-row">
<div class="mdui-table-fluid">
<table class="mdui-table">
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>运行状态</td>
<td>
<div class="mdui-row">
<div id="start" class="mdui-chip" hidden>
<span class="mdui-chip-icon mdui-color-green"><i class="mdui-icon material-icons">play_arrow</i></span>
<span class="mdui-chip-title">运行中</span>
</div>
<div id="stop" class="mdui-chip" hidden>
<span class="mdui-chip-icon mdui-color-red"><i class="mdui-icon material-icons">stop</i></span>
<span class="mdui-chip-title">已停止</span>
</div>
</div>
</td>
</tr>
<tr>
<td>服务器IP</td>
<td id="ip"></td>
</tr>
<tr>
<td>主端口</td>
<td id="port"></td>
</tr>
<tr>
<td>协议类型</td>
<td id="protocol"></td>
</tr>
<tr class="vmess-info">
<td>UUID</td>
<td>
<div class="mdui-row">
<div class="mdui-col-md-11">
<input id="uuid" class="mdui-textfield-input" type="text" readonly="readonly" value=""/>
</div>
</div>
</td>
</tr>
<tr class="vmess-info">
<td>加密方式</td>
<td id="encrypt"></td>
</tr>
<tr class="mtproto-info">
<td>用户秘钥</td>
<td id="secret"></td>
</tr>
<tr>
<td>传输方式</td>
<td id="trans"></td>
</tr>
<tr>
<td>TLS</td>
<td>
<div class="mdui-row">
<div hidden id="tls_on">
<i class="mdui-icon material-icons mdui-text-color-green">check</i>ON
</div>
<div hidden id="tls_off">
<i class="mdui-icon material-icons mdui-text-color-red">clear</i>Off
</div>
</div>
</td>
</tr>
<tr>
<td>Mux.cool</td>
<td>
<div class="mdui-row">
<div hidden id="mux_on">
<i class="mdui-icon material-icons mdui-text-color-green">check</i>ON
</div>
<div hidden id="mux_off">
<i class="mdui-icon material-icons mdui-text-color-red">clear</i>Off
</div>
</div>
</td>
</tr>
<tr class="vmess-info">
<td>
<div class="mdui-row">
<label class="mdui-textfield-label">Vmess:</label>
<textarea id="vmess_link" class="mdui-textfield-input" rows="4"></textarea>
</div>
</td>
<td>
<div class="mdui-row">
<div id="vmess_qr"></div>
</div>
</td>
</tr>
<tr class="vmess-info">
<td>
<div class="mdui-row">
<button onclick="open_vmess()" class="mdui-btn mdui-btn-block mdui-color-theme-500 mdui-ripple">打开Vmess链接</button>
</div>
</td>
<td>
<div class="mdui-row">
<a href="/static/config.json" download="config" style="text-decoration: none">
<button class="mdui-btn mdui-btn-block mdui-color-theme-accent mdui-ripple">下载配置文件</button>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p></p>
</body>
<script type="text/javascript">
$.get("/get_info", function(return_data){
let data = JSON.parse(return_data);
if (data["status"] === "on")
{
document.getElementById('start').removeAttribute('hidden');
}
else
{
document.getElementById('stop').removeAttribute('hidden');
}
document.getElementById('protocol').innerHTML = data['protocol']
if (data['protocol'] === "vmess") {
$('.vmess-info').removeAttr("style");
$('.mtproto-info').css("display", "none");
document.getElementById('uuid').value = data["uuid"];
document.getElementById('encrypt').innerHTML = data["encrypt"];
var raw_vmess_link = data["encrypt"] + ":" + data["uuid"] + "@" + data["ip"] + ":" + data["port"];
var vmess_link = "vmess://" + btoa(raw_vmess_link) + "?network=";
if(data["trans"].startsWith("mkcp"))
{
vmess_link += "kcp";
}
else if(data["trans"].startsWith("websocket"))
{
vmess_link += "ws";
}
else if(data["trans"].startsWith("tcp"))
{
vmess_link += "tcp";
}
document.getElementById('vmess_link').innerHTML = vmess_link;
$('#vmess_qr').qrcode({
width: 200,
height: 200,
text: vmess_link
});
} else if (data['protocol'] === "mtproto"){
$('.vmess-info').css("display", "none");
$('.mtproto-info').removeAttr("style");
document.getElementById('secret').innerHTML = data['secret']
}
document.getElementById('ip').innerHTML = data["ip"];
document.getElementById('port').innerHTML = data["port"];
document.getElementById('trans').innerHTML = data["trans"];
if(data["tls"] === "on")
{
document.getElementById('tls_on').removeAttribute('hidden');
}
else
{
document.getElementById('tls_off').removeAttribute('hidden');
}
if(data["mux"] === "on")
{
document.getElementById('mux_on').removeAttribute('hidden');
}
else
{
document.getElementById('mux_off').removeAttribute('hidden');
}
});
function open_vmess() {
window.window.location.href=document.getElementById('vmess_link').innerHTML
}
</script>
</html>