Initial release: CPCHECK cloud port detection tool

Web-based TCP/UDP port checker with firewall/GFW diagnosis, PM2 deployment config, and Ubuntu one-click install script.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 15:24:40 +08:00
commit 32c8f4b156
16 changed files with 1351 additions and 0 deletions
+278
View File
@@ -0,0 +1,278 @@
:root {
--bg: #0f1419;
--surface: #1a2332;
--surface-hover: #243044;
--border: #2d3a4f;
--text: #e7ecf3;
--text-muted: #8b9cb3;
--primary: #3b82f6;
--primary-hover: #2563eb;
--success: #22c55e;
--warning: #f59e0b;
--danger: #ef4444;
--info: #06b6d4;
--radius: 10px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
line-height: 1.6;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 2rem 1.5rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}
header {
text-align: center;
margin-bottom: 2.5rem;
}
header h1 {
font-size: 2rem;
font-weight: 700;
letter-spacing: 0.05em;
background: linear-gradient(135deg, var(--primary), var(--info));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
color: var(--text-muted);
margin-top: 0.5rem;
font-size: 0.95rem;
}
.check-form {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.form-row {
display: flex;
gap: 1rem;
margin-bottom: 1.25rem;
flex-wrap: wrap;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.4rem;
flex: 1;
min-width: 120px;
}
.form-group.flex-2 {
flex: 2;
min-width: 200px;
}
.form-group label {
font-size: 0.85rem;
color: var(--text-muted);
font-weight: 500;
}
.form-group input,
.form-group select {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.65rem 0.85rem;
color: var(--text);
font-size: 0.95rem;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: var(--primary);
}
.btn-primary {
width: 100%;
background: var(--primary);
color: #fff;
border: none;
border-radius: 6px;
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) {
background: var(--primary-hover);
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.error-box {
background: rgba(239, 68, 68, 0.1);
border: 1px solid var(--danger);
border-radius: var(--radius);
padding: 1rem 1.25rem;
color: var(--danger);
margin-bottom: 1.5rem;
}
.result-box {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.result-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.25rem;
}
.result-header h2 {
font-size: 1.1rem;
font-weight: 600;
}
.elapsed {
font-size: 0.85rem;
color: var(--text-muted);
}
.diagnosis-card {
display: flex;
align-items: flex-start;
gap: 1rem;
padding: 1.25rem;
border-radius: var(--radius);
margin-bottom: 1.5rem;
border: 1px solid var(--border);
}
.diagnosis-card.success { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.3); }
.diagnosis-card.warning { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }
.diagnosis-card.danger { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }
.diagnosis-card.info { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.3); }
.diagnosis-icon {
font-size: 1.75rem;
line-height: 1;
flex-shrink: 0;
}
.diagnosis-content h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.25rem;
}
.diagnosis-content p {
font-size: 0.9rem;
color: var(--text-muted);
}
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 0.75rem;
margin-bottom: 1.5rem;
}
.info-item {
background: var(--bg);
border-radius: 6px;
padding: 0.75rem;
}
.info-label {
display: block;
font-size: 0.75rem;
color: var(--text-muted);
margin-bottom: 0.2rem;
}
.info-value {
font-size: 0.9rem;
font-weight: 500;
}
.status-open { color: var(--success); }
.status-closed { color: var(--danger); }
.status-filtered { color: var(--warning); }
.status-unknown { color: var(--text-muted); }
.details-section h3 {
font-size: 0.9rem;
color: var(--text-muted);
margin-bottom: 0.75rem;
font-weight: 500;
}
.details-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.details-list li {
font-size: 0.85rem;
color: var(--text-muted);
padding-left: 1rem;
position: relative;
}
.details-list li::before {
content: "";
position: absolute;
left: 0;
color: var(--primary);
}
footer {
margin-top: auto;
padding-top: 2rem;
text-align: center;
color: var(--text-muted);
font-size: 0.8rem;
}
@media (max-width: 600px) {
.form-row {
flex-direction: column;
}
.form-group.flex-2 {
min-width: 100%;
}
}