mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-10-10 04:03:04 +08:00
This commit is contained in:
@@ -114,6 +114,7 @@ $ clashsecret
|
|||||||
- 可通过浏览器打开 `Web` 控制台进行可视化操作,例如切换节点、查看日志等。
|
- 可通过浏览器打开 `Web` 控制台进行可视化操作,例如切换节点、查看日志等。
|
||||||
- `clashctl secret` 与 `clashsecret` 都支持无参数查看、有参数直接设置。
|
- `clashctl secret` 与 `clashsecret` 都支持无参数查看、有参数直接设置。
|
||||||
- 默认使用 [zashboard](https://github.com/Zephyruso/zashboard) 作为控制台前端,如需更换可自行配置。
|
- 默认使用 [zashboard](https://github.com/Zephyruso/zashboard) 作为控制台前端,如需更换可自行配置。
|
||||||
|
- 控制台中的“浏览器出口 IP”由访问面板的浏览器发起查询,可能与远端 Mihomo 的代理出口不同;远端出口请在服务器上通过本地代理端口查询。
|
||||||
- 运行配置会把 `external-ui` 指向本地 Dashboard 目录,并把 `external-ui-url` 指向 zashboard 的 `dist.zip` 下载地址;面板内 `/upgrade/ui` 会使用该地址更新前端。
|
- 运行配置会把 `external-ui` 指向本地 Dashboard 目录,并把 `external-ui-url` 指向 zashboard 的 `dist.zip` 下载地址;面板内 `/upgrade/ui` 会使用该地址更新前端。
|
||||||
- 若需将控制台暴露到公网,建议定期更换访问密钥,或通过 `SSH` 端口转发方式进行安全访问。
|
- 若需将控制台暴露到公网,建议定期更换访问密钥,或通过 `SSH` 端口转发方式进行安全访问。
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Dashboard 资产说明
|
||||||
|
|
||||||
|
- 上游项目:[Zephyruso/zashboard](https://github.com/Zephyruso/zashboard)
|
||||||
|
- 上游版本:`3.15.0`
|
||||||
|
- 上游提交:`0d2a7b5c0ac6f67085f32ad3d08d6b4a63e24d42`
|
||||||
|
- 本地补丁:`zashboard-issue-290.patch`
|
||||||
|
|
||||||
|
本地补丁修正了“网络信息”容易被误认为后端代理出口的问题。该查询由浏览器直接访问 IP 信息服务,因此显示的是浏览器出口 IP;补丁会明确标注这一点,并提示它可能与后端代理出口不同。
|
||||||
|
|
||||||
|
重新构建:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Zephyruso/zashboard.git
|
||||||
|
cd zashboard
|
||||||
|
git checkout 0d2a7b5c0ac6f67085f32ad3d08d6b4a63e24d42
|
||||||
|
git apply --unidiff-zero ../clash-for-linux/resources/dashboard/zashboard-issue-290.patch
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
pnpm run type-check
|
||||||
|
pnpm run build
|
||||||
|
cp LICENSE dist/LICENSE
|
||||||
|
zip -r dist.zip dist
|
||||||
|
```
|
||||||
|
|
||||||
|
生成的 `dist.zip` 用于替换本目录中的同名文件。Zashboard 使用 MIT 许可证,许可证正文已包含在压缩包的 `dist/LICENSE` 中。
|
||||||
Binary file not shown.
@@ -0,0 +1,55 @@
|
|||||||
|
diff --git a/src/components/overview/IPCheck.vue b/src/components/overview/IPCheck.vue
|
||||||
|
index 4cbafcd..39aa13c 100644
|
||||||
|
--- a/src/components/overview/IPCheck.vue
|
||||||
|
+++ b/src/components/overview/IPCheck.vue
|
||||||
|
@@ -30,0 +31,4 @@
|
||||||
|
+ <div class="text-base-content/50 mt-1 text-xs">
|
||||||
|
+ {{ $t('browserEgressIPTip') }}
|
||||||
|
+ </div>
|
||||||
|
+
|
||||||
|
diff --git a/src/i18n/en.ts b/src/i18n/en.ts
|
||||||
|
index dab7c33..8f74f36 100644
|
||||||
|
--- a/src/i18n/en.ts
|
||||||
|
+++ b/src/i18n/en.ts
|
||||||
|
@@ -317 +317 @@ const en = {
|
||||||
|
- autoIPCheckWhenStart: 'Auto-check IP on startup',
|
||||||
|
+ autoIPCheckWhenStart: 'Auto-check browser egress IP on startup',
|
||||||
|
@@ -319 +319,3 @@ const en = {
|
||||||
|
- networkInfo: 'Network info',
|
||||||
|
+ networkInfo: 'Browser egress IP',
|
||||||
|
+ browserEgressIPTip:
|
||||||
|
+ "This shows the current browser's egress IP, which may differ from the backend proxy exit.",
|
||||||
|
diff --git a/src/i18n/ru.ts b/src/i18n/ru.ts
|
||||||
|
index 1dec38e..8be91cc 100644
|
||||||
|
--- a/src/i18n/ru.ts
|
||||||
|
+++ b/src/i18n/ru.ts
|
||||||
|
@@ -319 +319 @@ const ru: LANG_MESSAGE = {
|
||||||
|
- autoIPCheckWhenStart: 'Автоматическая проверка IP при запуске',
|
||||||
|
+ autoIPCheckWhenStart: 'Автоматическая проверка исходящего IP браузера при запуске',
|
||||||
|
@@ -321 +321,3 @@ const ru: LANG_MESSAGE = {
|
||||||
|
- networkInfo: 'Информация о сети',
|
||||||
|
+ networkInfo: 'Исходящий IP браузера',
|
||||||
|
+ browserEgressIPTip:
|
||||||
|
+ 'Здесь показан исходящий IP текущего браузера; он может отличаться от выходного IP прокси на бэкенде.',
|
||||||
|
diff --git a/src/i18n/zh-tw.ts b/src/i18n/zh-tw.ts
|
||||||
|
index d6bb953..bfb2b12 100644
|
||||||
|
--- a/src/i18n/zh-tw.ts
|
||||||
|
+++ b/src/i18n/zh-tw.ts
|
||||||
|
@@ -317 +317 @@ const zhTW: LANG_MESSAGE = {
|
||||||
|
- autoIPCheckWhenStart: '自動檢查 IP',
|
||||||
|
+ autoIPCheckWhenStart: '自動檢查瀏覽器出口 IP',
|
||||||
|
@@ -319 +319,2 @@ const zhTW: LANG_MESSAGE = {
|
||||||
|
- networkInfo: '網路資訊',
|
||||||
|
+ networkInfo: '瀏覽器出口 IP',
|
||||||
|
+ browserEgressIPTip: '此處顯示的是目前瀏覽器的出口 IP,可能與後端代理出口不同。',
|
||||||
|
diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts
|
||||||
|
index 7588ebd..dca714d 100644
|
||||||
|
--- a/src/i18n/zh.ts
|
||||||
|
+++ b/src/i18n/zh.ts
|
||||||
|
@@ -317 +317 @@ const zh: LANG_MESSAGE = {
|
||||||
|
- autoIPCheckWhenStart: '自动检查 IP',
|
||||||
|
+ autoIPCheckWhenStart: '自动检查浏览器出口 IP',
|
||||||
|
@@ -319 +319,2 @@ const zh: LANG_MESSAGE = {
|
||||||
|
- networkInfo: '网络信息',
|
||||||
|
+ networkInfo: '浏览器出口 IP',
|
||||||
|
+ browserEgressIPTip: '此处显示的是当前浏览器的出口 IP,可能与后端代理出口不同。',
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||||
|
ARCHIVE="$PROJECT_DIR/resources/dashboard/dist.zip"
|
||||||
|
|
||||||
|
[ -f "$ARCHIVE" ] || {
|
||||||
|
echo "not ok - dashboard archive is missing: $ARCHIVE" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
bundle_text="$(unzip -p "$ARCHIVE" 'dist/assets/*.js')"
|
||||||
|
|
||||||
|
assert_bundle_contains() {
|
||||||
|
local name="$1"
|
||||||
|
local expected="$2"
|
||||||
|
|
||||||
|
if ! grep -Fq "$expected" <<<"$bundle_text"; then
|
||||||
|
echo "not ok - $name" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "ok - $name"
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_bundle_contains "dashboard identifies the browser egress IP" "浏览器出口 IP"
|
||||||
|
assert_bundle_contains \
|
||||||
|
"dashboard explains that browser and backend proxy exits may differ" \
|
||||||
|
"此处显示的是当前浏览器的出口 IP,可能与后端代理出口不同。"
|
||||||
|
assert_bundle_contains "dashboard includes the English browser-egress label" "Browser egress IP"
|
||||||
Reference in New Issue
Block a user