| <template v-if="fromClient"> |
| 9 | <router-link to="/clients" class="breadcrumb-item">Clients</router-link> |
| 10 | <span class="breadcrumb-separator">/</span> |
| 11 | <router-link :to="`/clients/${fromClient}`" class="breadcrumb-item">{{ |
| 12 | fromClient |
| 13 | }}</router-link> |
| 14 | <span class="breadcrumb-separator">/</span> |
| 15 | </template> |
| 16 | <template v-else> |
| 17 | <router-link to="/proxies" class="breadcrumb-item">Proxies</router-link> |
| 18 | <span class="breadcrumb-separator">/</span> |
| 19 | <router-link |
| 20 | v-if="proxy?.clientID" |
| 21 | :to="clientLink" |
| 22 | class="breadcrumb-item" |
| 23 | > |
| 24 | {{ proxy.user ? `${proxy.user}.${proxy.clientID}` : proxy.clientID }} |
| 25 | </router-link> |
| 26 | <span v-if="proxy?.clientID" class="breadcrumb-separator">/</span> |
| 27 | </template> |
| 28 | <span class="breadcrumb-current">{{ proxyName }}</span> |
| 29 | </nav> |
| 30 |
| 31 | <div v-loading="loading" class="detail-content"> |
| 32 | <template v-if="proxy"> |
| 33 | <!-- Header Section --> |
| 34 | <div class="header-section"> |
| 35 | <div class="header-main"> |
| 36 | <div |
| 37 | class="proxy-icon" |
| 38 | :style="{ background: proxyIconConfig.gradient }" |
| 39 | > |
| 40 | <el-icon><component :is="proxyIconConfig.icon" /></el-icon> |
| 41 | </div> |
| 42 | <div class="header-info"> |
| 43 | <div class="header-title-row"> |
| 44 | <h1 class="proxy-name">{{ proxy.name }}</h1> |
| 45 | <span class="type-tag">{{ proxy.type.toUpperCase() }}</span> |
| 46 | <span class="status-badge" :class="proxy.status"> |
| 47 | {{ proxy.status }} |
| 48 | </span> |
| 49 | </div> |
| 50 | <div class="header-meta"> |
| 51 | <router-link |
| 52 | v-if="proxy.clientID" |
| 53 | :to="clientLink" |
| 54 | class="meta-link" |
| 55 | > |
| 56 | <el-icon><Monitor /></el-icon> |
| 57 | <span>{{ |
| 58 | proxy.user |
| 59 | ? `${proxy.user}.${proxy.clientID}` |
| 60 | : proxy.clientID |
| 61 | }}</span> |
| 62 | </router-link> |
| 63 | <span v-if="proxy.lastStartTime" class="meta-text"> |
| 64 | <span class="meta-sep">·</span> |
| 65 | Last Started {{ proxy.lastStartTime }} |
| 66 | </span> |
| 67 | <span v-if="proxy.lastCloseTime" class="meta-text"> |
| 68 | <span class="meta-sep">·</span> |
| 69 | Last Closed {{ proxy.lastCloseTime }} |
| 70 | </span> |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |
| 74 | </div> |
| 75 |
| 76 | <!-- Stats Bar --> |
| 77 | <div class="stats-bar"> |
| 78 | <div v-if="proxy.port" class="stats-item"> |
| 79 | <span class="stats-label">Port</span> |
| 80 | <span class="stats-value">{{ proxy.port }}</span> |
| 81 | </div> |
| 82 | <div class="stats-item"> |
| 83 | <span class="stats-label">Connections</span> |
| 84 | <span class="stats-value">{{ proxy.conns }}</span> |
| 85 | </div> |
| 86 | <div class="stats-item"> |
| 87 | <span class="stats-label">Traffic</span> |
| 88 | <span class="stats-value">↓ {{ formatTrafficValue(proxy.trafficIn) }} <small>{{ formatTrafficUnit(proxy.trafficIn) }}</small> / ↑ {{ formatTrafficValue(proxy.trafficOut) }} <small>{{ formatTrafficUnit(proxy.trafficOut) }}</small></span> |
| 89 | </div> |
| 90 | </div> |
| 91 |
| 92 | <!-- Configuration Section --> |
| 93 | <div class="config-section"> |
| 94 | <div class="config-section-header"> |
| 95 | <el-icon><Setting /></el-icon> |
| 96 | <h2>Configuration</h2> |
| 97 | </div> |
| 98 |
| 99 | <!-- Config Cards Grid --> |
| 100 | <div class="config-grid"> |
| 101 | <div class="config-item-card"> |
| 102 | <div class="config-item-icon encryption"> |
| 103 | <el-icon><Lock /></el-icon> |
| 104 | </div> |
| 105 | <div class="config-item-content"> |
| 106 | <span class="config-item-label">Encryption</span> |
| 107 | <span class="config-item-value">{{ |
| 108 | proxy.encryption ? 'Enabled' : 'Disabled' |
| 109 | }}</span> |
| 110 | </div> |
| 111 | </div> |
| 112 |
| 113 | <div class="config-item-card"> |
| 114 | <div class="config-item-icon compression"> |
| 115 | <el-icon><Lightning /></el-icon> |
| 116 | </div> |
| 117 | <div class="config-item-content"> |
| 118 | <span class="config-item-label">Compression</span> |
| 119 | <span class="config-item-value">{{ |
| 120 | proxy.compression ? 'Enabled' : 'Disabled' |
| 121 | }}</span> |
| 122 | </div> |
| 123 | </div> |
| 124 |
| 125 | <div v-if="proxy.customDomains" class="config-item-card"> |
| 126 | <div class="config-item-icon domains"> |
| 127 | <el-icon><Link /></el-icon> |
| 128 | </div> |
| 129 | <div class="config-item-content"> |
| 130 | <span class="config-item-label">Custom Domains</span> |
| 131 | <span class="config-item-value">{{ proxy.customDomains }}</span> |
| 132 | </div> |
| 133 | </div> |
| 134 |
| 135 | <div v-if="proxy.subdomain" class="config-item-card"> |
| 136 | <div class="config-item-icon subdomain"> |
| 137 | <el-icon><Link /></el-icon> |
| 138 | </div> |
| 139 | <div class="config-item-content"> |
| 140 | <span class="config-item-label">Subdomain</span> |
| 141 | <span class="config-item-value">{{ proxy.subdomain }}</span> |
| 142 | </div> |
| 143 | </div> |
| 144 |
| 145 | <div v-if="proxy.locations" class="config-item-card"> |
| 146 | <div class="config-item-icon locations"> |
| 147 | <el-icon><Location /></el-icon> |
| 148 | </div> |
| 149 | <div class="config-item-content"> |
| 150 | <span class="config-item-label">Locations</span> |
| 151 | <span class="config-item-value">{{ proxy.locations }}</span> |
| 152 | </div> |
| 153 | </div> |
| 154 |
| 155 | <div v-if="proxy.hostHeaderRewrite" class="config-item-card"> |
| 156 | <div class="config-item-icon host"> |
| 157 | <el-icon><Tickets /></el-icon> |
| 158 | </div> |
| 159 | <div class="config-item-content"> |
| 160 | <span class="config-item-label">Host Rewrite</span> |
| 161 | <span class="config-item-value">{{ |
| 162 | proxy.hostHeaderRewrite |
| 163 | }}</span> |
| 164 | </div> |
| 165 | </div> |
| 166 |
| 167 | <div v-if="proxy.multiplexer" class="config-item-card"> |
| 168 | <div class="config-item-icon multiplexer"> |
| 169 | <el-icon><Cpu /></el-icon> |
| 170 | </div> |
| 171 | <div class="config-item-content"> |
| 172 | <span class="config-item-label">Multiplexer</span> |
| 173 | <span class="config-item-value">{{ proxy.multiplexer }}</span> |
| 174 | </div> |
| 175 | </div> |
| 176 |
| 177 | <div v-if="proxy.routeByHTTPUser" class="config-item-card"> |
| 178 | <div class="config-item-icon route"> |
| 179 | <el-icon><Connection /></el-icon> |
| 180 | </div> |
| 181 | <div class="config-item-content"> |
| 182 | <span class="config-item-label">Route By HTTP User</span> |
| 183 | <span class="config-item-value">{{ |
| 184 | proxy.routeByHTTPUser |
| 185 | }}</span> |
| 186 | </div> |
| 187 | </div> |
| 188 | </div> |
| 189 |
| 190 | <!-- Annotations --> |
| 191 | <template v-if="proxy.annotations && proxy.annotations.size > 0"> |
| 192 | <div class="annotations-section"> |
| 193 | <div |
| 194 | v-for="[key, value] in proxy.annotations" |
| 195 | :key="key" |
| 196 | class="annotation-tag" |
| 197 | > |
| 198 | {{ key }}: {{ value }} |
| 199 | </div> |
| 200 | </div> |
| 201 | </template> |
| 202 | </div> |
| 203 |
| 204 | <!-- Traffic Card --> |
| 205 | <div class="traffic-card"> |
| 206 | <div class="traffic-header"> |
| 207 | <h2>Traffic Statistics</h2> |
| 208 | </div> |
| 209 | <div class="traffic-body"> |
| 210 | <Traffic :proxy-name="proxyName" /> |
| 211 | </div> |
| 212 | </div> |
| 213 | </template> |
| 214 |
| 215 | <div v-else-if="!loading" class="not-found"> |
| 216 | <h2>Proxy not found</h2> |
| 217 | <p>The proxy doesn't exist or has been removed.</p> |
| 218 | <router-link to="/proxies"> |
| 219 | <el-button type="primary">Back to Proxies</el-button> |
| 220 | </router-link> |
| 221 | </div> |
| 222 | </div> |
| 223 | </div> |
| 224 | </template> |
| 225 |
| 226 | <script setup lang="ts"> |
| 227 | import { ref, computed, onMounted } from 'vue' |
| 228 | import { useRoute, useRouter } from 'vue-router' |
| 229 | import { ElMessage } from 'element-plus' |
| 230 | import { |
| 231 | ArrowLeft, |
| 232 | Monitor, |
| 233 | Connection, |
| 234 | Link, |
| 235 | Lock, |
| 236 | Promotion, |
| 237 | Grid, |
| 238 | Setting, |
| 239 | Cpu, |
| 240 | Lightning, |
| 241 | Tickets, |
| 242 | Location, |
| 243 | } from '@element-plus/icons-vue' |
| 244 | import { getProxyByNameV2 } from '../api/proxy' |
| 245 | import { getServerInfo } from '../api/server' |
| 246 | import { |
| 247 | BaseProxy, |
| 248 | TCPProxy, |
| 249 | UDPProxy, |
| 250 | HTTPProxy, |
| 251 | HTTPSProxy, |
| 252 | TCPMuxProxy, |
| 253 | STCPProxy, |
| 254 | SUDPProxy, |
| 255 | } from '../utils/proxy' |
| 256 | import Traffic from '../components/Traffic.vue' |
| 257 | import type { ServerInfo } from '../types/server' |
| 258 |
| 259 | const route = useRoute() |
| 260 | const router = useRouter() |
| 261 | const proxyName = computed(() => route.params.name as string) |
| 262 | const fromClient = computed(() => { |
| 263 | if (route.query.from === 'client' && route.query.client) { |
| 264 | return route.query.client as string |
| 265 | } |
| 266 | return null |
| 267 | }) |
| 268 | const proxy = ref<BaseProxy | null>(null) |
| 269 | const loading = ref(true) |
| 270 |
| 271 | const goBack = () => { |
| 272 | if (window.history.length > 1) { |
| 273 | router.back() |
| 274 | } else { |
| 275 | router.push('/proxies') |
| 276 | } |
| 277 | } |
| 278 |
| 279 | let serverInfo: ServerInfo | null = null |
| 280 |
| 281 | const clientLink = computed(() => { |
| 282 | if (!proxy.value) return '' |
| 283 | const key = proxy.value.user |
| 284 | ? `${proxy.value.user}.${proxy.value.clientID}` |
| 285 | : proxy.value.clientID |
| 286 | return `/clients/${key}` |
| 287 | }) |
| 288 |
| 289 | const proxyIconConfig = computed(() => { |
| 290 | const type = proxy.value?.type?.toLowerCase() || '' |
| 291 | const configs: Record<string, { icon: any; gradient: string }> = { |
| 292 | tcp: { |
| 293 | icon: Connection, |
| 294 | gradient: 'linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)', |
| 295 | }, |
| 296 | udp: { |
| 297 | icon: Promotion, |
| 298 | gradient: 'linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%)', |
| 299 | }, |
| 300 | http: { |
| 301 | icon: Link, |
| 302 | gradient: 'linear-gradient(135deg, #22c55e 0%, #16a34a 100%)', |
| 303 | }, |
| 304 | https: { |
| 305 | icon: Lock, |
| 306 | gradient: 'linear-gradient(135deg, #14b8a6 0%, #0d9488 100%)', |
| 307 | }, |
| 308 | stcp: { |
| 309 | icon: Lock, |
| 310 | gradient: 'linear-gradient(135deg, #f97316 0%, #ea580c 100%)', |
| 311 | }, |
| 312 | sudp: { |
| 313 | icon: Lock, |
| 314 | gradient: 'linear-gradient(135deg, #f97316 0%, #ea580c 100%)', |
| 315 | }, |
| 316 | tcpmux: { |
| 317 | icon: Grid, |
| 318 | gradient: 'linear-gradient(135deg, #06b6d4 0%, #0891b2 100%)', |
| 319 | }, |
| 320 | xtcp: { |
| 321 | icon: Connection, |
| 322 | gradient: 'linear-gradient(135deg, #ec4899 0%, #db2777 100%)', |
| 323 | }, |
| 324 | } |
| 325 | return ( |
| 326 | configs[type] || { |
| 327 | icon: Connection, |
| 328 | gradient: 'linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)', |
| 329 | } |
| 330 | ) |
| 331 | }) |
| 332 |
| 333 | const formatTrafficValue = (bytes: number): string => { |
| 334 | if (bytes === 0) return '0' |
| 335 | const k = 1024 |
| 336 | const i = Math.floor(Math.log(bytes) / Math.log(k)) |
| 337 | const value = bytes / Math.pow(k, i) |
| 338 | return value < 10 ? value.toFixed(1) : Math.round(value).toString() |
| 339 | } |
| 340 |
| 341 | const formatTrafficUnit = (bytes: number): string => { |
| 342 | if (bytes === 0) return 'B' |
| 343 | const units = ['B', 'KB', 'MB', 'GB', 'TB'] |
| 344 | const k = 1024 |
| 345 | const i = Math.floor(Math.log(bytes) / Math.log(k)) |
| 346 | return units[i] |
| 347 | } |
| 348 |
| 349 | const fetchServerInfo = async () => { |
| 350 | if (serverInfo) return serverInfo |
| 351 | const res = await getServerInfo() |
| 352 | serverInfo = res |
| 353 | return serverInfo |
| 354 | } |
| 355 |
| 356 | const fetchProxy = async () => { |
| 357 | const name = proxyName.value |
| 358 | if (!name) { |
| 359 | loading.value = false |
| 360 | return |
| 361 | } |
| 362 |
| 363 | try { |
| 364 | const data = await getProxyByNameV2(name) |
| 365 | const info = await fetchServerInfo() |
| 366 | const config = info.config |
| 367 | const type = data.type || data.conf?.type || '' |
| 368 |
| 369 | if (type === 'tcp') { |
| 370 | proxy.value = new TCPProxy(data) |
| 371 | } else if (type === 'udp') { |
| 372 | proxy.value = new UDPProxy(data) |
| 373 | } else if (type === 'http' && config.vhostHTTPPort) { |
| 374 | proxy.value = new HTTPProxy( |
| 375 | data, |
| 376 | config.vhostHTTPPort, |
| 377 | config.subdomainHost, |
| 378 | ) |
| 379 | } else if (type === 'https' && config.vhostHTTPSPort) { |
| 380 | proxy.value = new HTTPSProxy( |
| 381 | data, |
| 382 | config.vhostHTTPSPort, |
| 383 | config.subdomainHost, |
| 384 | ) |
| 385 | } else if (type === 'tcpmux' && config.tcpmuxHTTPConnectPort) { |
| 386 | proxy.value = new TCPMuxProxy( |
| 387 | data, |
| 388 | config.tcpmuxHTTPConnectPort, |
| 389 | config.subdomainHost, |
| 390 | ) |
| 391 | } else if (type === 'stcp') { |
| 392 | proxy.value = new STCPProxy(data) |
| 393 | } else if (type === 'sudp') { |
| 394 | proxy.value = new SUDPProxy(data) |
| 395 | } else { |
| 396 | proxy.value = new BaseProxy(data) |
| 397 | proxy.value.type = type |
| 398 | } |
| 399 | } catch (error: any) { |
| 400 | ElMessage.error('Failed to fetch proxy: ' + error.message) |
| 401 | } finally { |
| 402 | loading.value = false |
| 403 | } |
| 404 | } |
| 405 |
| 406 | onMounted(() => { |
| 407 | fetchProxy() |
| 408 | }) |
| 409 | </script> |
| 410 |
| 411 | <style scoped> |
| 412 | .proxy-detail-page { |
| 413 | } |
| 414 |
| 415 | /* Breadcrumb */ |
| 416 | .breadcrumb { |
| 417 | display: flex; |
| 418 | align-items: center; |
| 419 | gap: 8px; |
| 420 | font-size: 14px; |
| 421 | margin-bottom: 24px; |
| 422 | } |
| 423 |
| 424 | .breadcrumb-link { |
| 425 | display: flex; |
| 426 | align-items: center; |
| 427 | color: var(--text-secondary); |
| 428 | cursor: pointer; |
| 429 | transition: color 0.2s; |
| 430 | margin-right: 4px; |
| 431 | } |
| 432 |
| 433 | .breadcrumb-link:hover { |
| 434 | color: var(--text-primary); |
| 435 | } |
| 436 |
| 437 | .breadcrumb-item { |
| 438 | color: var(--text-secondary); |
| 439 | text-decoration: none; |
| 440 | transition: color 0.2s; |
| 441 | } |
| 442 |
| 443 | .breadcrumb-item:hover { |
| 444 | color: var(--el-color-primary); |
| 445 | } |
| 446 |
| 447 | .breadcrumb-separator { |
| 448 | color: var(--el-border-color); |
| 449 | } |
| 450 |
| 451 | .breadcrumb-current { |
| 452 | color: var(--text-primary); |
| 453 | font-weight: 500; |
| 454 | } |
| 455 |
| 456 | /* Header Section */ |
| 457 | .header-section { |
| 458 | margin-bottom: 24px; |
| 459 | } |
| 460 |
| 461 | .header-main { |
| 462 | display: flex; |
| 463 | align-items: flex-start; |
| 464 | gap: 16px; |
| 465 | } |
| 466 |
| 467 | .proxy-icon { |
| 468 | width: 56px; |
| 469 | height: 56px; |
| 470 | border-radius: 14px; |
| 471 | display: flex; |
| 472 | align-items: center; |
| 473 | justify-content: center; |
| 474 | flex-shrink: 0; |
| 475 | font-size: 26px; |
| 476 | color: white; |
| 477 | } |
| 478 |
| 479 | .header-info { |
| 480 | flex: 1; |
| 481 | min-width: 0; |
| 482 | } |
| 483 |
| 484 | .header-title-row { |
| 485 | display: flex; |
| 486 | align-items: center; |
| 487 | gap: 12px; |
| 488 | flex-wrap: wrap; |
| 489 | margin-bottom: 8px; |
| 490 | } |
| 491 |
| 492 | .proxy-name { |
| 493 | font-size: 20px; |
| 494 | font-weight: 500; |
| 495 | color: var(--text-primary); |
| 496 | margin: 0; |
| 497 | line-height: 1.3; |
| 498 | word-break: break-all; |
| 499 | } |
| 500 |
| 501 | .type-tag { |
| 502 | font-size: 12px; |
| 503 | font-weight: 500; |
| 504 | padding: 4px 12px; |
| 505 | border-radius: 20px; |
| 506 | background: var(--el-fill-color-dark); |
| 507 | color: var(--el-text-color-secondary); |
| 508 | border: 1px solid var(--el-border-color-lighter); |
| 509 | } |
| 510 |
| 511 | .status-badge { |
| 512 | padding: 4px 12px; |
| 513 | border-radius: 6px; |
| 514 | font-size: 13px; |
| 515 | font-weight: 500; |
| 516 | text-transform: capitalize; |
| 517 | } |
| 518 |
| 519 | .status-badge.online { |
| 520 | background: rgba(34, 197, 94, 0.1); |
| 521 | color: #16a34a; |
| 522 | } |
| 523 |
| 524 | .status-badge.offline { |
| 525 | background: var(--hover-bg); |
| 526 | color: var(--text-secondary); |
| 527 | } |
| 528 |
| 529 | html.dark .status-badge.online { |
| 530 | background: rgba(34, 197, 94, 0.15); |
| 531 | color: #4ade80; |
| 532 | } |
| 533 |
| 534 | .header-meta { |
| 535 | display: flex; |
| 536 | align-items: center; |
| 537 | flex-wrap: wrap; |
| 538 | gap: 4px; |
| 539 | font-size: 13px; |
| 540 | color: var(--text-secondary); |
| 541 | } |
| 542 |
| 543 | .meta-link { |
| 544 | display: inline-flex; |
| 545 | align-items: center; |
| 546 | gap: 4px; |
| 547 | color: var(--text-secondary); |
| 548 | text-decoration: none; |
| 549 | transition: color 0.2s; |
| 550 | } |
| 551 |
| 552 | .meta-link:hover { |
| 553 | color: var(--el-color-primary); |
| 554 | } |
| 555 |
| 556 | .meta-text { |
| 557 | color: var(--text-muted); |
| 558 | } |
| 559 |
| 560 | .meta-sep { |
| 561 | margin: 0 4px; |
| 562 | } |
| 563 |
| 564 | /* Stats Bar */ |
| 565 | .stats-bar { |
| 566 | display: flex; |
| 567 | background: var(--el-bg-color); |
| 568 | border: 1px solid var(--header-border); |
| 569 | border-radius: 10px; |
| 570 | margin-bottom: 20px; |
| 571 | } |
| 572 |
| 573 | .stats-item { |
| 574 | flex: 1; |
| 575 | display: flex; |
| 576 | flex-direction: column; |
| 577 | gap: 4px; |
| 578 | padding: 16px 20px; |
| 579 | } |
| 580 |
| 581 | .stats-item + .stats-item { |
| 582 | border-left: 1px solid var(--header-border); |
| 583 | } |
| 584 |
| 585 | .stats-label { |
| 586 | font-size: 12px; |
| 587 | color: var(--text-secondary); |
| 588 | } |
| 589 |
| 590 | .stats-value { |
| 591 | font-size: 18px; |
| 592 | font-weight: 600; |
| 593 | color: var(--text-primary); |
| 594 | } |
| 595 |
| 596 | .stats-value small { |
| 597 | font-size: 12px; |
| 598 | font-weight: 500; |
| 599 | color: var(--text-secondary); |
| 600 | } |
| 601 |
| 602 |
| 603 | /* Card Base */ |
| 604 | .traffic-card { |
| 605 | background: var(--el-bg-color); |
| 606 | border: 1px solid var(--header-border); |
| 607 | border-radius: 12px; |
| 608 | margin-bottom: 16px; |
| 609 | } |
| 610 |
| 611 | /* Config Section */ |
| 612 | .config-section { |
| 613 | margin-bottom: 24px; |
| 614 | } |
| 615 |
| 616 | .config-section-header { |
| 617 | display: flex; |
| 618 | align-items: center; |
| 619 | gap: 8px; |
| 620 | margin-bottom: 16px; |
| 621 | color: var(--text-secondary); |
| 622 | } |
| 623 |
| 624 | .config-section-header h2 { |
| 625 | font-size: 16px; |
| 626 | font-weight: 500; |
| 627 | color: var(--text-primary); |
| 628 | margin: 0; |
| 629 | } |
| 630 |
| 631 | .config-grid { |
| 632 | display: grid; |
| 633 | grid-template-columns: repeat(2, 1fr); |
| 634 | gap: 16px; |
| 635 | } |
| 636 |
| 637 | .config-item-card { |
| 638 | display: flex; |
| 639 | align-items: flex-start; |
| 640 | gap: 14px; |
| 641 | padding: 20px; |
| 642 | background: var(--el-bg-color); |
| 643 | border: 1px solid var(--header-border); |
| 644 | border-radius: 12px; |
| 645 | } |
| 646 |
| 647 | .config-item-icon { |
| 648 | width: 40px; |
| 649 | height: 40px; |
| 650 | border-radius: 10px; |
| 651 | display: flex; |
| 652 | align-items: center; |
| 653 | justify-content: center; |
| 654 | font-size: 18px; |
| 655 | flex-shrink: 0; |
| 656 | } |
| 657 |
| 658 | .config-item-icon.encryption { |
| 659 | background: rgba(34, 197, 94, 0.1); |
| 660 | color: #22c55e; |
| 661 | } |
| 662 |
| 663 | .config-item-icon.compression { |
| 664 | background: rgba(34, 197, 94, 0.1); |
| 665 | color: #22c55e; |
| 666 | } |
| 667 |
| 668 | .config-item-icon.domains { |
| 669 | background: rgba(168, 85, 247, 0.1); |
| 670 | color: #a855f7; |
| 671 | } |
| 672 |
| 673 | .config-item-icon.subdomain { |
| 674 | background: rgba(168, 85, 247, 0.1); |
| 675 | color: #a855f7; |
| 676 | } |
| 677 |
| 678 | .config-item-icon.locations { |
| 679 | background: rgba(59, 130, 246, 0.1); |
| 680 | color: #3b82f6; |
| 681 | } |
| 682 |
| 683 | .config-item-icon.host { |
| 684 | background: rgba(249, 115, 22, 0.1); |
| 685 | color: #f97316; |
| 686 | } |
| 687 |
| 688 | .config-item-icon.multiplexer { |
| 689 | background: rgba(59, 130, 246, 0.1); |
| 690 | color: #3b82f6; |
| 691 | } |
| 692 |
| 693 | .config-item-icon.route { |
| 694 | background: rgba(236, 72, 153, 0.1); |
| 695 | color: #ec4899; |
| 696 | } |
| 697 |
| 698 | html.dark .config-item-icon.encryption, |
| 699 | html.dark .config-item-icon.compression { |
| 700 | background: rgba(34, 197, 94, 0.15); |
| 701 | } |
| 702 |
| 703 | html.dark .config-item-icon.domains, |
| 704 | html.dark .config-item-icon.subdomain { |
| 705 | background: rgba(168, 85, 247, 0.15); |
| 706 | } |
| 707 |
| 708 | html.dark .config-item-icon.locations, |
| 709 | html.dark .config-item-icon.multiplexer { |
| 710 | background: rgba(59, 130, 246, 0.15); |
| 711 | } |
| 712 |
| 713 | html.dark .config-item-icon.host { |
| 714 | background: rgba(249, 115, 22, 0.15); |
| 715 | } |
| 716 |
| 717 | html.dark .config-item-icon.route { |
| 718 | background: rgba(236, 72, 153, 0.15); |
| 719 | } |
| 720 |
| 721 | .config-item-content { |
| 722 | display: flex; |
| 723 | flex-direction: column; |
| 724 | gap: 4px; |
| 725 | min-width: 0; |
| 726 | } |
| 727 |
| 728 | .config-item-label { |
| 729 | font-size: 13px; |
| 730 | color: var(--text-secondary); |
| 731 | font-weight: 500; |
| 732 | } |
| 733 |
| 734 | .config-item-value { |
| 735 | font-size: 15px; |
| 736 | color: var(--text-primary); |
| 737 | font-weight: 500; |
| 738 | word-break: break-all; |
| 739 | } |
| 740 |
| 741 | .annotations-section { |
| 742 | display: flex; |
| 743 | flex-wrap: wrap; |
| 744 | gap: 8px; |
| 745 | margin-top: 16px; |
| 746 | } |
| 747 |
| 748 | .annotation-tag { |
| 749 | display: inline-flex; |
| 750 | padding: 6px 12px; |
| 751 | background: var(--el-fill-color); |
| 752 | border-radius: 6px; |
| 753 | font-size: 13px; |
| 754 | color: var(--text-secondary); |
| 755 | font-weight: 500; |
| 756 | } |
| 757 |
| 758 | .traffic-header { |
| 759 | padding: 16px 20px; |
| 760 | border-bottom: 1px solid var(--header-border); |
| 761 | } |
| 762 |
| 763 | .traffic-header h2 { |
| 764 | font-size: 15px; |
| 765 | font-weight: 500; |
| 766 | color: var(--text-primary); |
| 767 | margin: 0; |
| 768 | } |
| 769 |
| 770 | /* Traffic Card */ |
| 771 | .traffic-body { |
| 772 | padding: 20px; |
| 773 | } |
| 774 |
| 775 | /* Not Found */ |
| 776 | .not-found { |
| 777 | text-align: center; |
| 778 | padding: 60px 20px; |
| 779 | } |
| 780 |
| 781 | .not-found h2 { |
| 782 | font-size: 18px; |
| 783 | font-weight: 500; |
| 784 | color: var(--text-primary); |
| 785 | margin: 0 0 8px; |
| 786 | } |
| 787 |
| 788 | .not-found p { |
| 789 | font-size: 14px; |
| 790 | color: var(--text-secondary); |
| 791 | margin: 0 0 20px; |
| 792 | } |
| 793 |
| 794 | /* Responsive */ |
| 795 | @media (max-width: 768px) { |
| 796 | .config-grid { |
| 797 | grid-template-columns: 1fr; |
| 798 | } |
| 799 |
| 800 | .stats-bar { |
| 801 | flex-wrap: wrap; |
| 802 | } |
| 803 |
| 804 | .stats-item { |
| 805 | flex: 1 1 40%; |
| 806 | } |
| 807 |
| 808 | .stats-item:nth-child(n+3) { |
| 809 | border-top: 1px solid var(--header-border); |
| 810 | } |
| 811 | } |
| 812 |
| 813 | @media (max-width: 640px) { |
| 814 | .header-main { |
| 815 | flex-direction: column; |
| 816 | gap: 16px; |
| 817 | } |
| 818 |
| 819 | } |
| 820 | </style> |