A modern and elegant dashboard for network traffic visualization and analysis.
refactor: Update project description, refine UI layouts for improved responsiveness, and add a Windows detection hook.
luolei80077955d302
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymlindex c850491..7595135 100644--- a/.github/workflows/docker-build.yml+++ b/.github/workflows/docker-build.yml@@ -2,10 +2,10 @@ name: Build and Push Docker Imageon:push:- branches: [ main, dev, 'preview/**' ]- tags: [ 'v*' ]+ branches: [main, dev, "preview/**"]+ tags: ["v*"]pull_request:- branches: [ main, dev ]+ branches: [main, dev]workflow_dispatch:env:@@ -21,85 +21,85 @@ jobs:packages: writesteps:- - name: Checkout repository- uses: actions/checkout@v4+ - name: Checkout repository+ uses: actions/checkout@v4- - name: Read version from package.json- id: pkg- run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT+ - name: Read version from package.json+ id: pkg+ run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT- - name: Derive preview tag for preview/* branches- id: preview- shell: bash- run: |- if [[ "${GITHUB_REF_TYPE}" == "branch" && "${GITHUB_REF_NAME}" == preview/* ]]; then- raw="${GITHUB_REF_NAME#preview/}"- safe="$(echo "${raw}" | tr '[:upper:]' '[:lower:]' | sed 's#[^a-z0-9._-]#-#g')"- echo "enabled=true" >> "$GITHUB_OUTPUT"- echo "tag=dev-${safe}" >> "$GITHUB_OUTPUT"- else- echo "enabled=false" >> "$GITHUB_OUTPUT"- echo "tag=" >> "$GITHUB_OUTPUT"- fi+ - name: Derive preview tag for preview/* branches+ id: preview+ shell: bash+ run: |+ if [[ "${GITHUB_REF_TYPE}" == "branch" && "${GITHUB_REF_NAME}" == preview/* ]]; then+ raw="${GITHUB_REF_NAME#preview/}"+ safe="$(echo "${raw}" | tr '[:upper:]' '[:lower:]' | sed 's#[^a-z0-9._-]#-#g')"+ echo "enabled=true" >> "$GITHUB_OUTPUT"+ echo "tag=dev-${safe}" >> "$GITHUB_OUTPUT"+ else+ echo "enabled=false" >> "$GITHUB_OUTPUT"+ echo "tag=" >> "$GITHUB_OUTPUT"+ fi- - name: Set up QEMU- uses: docker/setup-qemu-action@v3+ - name: Set up QEMU+ uses: docker/setup-qemu-action@v3- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3+ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v3- - name: Log in to Docker Hub- if: github.event_name != 'pull_request'- uses: docker/login-action@v3- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}+ - name: Log in to Docker Hub+ if: github.event_name != 'pull_request'+ uses: docker/login-action@v3+ with:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}- - name: Log in to GitHub Container Registry- if: github.event_name != 'pull_request'- uses: docker/login-action@v3- with:- registry: ghcr.io- username: ${{ github.actor }}- password: ${{ secrets.GITHUB_TOKEN }}+ - name: Log in to GitHub Container Registry+ if: github.event_name != 'pull_request'+ uses: docker/login-action@v3+ with:+ registry: ghcr.io+ username: ${{ github.actor }}+ password: ${{ secrets.GITHUB_TOKEN }}- - name: Extract metadata- id: meta- uses: docker/metadata-action@v5- with:- images: |- ${{ env.DOCKERHUB_IMAGE_OLD }}- ${{ env.DOCKERHUB_IMAGE_NEW }}- ${{ env.GHCR_IMAGE }}- tags: |- type=raw,value=latest,enable=${{ github.ref_name == 'main' }}- type=raw,value=${{ steps.pkg.outputs.version }},enable=${{ github.ref_name == 'main' }}- type=raw,value=${{ steps.preview.outputs.tag }},enable=${{ steps.preview.outputs.enabled == 'true' }}- type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}- type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}- type=ref,event=pr- type=sha,prefix=,enable={{is_default_branch}}- type=raw,value=dev,enable=${{ github.ref_name == 'dev' }}- type=raw,value=${{ steps.pkg.outputs.version }}-dev,enable=${{ github.ref_name == 'dev' }}- type=sha,prefix=dev-,enable=${{ github.ref_name == 'dev' }}+ - name: Extract metadata+ id: meta+ uses: docker/metadata-action@v5+ with:+ images: |+ ${{ env.DOCKERHUB_IMAGE_OLD }}+ ${{ env.DOCKERHUB_IMAGE_NEW }}+ ${{ env.GHCR_IMAGE }}+ tags: |+ type=raw,value=latest,enable=${{ github.ref_name == 'main' }}+ type=raw,value=${{ steps.pkg.outputs.version }},enable=${{ github.ref_name == 'main' }}+ type=raw,value=${{ steps.preview.outputs.tag }},enable=${{ steps.preview.outputs.enabled == 'true' }}+ type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}+ type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}+ type=ref,event=pr+ type=sha,prefix=,enable={{is_default_branch}}+ type=raw,value=dev,enable=${{ github.ref_name == 'dev' }}+ type=raw,value=${{ steps.pkg.outputs.version }}-dev,enable=${{ github.ref_name == 'dev' }}+ type=sha,prefix=dev-,enable=${{ github.ref_name == 'dev' }}- - name: Build and push Docker image- uses: docker/build-push-action@v6- with:- context: .- push: ${{ github.event_name != 'pull_request' }}- tags: ${{ steps.meta.outputs.tags }}- labels: ${{ steps.meta.outputs.labels }}- cache-from: type=gha- cache-to: type=gha,mode=max- platforms: linux/amd64,linux/arm64+ - name: Build and push Docker image+ uses: docker/build-push-action@v6+ with:+ context: .+ push: ${{ github.event_name != 'pull_request' }}+ tags: ${{ steps.meta.outputs.tags }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha+ cache-to: type=gha,mode=max+ platforms: linux/amd64,linux/arm64- - name: Update Docker Hub description- if: github.event_name != 'pull_request' && github.ref_name == 'main'- uses: peter-evans/dockerhub-description@v4- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}- repository: foru17/neko-master- readme-filepath: ./README.md- short-description: "Modern Network Traffic Analytics"+ - name: Update Docker Hub description+ if: github.event_name != 'pull_request' && github.ref_name == 'main'+ uses: peter-evans/dockerhub-description@v4+ with:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}+ repository: foru17/neko-master+ readme-filepath: ./README.md+ short-description: "Modern traffic analytics for edge gateways"diff --git a/README.en.md b/README.en.mdindex ff37293..1b68a31 100644--- a/README.en.md+++ b/README.en.md@@ -5,8 +5,8 @@</p><p align="center">- <b>Modern Network Traffic Analytics</b><br>- <span>Real-time Monitoring · Traffic Audit · Multi-Gateway Management</span>+ <b>See your network traffic clearly.</b><br>+ <span>Real-time monitoring · Traffic auditing · Multi-gateway support</span></p><p align="center">@@ -14,27 +14,33 @@<a href="https://hub.docker.com/r/foru17/neko-master"><img src="https://img.shields.io/docker/pulls/foru17/neko-master?style=flat-square&color=blue&logo=docker" alt="Docker Pulls"></a><a href="https://hub.docker.com/r/foru17/neko-master"><img src="https://img.shields.io/docker/v/foru17/neko-master?style=flat-square&label=Docker&color=2496ED" alt="Docker Version"></a><a href="https://github.com/foru17/neko-master/blob/main/LICENSE"><img src="https://img.shields.io/github/license/foru17/neko-master?style=flat-square&color=green" alt="License"></a>- <img src="https://img.shields.io/badge/Node.js-22-339933?style=flat-square&logo=node.js" alt="Node.js">-</p>--<p align="center">- <a href="./README.md">简体中文</a> •- <b>English</b>+ <img src="https://img.shields.io/badge/Node.js-22-339933?style=flat-square&logo=node.js"></p>> [!IMPORTANT]> **Disclaimer**>-> This project is a **Network Traffic Visualization & Analysis Tool** designed to visualize connection states and traffic flows of local network devices.+> This project is a traffic analysis and visualization tool+> for local gateway environments.>-> This project **does NOT provide** any internet access services, proxy subscriptions, or cross-network connectivity features. All data is derived from the user's own network gateway; this project solely performs data collection and visualization.+> It does not provide any network access service,+> proxy subscription, or cross-network connectivity.+> All data is collected from the user's own network environment.>-> This project is open-source under the MIT License. The developers assume no responsibility for any consequences resulting from the use of this software.+> Please use this software in compliance with applicable laws and regulations.+## About the Name++**Neko** (ねこ) means _cat_ in Japanese.+Pronounced **/ˈneɪkoʊ/** (NEH-ko).++Like a cat, Neko Master observes network traffic quietly and precisely.+It is a lightweight analytics dashboard designed for modern gateway environments.+## 📋 Table of Contents- [✨ Features](#-features)@@ -237,25 +243,25 @@ The script will automatically detect and suggest available ports.### Ports-| Port | Purpose | External Required | Description |-| :--: | :-------: | :---------------: | :---------- |-| 3000 | Web UI | ✅ | Frontend entry point |-| 3001 | API | Optional | Frontend uses same-origin `/api` by default; usually no external exposure needed |-| 3002 | WebSocket | Optional | Real-time push endpoint; recommended to forward via reverse proxy/tunnel |+| Port | Purpose | External Required | Description |+| :--: | :-------: | :---------------: | :------------------------------------------------------------------------------- |+| 3000 | Web UI | ✅ | Frontend entry point |+| 3001 | API | Optional | Frontend uses same-origin `/api` by default; usually no external exposure needed |+| 3002 | WebSocket | Optional | Real-time push endpoint; recommended to forward via reverse proxy/tunnel |### Environment Variables (Docker)-| Variable | Default | Purpose | When to set |-| :-- | :-- | :-- | :-- |-| `WEB_PORT` | `3000` | Web service listen port (inside container) | Usually unchanged |-| `API_PORT` | `3001` | API service listen port (inside container) | Usually unchanged |-| `COLLECTOR_WS_PORT` | `3002` | WS service listen port (inside container) | Usually unchanged |-| `DB_PATH` | `/app/data/stats.db` | SQLite data path | Custom data path |-| `WEB_EXTERNAL_PORT` | `3000` | Runtime-exposed external web port | When external mapping changes |-| `API_EXTERNAL_PORT` | `3001` | Runtime-exposed external API port | Only for direct API access |-| `WS_EXTERNAL_PORT` | `3002` | Runtime-exposed external WS port | Only for direct WS access |-| `NEXT_PUBLIC_API_URL` | empty | Override frontend API base URL | When API is not same-origin |-| `NEXT_PUBLIC_WS_URL` | auto `/_cm_ws` | Override frontend WS URL | Only if you want custom WS path/host |+| Variable | Default | Purpose | When to set |+| :-------------------- | :------------------- | :----------------------------------------- | :----------------------------------- |+| `WEB_PORT` | `3000` | Web service listen port (inside container) | Usually unchanged |+| `API_PORT` | `3001` | API service listen port (inside container) | Usually unchanged |+| `COLLECTOR_WS_PORT` | `3002` | WS service listen port (inside container) | Usually unchanged |+| `DB_PATH` | `/app/data/stats.db` | SQLite data path | Custom data path |+| `WEB_EXTERNAL_PORT` | `3000` | Runtime-exposed external web port | When external mapping changes |+| `API_EXTERNAL_PORT` | `3001` | Runtime-exposed external API port | Only for direct API access |+| `WS_EXTERNAL_PORT` | `3002` | Runtime-exposed external WS port | Only for direct WS access |+| `NEXT_PUBLIC_API_URL` | empty | Override frontend API base URL | When API is not same-origin |+| `NEXT_PUBLIC_WS_URL` | auto `/_cm_ws` | Override frontend WS URL | Only if you want custom WS path/host |### API / WS Resolution Priority@@ -273,7 +279,7 @@ Recommended approach: keep Web and WS under the same domain, with path routing:```nginxserver {listen 443 ssl http2;- server_name clash.example.com;+ server_name neko.example.com;location / {proxy_pass http://<neko-master-host>:3000;@@ -315,10 +321,10 @@ tunnel: <your-tunnel-name-or-id>credentials-file: /path/to/<credentials>.jsoningress:- - hostname: clash.example.com+ - hostname: neko.example.compath: /_cm_ws*service: http://localhost:3002- - hostname: clash.example.com+ - hostname: neko.example.compath: /*service: http://localhost:3000- service: http_status:404diff --git a/README.md b/README.mdindex 7e8e94f..b53a110 100644--- a/README.md+++ b/README.md@@ -5,7 +5,7 @@</p><p align="center">- <b>优雅且现代化的网络可视化分析工具</b><br>+ <b>让你的网络流量一目了然。</b><br><span>实时监控 · 流量审计 · 多网关管理</span></p>@@ -14,27 +14,32 @@<a href="https://hub.docker.com/r/foru17/neko-master"><img src="https://img.shields.io/docker/pulls/foru17/neko-master?style=flat-square&color=blue&logo=docker" alt="Docker Pulls"></a><a href="https://hub.docker.com/r/foru17/neko-master"><img src="https://img.shields.io/docker/v/foru17/neko-master?style=flat-square&label=Docker&color=2496ED" alt="Docker Version"></a><a href="https://github.com/foru17/neko-master/blob/main/LICENSE"><img src="https://img.shields.io/github/license/foru17/neko-master?style=flat-square&color=green" alt="License"></a>- <img src="https://img.shields.io/badge/Node.js-22-339933?style=flat-square&logo=node.js" alt="Node.js">-</p>--<p align="center">- <b>简体中文</b> •- <a href="./README.en.md">English</a>+ <img src="https://img.shields.io/badge/Node.js-22-339933?style=flat-square&logo=node.js"></p>> [!IMPORTANT]-> **免责声明 / Disclaimer**+> **免责声明**>-> 本项目仅为 **网络流量可视化与分析工具**,旨在帮助用户通过可视化仪表盘 (Dashboard) 审计本地网络流量、发现异常连接请求、优化网络配置。+> 本项目为 **网络流量分析与可视化工具**,+> 用于展示与统计本地网关的流量数据。>-> 本项目 **不提供** 任何网络接入服务、代理节点订阅或跨网络连接功能。所有数据均来源于用户自有的网络网关,数据采集仅在用户本地网络内进行。+> 本项目 **不提供任何网络接入服务、代理订阅或跨网络连接功能**。+> 所有数据均来源于用户自有网络环境。>-> 本项目遵循 MIT 协议开源,不对因使用本软件产生的任何后果承担责任。请在合规范围内使用。+> 请在符合当地法律法规的前提下使用本软件。+## 关于名称++**Neko**(ねこ)在日语中意为“猫”,+发音为 **/ˈneɪkoʊ/**(NEH-ko)。++如同猫一般安静而敏锐,+Neko Master 专注于对网络流量进行轻量、精确的分析与可视化。+## 📋 目录- [🚀 快速开始](#-快速开始)@@ -257,7 +262,7 @@ curl -fsSL https://raw.githubusercontent.com/foru17/neko-master/main/setup.sh |```nginxserver {listen 443 ssl http2;- server_name clash.example.com;+ server_name neko.example.com;location / {proxy_pass http://<neko-master-host>:3000;@@ -300,10 +305,10 @@ tunnel: <your-tunnel-name-or-id>credentials-file: /path/to/<credentials>.jsoningress:- - hostname: clash.example.com+ - hostname: neko.example.compath: /_cm_ws*service: http://localhost:3002- - hostname: clash.example.com+ - hostname: neko.example.compath: /*service: http://localhost:3000- service: http_status:404diff --git a/apps/web/app/[locale]/layout.tsx b/apps/web/app/[locale]/layout.tsxindex 4fc0ccd..9cfdcd7 100644--- a/apps/web/app/[locale]/layout.tsx+++ b/apps/web/app/[locale]/layout.tsx@@ -22,7 +22,7 @@ const geistMono = Geist_Mono({export const metadata: Metadata = {title: "Neko Master",- description: "Modern Network Traffic Analytics",+ description: "Modern traffic analytics for edge gateways",icons: {icon: "/logo.png",shortcut: "/logo.png",diff --git a/apps/web/app/manifest.ts b/apps/web/app/manifest.tsindex a127d61..ffc9bc1 100644--- a/apps/web/app/manifest.ts+++ b/apps/web/app/manifest.ts@@ -4,7 +4,7 @@ export default function manifest(): MetadataRoute.Manifest {return {name: "Neko Master",short_name: "Neko Master",- description: "Modern Network Traffic Analytics",+ description: "Modern traffic analytics for edge gateways",start_url: "/",scope: "/",display: "standalone",diff --git a/apps/web/components/features/proxies/interactive-proxy-stats.tsx b/apps/web/components/features/proxies/interactive-proxy-stats.tsxindex db7435e..626319b 100644--- a/apps/web/components/features/proxies/interactive-proxy-stats.tsx+++ b/apps/web/components/features/proxies/interactive-proxy-stats.tsx@@ -269,9 +269,9 @@ export function InteractiveProxyStats({return (<div className="space-y-6">- <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-12 gap-6">+ <div className="grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-12 gap-6">{/* Pie Chart */}- <Card className="min-w-0 md:col-span-1 xl:col-span-3">+ <Card className="min-w-0 lg:col-span-1 2xl:col-span-3"><CardHeader className="pb-2"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider">{t("title")}</CardTitle></CardHeader>@@ -323,7 +323,7 @@ export function InteractiveProxyStats({</Card>{/* Proxy List */}- <Card className="min-w-0 md:col-span-1 xl:col-span-4">+ <Card className="min-w-0 lg:col-span-1 2xl:col-span-4"><CardHeader className="pb-2"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider">{t("title")}</CardTitle></CardHeader><CardContent className="p-3"><ScrollArea className="h-[280px] pr-3">@@ -338,7 +338,7 @@ export function InteractiveProxyStats({<button key={item.rawName} onClick={() => handleProxyClick(item.rawName)} className={cn("w-full p-2.5 rounded-xl border text-left transition-all duration-200", isSelected ? "border-primary bg-primary/5 ring-1 ring-primary/20" : "border-border/50 bg-card/50 hover:bg-card hover:border-primary/30")}><div className="flex items-center gap-2 mb-1.5"><span className={cn("w-5 h-5 rounded-md text-[10px] font-bold flex items-center justify-center shrink-0", badgeColor)}>{item.rank + 1}</span>- <span className="emoji-flag-font flex-1 text-sm font-medium truncate" title={rawDisplayName}>{rawDisplayName}</span>+ <span className="flex-1 text-sm font-medium truncate" title={rawDisplayName}>{rawDisplayName}</span><span className="text-sm font-bold tabular-nums shrink-0 whitespace-nowrap">{formatBytes(item.value)}</span></div><div className="pl-7 space-y-1">@@ -346,13 +346,13 @@ export function InteractiveProxyStats({<div className="h-full bg-blue-500 dark:bg-blue-400" style={{ width: `${item.value > 0 ? (item.download / item.value) * barPercent : 0}%` }} /><div className="h-full bg-purple-500 dark:bg-purple-400" style={{ width: `${item.value > 0 ? (item.upload / item.value) * barPercent : 0}%` }} /></div>- <div className="flex flex-wrap items-center justify-between gap-1 text-xs text-muted-foreground">- <div className="flex flex-wrap items-center gap-1.5 sm:gap-2">+ <div className="grid grid-cols-1 min-[300px]:grid-cols-[1fr_auto] gap-x-2 gap-y-0.5 text-xs text-muted-foreground">+ <div className="flex flex-wrap items-center gap-x-2 gap-y-0.5"><span className="text-blue-500 dark:text-blue-400 whitespace-nowrap">↓ {formatBytes(item.download)}</span>- <span className="text-purple-500 dark:text-purple-400 whitespace-nowrap">↑ {formatBytes(item.upload)}</span>+ <span className="text-purple-500 dark:text-blue-400 whitespace-nowrap">↑ {formatBytes(item.upload)}</span><span className="flex items-center gap-1 tabular-nums"><Link2 className="w-3 h-3" />{formatNumber(item.connections)}</span></div>- <span className="tabular-nums">{percentage.toFixed(1)}%</span>+ <span className="tabular-nums text-right min-[300px]:text-right">{percentage.toFixed(1)}%</span></div></div></button>@@ -364,7 +364,7 @@ export function InteractiveProxyStats({</Card>{/* Top Domains Chart */}- <Card className="min-w-0 md:col-span-2 xl:col-span-5">+ <Card className="min-w-0 lg:col-span-2 2xl:col-span-5"><CardHeader className="pb-2"><div className="flex items-center justify-between"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2"><BarChart3 className="h-4 w-4" />{domainsT("title")}</CardTitle>diff --git a/apps/web/components/features/proxies/proxy-chain-badge.tsx b/apps/web/components/features/proxies/proxy-chain-badge.tsxindex 99a223d..11f03a7 100644--- a/apps/web/components/features/proxies/proxy-chain-badge.tsx+++ b/apps/web/components/features/proxies/proxy-chain-badge.tsx@@ -2,6 +2,7 @@import { ChevronRight, Waypoints } from "lucide-react";import { cn } from "@/lib/utils";+import { useIsWindows } from "@/lib/hooks/use-is-windows";import {Tooltip,TooltipContent,@@ -18,7 +19,7 @@ interface ProxyChainBadgeProps {emptyClassName?: string;}-function ChainFlow({ chain }: { chain: string }) {+function ChainFlow({ chain, isWindows }: { chain: string; isWindows: boolean }) {const segments = chain.split(">").map((part) => part.trim())@@ -63,7 +64,8 @@ function ChainFlow({ chain }: { chain: string }) {<span key={`${segment}-${idx}`} className="inline-flex items-center gap-1"><spanclassName={cn(- "emoji-flag-font px-2 py-0.5 rounded-md border text-[11px] font-medium whitespace-nowrap",+ "px-2 py-0.5 rounded-md border text-[11px] font-medium whitespace-nowrap",+ isWindows && "emoji-flag-font",getNodeTone(idx, displaySegments.length),)}>@@ -101,6 +103,8 @@ export function ProxyChainBadge({countClassName,emptyClassName,}: ProxyChainBadgeProps) {+ const isWindows = useIsWindows();+if (!chains || chains.length === 0) {return <span className={cn("text-xs text-muted-foreground", emptyClassName)}>-</span>;}@@ -115,7 +119,8 @@ export function ProxyChainBadge({<span className={cn("inline-flex items-center gap-1.5 min-w-0", wrapperClassName)}><spanclassName={cn(- "emoji-flag-font inline-flex items-center gap-1 rounded-md bg-secondary/60 text-foreground dark:bg-secondary/40 dark:text-foreground/80 text-[11px] font-medium",+ "inline-flex items-center gap-1 rounded-md bg-secondary/60 text-foreground dark:bg-secondary/40 dark:text-foreground/80 text-[11px] font-medium",+ isWindows && "emoji-flag-font",truncateLabel? "px-1.5 py-0.5 truncate max-w-[180px] lg:max-w-[220px]": "px-2 py-0.5 whitespace-nowrap",@@ -153,7 +158,7 @@ export function ProxyChainBadge({</span>)}<div className="min-w-0 flex-1">- <ChainFlow chain={chain} />+ <ChainFlow chain={chain} isWindows={isWindows} /></div></div></div>diff --git a/apps/web/components/features/rules/interactive-rule-stats.tsx b/apps/web/components/features/rules/interactive-rule-stats.tsxindex eed6170..1815203 100644--- a/apps/web/components/features/rules/interactive-rule-stats.tsx+++ b/apps/web/components/features/rules/interactive-rule-stats.tsx@@ -744,9 +744,9 @@ export function InteractiveRuleStats({return (<div className="space-y-6">{/* Top Section: Three Column Layout */}- <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-12 gap-6">+ <div className="grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-12 gap-6">{/* Left: Pie Chart (3 columns) */}- <Card className="min-w-0 md:col-span-1 xl:col-span-3">+ <Card className="min-w-0 lg:col-span-1 2xl:col-span-3"><CardHeader className="pb-2"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider">{t("distribution")}@@ -831,7 +831,7 @@ export function InteractiveRuleStats({</Card>{/* Middle: Rule List (4 columns) */}- <Card className="min-w-0 md:col-span-1 xl:col-span-4">+ <Card className="min-w-0 lg:col-span-1 2xl:col-span-4"><CardHeader className="pb-2"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider">{t("ruleList")}@@ -904,16 +904,16 @@ export function InteractiveRuleStats({/></div>{/* Stats */}- <div className="flex flex-wrap items-center justify-between gap-1 text-xs text-muted-foreground">- <div className="flex flex-wrap items-center gap-1.5 sm:gap-2">+ <div className="grid grid-cols-1 min-[300px]:grid-cols-[1fr_auto] gap-x-2 gap-y-0.5 text-xs text-muted-foreground">+ <div className="flex flex-wrap items-center gap-x-2 gap-y-0.5"><span className="text-blue-500 dark:text-blue-400 whitespace-nowrap">↓ {formatBytes(item.download)}</span>- <span className="text-purple-500 dark:text-purple-400 whitespace-nowrap">↑ {formatBytes(item.upload)}</span>+ <span className="text-purple-500 dark:text-blue-400 whitespace-nowrap">↑ {formatBytes(item.upload)}</span><span className="flex items-center gap-1 tabular-nums"><Link2 className="w-3 h-3" />{formatNumber(item.connections)}</span></div>- <span className="tabular-nums">{percentage.toFixed(1)}%</span>+ <span className="tabular-nums text-right min-[300px]:text-right">{percentage.toFixed(1)}%</span></div></div>)}@@ -926,7 +926,7 @@ export function InteractiveRuleStats({</Card>{/* Right: Top Domains Chart (5 columns) */}- <Card className="min-w-0 md:col-span-2 xl:col-span-5">+ <Card className="min-w-0 lg:col-span-2 2xl:col-span-5"><CardHeader className="pb-2"><div className="flex items-center justify-between"><CardTitle className="text-sm font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2">diff --git a/apps/web/components/overview/top-proxies-simple.tsx b/apps/web/components/overview/top-proxies-simple.tsxindex d8ddae6..607e2a2 100644--- a/apps/web/components/overview/top-proxies-simple.tsx+++ b/apps/web/components/overview/top-proxies-simple.tsx@@ -5,6 +5,7 @@ import { Server, ArrowRight, BarChart3, Link2 } from "lucide-react";import { useTranslations } from "next-intl";import { Button } from "@/components/ui/button";import { cn, formatBytes, formatNumber } from "@/lib/utils";+import { useIsWindows } from "@/lib/hooks/use-is-windows";import type { ProxyStats } from "@neko-master/shared";interface TopProxiesSimpleProps {@@ -31,6 +32,7 @@ export const TopProxiesSimple = React.memo(onViewAll,}: TopProxiesSimpleProps) {const t = useTranslations("topProxies");+ const isWindows = useIsWindows();const sortedProxies = useMemo(() => {if (!proxies?.length) return [];@@ -137,7 +139,7 @@ export const TopProxiesSimple = React.memo(</span><span- className="emoji-flag-font flex-1 text-sm font-medium truncate"+ className={cn("flex-1 text-sm font-medium truncate", isWindows && "emoji-flag-font")}title={proxyItem.chain}>{displayName || proxyItem.chain}</span>diff --git a/apps/web/lib/hooks/use-is-windows.ts b/apps/web/lib/hooks/use-is-windows.tsnew file mode 100644index 0000000..74f367d--- /dev/null+++ b/apps/web/lib/hooks/use-is-windows.ts@@ -0,0 +1,14 @@+"use client";++import { useState, useEffect } from "react";++export function useIsWindows(): boolean {+ const [isWindows, setIsWindows] = useState(false);++ useEffect(() => {+ const userAgent = window.navigator.userAgent.toLowerCase();+ setIsWindows(userAgent.includes("windows"));+ }, []);++ return isWindows;+}diff --git a/apps/web/messages/en.json b/apps/web/messages/en.jsonindex 6055c11..fbded16 100644--- a/apps/web/messages/en.json+++ b/apps/web/messages/en.json@@ -1,7 +1,7 @@{"metadata": {"title": "Neko Master - Network Visualization",- "description": "Modern Network Traffic Analytics"+ "description": "Modern traffic analytics for edge gateways"},"nav": {"overview": "Overview",@@ -15,7 +15,7 @@},"header": {"title": "Neko Master",- "subtitle": "Modern Network Traffic Analytics"+ "subtitle": "Modern traffic analytics for edge gateways"},"dashboard": {"title": "Dashboard",@@ -277,7 +277,7 @@"title": "About","version": "Version","projectName": "Neko Master",- "description": "Modern Network Traffic Analytics",+ "description": "Modern traffic analytics for edge gateways","github": "GitHub","openSource": "Neko Master","license": "MIT License",diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.jsonindex d9e4014..61d537a 100644--- a/apps/web/messages/zh.json+++ b/apps/web/messages/zh.json@@ -1,7 +1,7 @@{"metadata": {"title": "Neko Master - 流量分析",- "description": "现代网络流量分析平台"+ "description": "现代网关流量分析工具"},"nav": {"overview": "概览",@@ -15,7 +15,7 @@},"header": {"title": "Neko Master",- "subtitle": "现代网络流量分析平台"+ "subtitle": "现代网关流量分析工具"},"dashboard": {"title": "仪表盘",@@ -276,7 +276,7 @@"title": "关于","version": "版本","projectName": "Neko Master",- "description": "现代网络流量分析平台",+ "description": "现代网关流量分析工具","github": "GitHub","openSource": "Neko Master","license": "MIT 许可证",diff --git a/assets/neko-master-overview.png b/assets/neko-master-overview.pngindex a15428e..256f2c1 100644Binary files a/assets/neko-master-overview.png and b/assets/neko-master-overview.png differdiff --git a/assets/neko-master-regions.png b/assets/neko-master-regions.pngindex 96a70c1..5945be3 100644Binary files a/assets/neko-master-regions.png and b/assets/neko-master-regions.png differdiff --git a/assets/neko-master-rules.png b/assets/neko-master-rules.pngindex bcc46c8..3e50552 100644Binary files a/assets/neko-master-rules.png and b/assets/neko-master-rules.png differdiff --git a/assets/neko-master-setup.png b/assets/neko-master-setup.pngindex 7a68890..2e8feff 100644Binary files a/assets/neko-master-setup.png and b/assets/neko-master-setup.png differdiff --git a/package.json b/package.jsonindex 44805f6..3df5087 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "neko-master","version": "1.2.0",- "description": "Modern Network Traffic Analytics",+ "description": "Modern traffic analytics for edge gateways","private": true,"workspaces": ["apps/*",