|
7 | 7 | <meta http-equiv="x-dns-prefetch-control" content="on">
|
8 | 8 | <link rel="dns-prefetch" href="//cdn.jsdelivr.net">
|
9 | 9 | <link rel="dns-prefetch" href="//whois.pconline.com.cn">
|
10 |
| - <link rel="dns-prefetch" href="//forge.speedtest.cn"> |
| 10 | + <link rel="dns-prefetch" href="//pubstatic.b0.upaiyun.com"> |
11 | 11 | <link rel="dns-prefetch" href="//api-ipv4.ip.sb">
|
12 | 12 | <link rel="dns-prefetch" href="//api.ipify.org">
|
13 | 13 | <link rel="dns-prefetch" href="//api.ttt.sh">
|
14 | 14 | <link rel="dns-prefetch" href="//qqwry.api.skk.moe">
|
15 | 15 | <link rel="dns-prefetch" href="//d.skk.moe">
|
16 |
| - <link rel="preconnect" href="https://forge.speedtest.cn"> |
| 16 | + <link rel="preconnect" href="https://pubstatic.b0.upaiyun.com"> |
17 | 17 | <link rel="preconnect" href="https://whois.pconline.com.cn">
|
18 | 18 | <link rel="preconnect" href="https://api-ipv4.ip.sb">
|
19 | 19 | <link rel="preconnect" href="https://api.ipify.org">
|
|
143 | 143 | <span style="float: right;"><img src="/luci-static/resources/openclash/img/eye-light.svg" height="20px" title="<%:Hide IP%>" alt="<%:Hide IP%>" id="eye-icon" onclick="return privacy_my_ip(this)" /></span>
|
144 | 144 | </p>
|
145 | 145 | <p style="margin: 10px -2% 0 8%; text-align: left; padding-left: 0px !important; padding-right: 0px !important;">
|
146 |
| - <span class="ip-title">SpeedTest:</span><span class="ip-result" id="ip-speedtest"></span> <span class="ip-geo" id="ip-speedtest-geo"></span> |
| 146 | + <span class="ip-title">UpaiYun:</span><span class="ip-result" id="ip-upaiyun"></span> <span class="ip-geo" id="ip-upaiyun-geo"></span> |
147 | 147 | </p>
|
148 | 148 | <p style="margin: 10px -2% 0 8%; text-align: left; padding-left: 0px !important; padding-right: 0px !important;">
|
149 | 149 | <span class="ip-title">PConline:</span><span class="ip-result" id="ip-pcol"></span> <span class="ip-geo" id="ip-pcol-geo"></span>
|
|
189 | 189 | const $$ = document;
|
190 | 190 | var ip_pcol_ip;
|
191 | 191 | var ip_ipsb_ip;
|
192 |
| - var ip_speedtest_ip; |
| 192 | + var ip_upaiyun_ip; |
193 | 193 | var ip_ipify_ip;
|
194 | 194 | var refresh_http;
|
195 | 195 | var refresh_ip;
|
196 | 196 | $$.getElementById('ip-pcol').innerHTML = '<%:Querying...%>';
|
197 | 197 | $$.getElementById('ip-ipify').innerHTML = '<%:Querying...%>';
|
198 |
| - $$.getElementById('ip-speedtest').innerHTML = '<%:Querying...%>'; |
| 198 | + $$.getElementById('ip-upaiyun').innerHTML = '<%:Querying...%>'; |
199 | 199 | $$.getElementById('ip-ipsb').innerHTML = '<%:Querying...%>';
|
200 | 200 | let random = parseInt(Math.random() * 100000000);
|
201 | 201 | let IP = {
|
|
259 | 259 | IP.parseIPIpip(resp.data.ip, 'ip-ipapi-geo');
|
260 | 260 | })
|
261 | 261 | },
|
262 |
| - getSpeedIP: () => { |
263 |
| - IP.get(`https://forge.speedtest.cn/api/location/info?z=${random}`, 'json') |
| 262 | + //getSpeedIP: () => { |
| 263 | + // IP.get(`https://forge.speedtest.cn/api/location/info?z=${random}`, 'json') |
| 264 | + // .then(resp => { |
| 265 | + // if (localStorage.getItem('privacy_my_ip') != 'true') { |
| 266 | + // $$.getElementById('ip-speedtest').innerHTML = resp.data.ip; |
| 267 | + // }; |
| 268 | + //$$.getElementById('ip-speedtest-geo').innerHTML = resp.data.country + resp.data.province + resp.data.city + (resp.data.distinct == "null" ? '' : resp.data.distinct) + ' ' + (resp.data.isp == "null" ? '' : resp.data.isp); |
| 269 | + // IP.parseIPIpip(resp.data.ip, 'ip-speedtest-geo'); |
| 270 | + // }) |
| 271 | + //}, |
| 272 | + getUpaiIP: () => { |
| 273 | + IP.get(`https://pubstatic.b0.upaiyun.com/?_upnode&z=${random}`, 'json') |
264 | 274 | .then(resp => {
|
265 | 275 | if (localStorage.getItem('privacy_my_ip') != 'true') {
|
266 |
| - $$.getElementById('ip-speedtest').innerHTML = resp.data.ip; |
| 276 | + $$.getElementById('ip-upaiyun').innerHTML = resp.data.remote_addr; |
267 | 277 | };
|
268 |
| - //$$.getElementById('ip-speedtest-geo').innerHTML = resp.data.country + resp.data.province + resp.data.city + (resp.data.distinct == "null" ? '' : resp.data.distinct) + ' ' + (resp.data.isp == "null" ? '' : resp.data.isp); |
269 |
| - IP.parseIPIpip(resp.data.ip, 'ip-speedtest-geo'); |
| 278 | + $$.getElementById('ip-upaiyun-geo').innerHTML = resp.data.remote_addr_location.country + resp.data.remote_addr_location.province + resp.data.remote_addr_location.city + ' ' + resp.data.remote_addr_location.isp; |
| 279 | + //IP.parseIPIpip(resp.data.remote_addr, 'ip-upaiyun-geo'); |
270 | 280 | })
|
271 | 281 | },
|
272 | 282 | getIpifyIP: () => {
|
|
383 | 393 | mypage.appendChild(sbipScript);
|
384 | 394 |
|
385 | 395 | //HTTP.runcheck();
|
386 |
| - IP.getSpeedIP(); |
| 396 | + IP.getUpaiIP(); |
387 | 397 | IP.getIpifyIP();
|
388 | 398 | };
|
389 | 399 |
|
|
395 | 405 | $$.getElementById('eye-icon').alt='<%:Show IP%>';
|
396 | 406 | ip_pcol_ip = $$.getElementById('ip-pcol').innerHTML;
|
397 | 407 | ip_ipsb_ip = $$.getElementById('ip-ipsb').innerHTML;
|
398 |
| - ip_speedtest_ip = $$.getElementById('ip-speedtest').innerHTML; |
| 408 | + ip_upaiyun_ip = $$.getElementById('ip-upaiyun').innerHTML; |
399 | 409 | ip_ipify_ip = $$.getElementById('ip-ipify').innerHTML;
|
400 | 410 | $$.getElementById('ip-pcol').innerHTML = '***.***.***.***';
|
401 | 411 | $$.getElementById('ip-ipsb').innerHTML = '***.***.***.***';
|
402 |
| - $$.getElementById('ip-speedtest').innerHTML = '***.***.***.***'; |
| 412 | + $$.getElementById('ip-upaiyun').innerHTML = '***.***.***.***'; |
403 | 413 | $$.getElementById('ip-ipify').innerHTML = '***.***.***.***';
|
404 | 414 | }
|
405 | 415 | else {
|
|
419 | 429 | imgobj.alt='<%:Show IP%>';
|
420 | 430 | ip_pcol_ip = $$.getElementById('ip-pcol').innerHTML;
|
421 | 431 | ip_ipsb_ip = $$.getElementById('ip-ipsb').innerHTML;
|
422 |
| - ip_speedtest_ip = $$.getElementById('ip-speedtest').innerHTML; |
| 432 | + ip_upaiyun_ip = $$.getElementById('ip-upaiyun').innerHTML; |
423 | 433 | ip_ipify_ip = $$.getElementById('ip-ipify').innerHTML;
|
424 | 434 | $$.getElementById('ip-pcol').innerHTML = '***.***.***.***';
|
425 | 435 | $$.getElementById('ip-ipsb').innerHTML = '***.***.***.***';
|
426 |
| - $$.getElementById('ip-speedtest').innerHTML = '***.***.***.***'; |
| 436 | + $$.getElementById('ip-upaiyun').innerHTML = '***.***.***.***'; |
427 | 437 | $$.getElementById('ip-ipify').innerHTML = '***.***.***.***';
|
428 | 438 | }
|
429 | 439 | else {
|
|
432 | 442 | imgobj.alt='<%:Hide IP%>';
|
433 | 443 | $$.getElementById('ip-pcol').innerHTML = ip_pcol_ip;
|
434 | 444 | $$.getElementById('ip-ipsb').innerHTML = ip_ipsb_ip;
|
435 |
| - $$.getElementById('ip-speedtest').innerHTML = ip_speedtest_ip; |
| 445 | + $$.getElementById('ip-upaiyun').innerHTML = ip_upaiyun_ip; |
436 | 446 | $$.getElementById('ip-ipify').innerHTML = ip_ipify_ip;
|
437 | 447 | localStorage.removeItem('privacy_my_ip');
|
438 | 448 | myip_Load();
|
|
452 | 462 |
|
453 | 463 | HTTP.runcheck();
|
454 | 464 | IP.getIpifyIP();
|
455 |
| - IP.getSpeedIP(); |
| 465 | + IP.getUpaiIP(); |
456 | 466 | show_my_ip();
|
457 | 467 | </script>
|
458 | 468 | <script type="text/javascript">
|
|
0 commit comments