cicy-desktop 2.1.342 → 2.1.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/build-homepage.cjs +16 -1
- package/src/app-updater.js +30 -0
- package/src/backends/homepage-preload.js +3 -1
- package/src/backends/homepage-react/assets/index-Buyk0RlW.js +655 -0
- package/src/backends/homepage-react/assets/index-CVk0uc2g.css +1 -0
- package/src/backends/homepage-react/index.html +5 -3
- package/src/backends/homepage-react/panel/facebook-matrix.html +305 -87
- package/src/backends/homepage-react/panel/ipcheck.html +112 -0
- package/src/backends/homepage-react/panel/matrix.html +595 -0
- package/src/backends/homepage-react/panel/telegram-matrix.html +96 -22
- package/src/backends/homepage-react/panel/tiktok-matrix.html +599 -0
- package/src/backends/hub-client.js +108 -2
- package/src/backends/sidecar-ipc.js +33 -6
- package/src/main.js +67 -11
- package/src/sidecar/host-mihomo.js +47 -2
- package/src/tabbrowser/facebook-identity.js +12 -1
- package/src/tabbrowser/facebook-matrix.html +305 -87
- package/src/tabbrowser/fb-login.js +115 -0
- package/src/tabbrowser/newtab-protocol.js +6 -1
- package/src/tabbrowser/panel-cells.js +14 -1
- package/src/tabbrowser/telegram-matrix.html +96 -22
- package/src/tabbrowser/telegram-web-preferences.js +5 -1
- package/src/tabbrowser/tiktok-matrix.html +305 -87
- package/src/tools/tab-browser-tools.js +21 -100
- package/src/tray.js +22 -0
- package/test/bootstrap-failure-reporting.test.js +1 -1
- package/test/facebook-identity.test.js +3 -1
- package/test/facebook-matrix.test.js +2 -1
- package/test/telegram-matrix.test.js +2 -2
- package/test/tiktok-matrix.test.js +2 -1
- package/tools/arm-fblogin.js +32 -0
- package/tools/wsd-ws +114 -0
- package/workers/render/index.html +3 -1
- package/workers/render/package.json +2 -3
- package/workers/render/public/panel/facebook-matrix.html +305 -87
- package/workers/render/public/panel/ipcheck.html +112 -0
- package/workers/render/public/panel/matrix.html +595 -0
- package/workers/render/public/panel/telegram-matrix.html +96 -22
- package/workers/render/public/panel/tiktok-matrix.html +599 -0
- package/workers/render/src/App.css +4 -0
- package/workers/render/src/App.jsx +917 -52
- package/workers/render/stamp-panel-version.mjs +16 -0
- package/workers/render/worker.js +1 -1
- package/src/backends/homepage-react/assets/index-C6Zrdgc0.css +0 -1
- package/src/backends/homepage-react/assets/index-OG6JB73F.js +0 -411
- package/src/tabbrowser/cicy-code-tab-restore.js +0 -10
- package/test/cicy-code-tab-restore.test.js +0 -21
|
@@ -0,0 +1,112 @@
|
|
|
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">
|
|
6
|
+
<title>IP 核对</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { color-scheme: dark; --bg:#0A0A0A; --cell:#141416; --line:rgba(255,255,255,.10); --fg:#e6e6e9; --muted:#8b8b92; --ok:#3fb950; --warn:#f0b429; --bad:#ff5c5c; --accent:#4aa3ff; font-family: Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
|
|
9
|
+
* { box-sizing:border-box; }
|
|
10
|
+
html,body { margin:0; width:100%; height:100%; background:var(--bg); color:var(--fg); overflow:auto; }
|
|
11
|
+
.wrap { padding:10px 12px; display:flex; flex-direction:column; gap:12px; }
|
|
12
|
+
.card { border:1px solid var(--line); border-radius:10px; background:var(--cell); padding:10px 12px; }
|
|
13
|
+
.card h3 { margin:0 0 8px; font-size:12px; color:var(--muted); font-weight:600; letter-spacing:.02em; }
|
|
14
|
+
.r { display:flex; align-items:center; gap:8px; font-size:12.5px; line-height:2; }
|
|
15
|
+
.r .k { flex:none; width:104px; color:var(--muted); }
|
|
16
|
+
.r .v { flex:1; min-width:0; font-family:ui-monospace,monospace; word-break:break-all; }
|
|
17
|
+
.r .v b { color:var(--fg); }
|
|
18
|
+
.mut { color:var(--muted); }
|
|
19
|
+
.ok { color:var(--ok); } .warn { color:var(--warn); } .bad { color:var(--bad); }
|
|
20
|
+
.badge { display:inline-block; padding:1px 8px; border-radius:999px; font-size:11px; font-weight:600; }
|
|
21
|
+
.badge.dc { background:rgba(255,92,92,.15); color:#ff9e9e; border:1px solid rgba(255,92,92,.4); }
|
|
22
|
+
.badge.res { background:rgba(63,185,80,.15); color:#7ee787; border:1px solid rgba(63,185,80,.4); }
|
|
23
|
+
.badge.unk { background:var(--line); color:var(--muted); }
|
|
24
|
+
a { color:var(--accent); text-decoration:none; } a:hover { text-decoration:underline; }
|
|
25
|
+
.links { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:12px; }
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<div class="wrap">
|
|
30
|
+
<div class="card">
|
|
31
|
+
<h3>出口 IP</h3>
|
|
32
|
+
<div class="r"><span class="k">代理探测出口</span><span class="v" id="proxyip"><span class="mut">—</span></span></div>
|
|
33
|
+
<div class="r"><span class="k">浏览器真实出口</span><span class="v" id="realip"><span class="mut">读取中…</span></span></div>
|
|
34
|
+
<div class="r"><span class="k">一致性</span><span class="v" id="match"><span class="mut">—</span></span></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="card">
|
|
37
|
+
<h3>IP 情报</h3>
|
|
38
|
+
<div class="r"><span class="k">归属地</span><span class="v" id="geo"><span class="mut">—</span></span></div>
|
|
39
|
+
<div class="r"><span class="k">ASN / 运营商</span><span class="v" id="asn"><span class="mut">—</span></span></div>
|
|
40
|
+
<div class="r"><span class="k">类型</span><span class="v" id="type"><span class="mut">—</span></span></div>
|
|
41
|
+
<div class="r"><span class="k">数据源</span><span class="v" id="src"><span class="mut">—</span></span></div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="card">
|
|
44
|
+
<h3>完整风控 / 详情(新窗口)</h3>
|
|
45
|
+
<div class="links" id="links"><span class="mut">拿到真实出口 IP 后生成…</span></div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<script>
|
|
49
|
+
const qs = new URLSearchParams(location.search);
|
|
50
|
+
const proxyip = (qs.get('proxyip') || '').trim();
|
|
51
|
+
const $ = (id) => document.getElementById(id);
|
|
52
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
53
|
+
if (proxyip) $('proxyip').innerHTML = '<b>' + esc(proxyip) + '</b>';
|
|
54
|
+
|
|
55
|
+
// 数据中心/机房关键词(命中→非住宅)。住宅/ISP 走 else。
|
|
56
|
+
const DC = /\b(cloud|hosting|host|data\s?center|datacenter|colo|colocation|vps|server|cdn|telecom cloud)\b|amazon|aws|google|microsoft|azure|digitalocean|ovh|hetzner|linode|vultr|choopa|m247|datacamp|leaseweb|g-?core|gcore|tencent|alibaba|aliyun|oracle|contabo|hostwinds|colocrossing|akamai|fastly|cloudflare|scaleway|kamatera|constant company|zenlayer|psychz|nforce|sharktech/i;
|
|
57
|
+
|
|
58
|
+
async function realExitIp() {
|
|
59
|
+
const urls = ['https://ifconfig.me/ip', 'https://api.ipify.org', 'https://icanhazip.com', 'https://ipinfo.io/ip'];
|
|
60
|
+
for (const u of urls) {
|
|
61
|
+
try { const r = await fetch(u, { cache: 'no-store' }); if (r.ok) { const t = (await r.text()).trim(); if (/^[0-9a-fA-F:.]{3,45}$/.test(t)) return t; } } catch (e) {}
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function ipIntel(ip) {
|
|
67
|
+
try {
|
|
68
|
+
const r = await fetch('https://api.ipapi.is/?q=' + encodeURIComponent(ip), { cache: 'no-store' });
|
|
69
|
+
if (r.ok) { const d = await r.json(); return { src: 'ipapi.is', country: d.country, region: d.region, city: d.city, asn: d.asn, company: d.company }; }
|
|
70
|
+
} catch (e) {}
|
|
71
|
+
try {
|
|
72
|
+
const r = await fetch('https://ipinfo.io/' + encodeURIComponent(ip) + '/json', { cache: 'no-store' });
|
|
73
|
+
if (r.ok) { const d = await r.json(); const org = d.org || ''; return { src: 'ipinfo.io', country: d.country, region: d.region, city: d.city, asn: org.split(' ')[0], company: org.split(' ').slice(1).join(' ') || org, hostname: d.hostname }; }
|
|
74
|
+
} catch (e) {}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function renderIntel(ip, d) {
|
|
79
|
+
if (!d) { $('geo').innerHTML = '<span class="bad">情报获取失败</span>'; return; }
|
|
80
|
+
const geo = [d.city, d.region, d.country].filter(Boolean).join(' · ');
|
|
81
|
+
$('geo').innerHTML = geo ? esc(geo) : '<span class="mut">未知</span>';
|
|
82
|
+
$('asn').innerHTML = esc([d.asn, d.company].filter(Boolean).join(' · ')) || '<span class="mut">未知</span>';
|
|
83
|
+
$('src').innerHTML = esc(d.src) + (d.hostname ? ' · ' + esc(d.hostname) : '');
|
|
84
|
+
const hay = [d.asn, d.company, d.hostname].filter(Boolean).join(' ');
|
|
85
|
+
if (DC.test(hay)) $('type').innerHTML = '<span class="badge dc">数据中心 / 机房</span> <span class="mut">(非原生住宅,风险较高)</span>';
|
|
86
|
+
else $('type').innerHTML = '<span class="badge res">疑似住宅 / ISP</span> <span class="mut">(启发式,以完整风控为准)</span>';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function renderLinks(ip) {
|
|
90
|
+
$('links').innerHTML = [
|
|
91
|
+
['ping0.cc', 'https://ping0.cc/ip/' + encodeURIComponent(ip)],
|
|
92
|
+
['scamalytics', 'https://scamalytics.com/ip/' + encodeURIComponent(ip)],
|
|
93
|
+
['ipapi.is', 'https://ipapi.is/?q=' + encodeURIComponent(ip)],
|
|
94
|
+
['ipinfo', 'https://ipinfo.io/' + encodeURIComponent(ip)],
|
|
95
|
+
].map(([t, u]) => '<a href="' + u + '" target="_blank" rel="noreferrer">' + t + ' ↗</a>').join('');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
(async () => {
|
|
99
|
+
const ip = await realExitIp();
|
|
100
|
+
if (!ip) {
|
|
101
|
+
$('realip').innerHTML = '<span class="bad">读取失败(代理不通 / CORS 被拦)</span>';
|
|
102
|
+
if (proxyip) { renderLinks(proxyip); renderIntel(proxyip, await ipIntel(proxyip)); }
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
$('realip').innerHTML = '<b>' + esc(ip) + '</b>';
|
|
106
|
+
if (proxyip) $('match').innerHTML = (proxyip === ip) ? '<span class="ok">✓ 一致</span>' : '<span class="bad">✗ 不一致 · 浏览器实际走 ' + esc(ip) + '</span>';
|
|
107
|
+
renderLinks(ip);
|
|
108
|
+
renderIntel(ip, await ipIntel(ip));
|
|
109
|
+
})();
|
|
110
|
+
</script>
|
|
111
|
+
</body>
|
|
112
|
+
</html>
|