mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
chore: delete clash core, update CI, change profile name, change URL test link
This commit is contained in:
parent
9df1115380
commit
dbc626734d
2
.github/workflows/alpha.yml
vendored
2
.github/workflows/alpha.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-20.04, macos-latest]
|
os: [windows-latest, ubuntu-20.04, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
@ -13,10 +13,20 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
portable: false
|
||||||
|
- os: windows-latest
|
||||||
|
portable: true
|
||||||
|
- os: ubuntu-latest
|
||||||
|
portable: false
|
||||||
|
- os: macos-latest
|
||||||
|
portable: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -50,6 +60,7 @@ jobs:
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
# enable cache even though failed
|
# enable cache even though failed
|
||||||
# continue-on-error: true
|
# continue-on-error: true
|
||||||
|
if: matrix.portable == false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
@ -60,12 +71,13 @@ jobs:
|
||||||
releaseBody: "More new features are now supported."
|
releaseBody: "More new features are now supported."
|
||||||
releaseDraft: false
|
releaseDraft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
args: -f default-meta
|
||||||
|
|
||||||
- name: Portable Bundle
|
- name: Portable Bundle
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: matrix.portable == true
|
||||||
# rebuild with env settings
|
|
||||||
run: |
|
run: |
|
||||||
yarn build
|
yarn install --network-timeout 1000000 --frozen-lockfile
|
||||||
|
yarn build -f default-meta
|
||||||
yarn run portable
|
yarn run portable
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -74,10 +86,10 @@ jobs:
|
||||||
VITE_WIN_PORTABLE: 1
|
VITE_WIN_PORTABLE: 1
|
||||||
|
|
||||||
release-update:
|
release-update:
|
||||||
needs: release
|
needs: [release]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
startsWith(github.repository, 'zzzgydi') &&
|
startsWith(github.repository, 'wonfen') &&
|
||||||
startsWith(github.ref, 'refs/tags/v')
|
startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
2
.github/workflows/compatible.yml
vendored
2
.github/workflows/compatible.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
|
|
||||||
runs-on: ${{ matrix.targets.os }}
|
runs-on: ${{ matrix.targets.os }}
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
2
.github/workflows/meta.yml
vendored
2
.github/workflows/meta.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -28,7 +28,7 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ${{ github.event.inputs.os }}
|
runs-on: ${{ github.event.inputs.os }}
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: System Version
|
- name: System Version
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/updater.yml
vendored
2
.github/workflows/updater.yml
vendored
|
@ -5,7 +5,7 @@ on: workflow_dispatch
|
||||||
jobs:
|
jobs:
|
||||||
release-update:
|
release-update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: startsWith(github.repository, 'zzzgydi')
|
if: startsWith(github.repository, 'wonfen')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
55
README.md
55
README.md
|
@ -6,66 +6,41 @@
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<h3 align="center">
|
<h3 align="center">
|
||||||
A <a href="https://github.com/Dreamacro/clash">Clash</a> GUI based on <a href="https://github.com/tauri-apps/tauri">tauri</a>.
|
A 接盘 Clash Meta GUI based on <a href="https://github.com/tauri-apps/tauri">tauri</a>.
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Full `clash` config supported, Partial `clash premium` config supported.
|
- Since the clash core has been removed. The project no longer maintains the clash core, but only the Clash Meta core.
|
||||||
- Profiles management and enhancement (by yaml and Javascript). [Doc](https://github.com/zzzgydi/clash-verge/wiki/%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)
|
- Profiles management and enhancement (by yaml and Javascript). [Doc](https://github.com/wonfen/clash-verge-rev/wiki/%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97)
|
||||||
- Simple UI and supports custom theme color.
|
- Simple UI and supports custom theme color.
|
||||||
- Built-in support [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta) core.
|
- Built-in support [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta) core.
|
||||||
- System proxy setting and guard.
|
- System proxy setting and guard.
|
||||||
|
|
||||||
## Promotion
|
## Promotion
|
||||||
|
|
||||||
[狗狗加速 —— 技术流机场 Doggygo VPN](https://dg1.top)
|
[狗狗加速 —— 技术流机场 Doggygo VPN](https://狗狗加速.com)
|
||||||
|
|
||||||
- High-performance overseas VPN, free trial, discounted packages, unlock streaming media, the world's first to support Hysteria protocol.
|
|
||||||
- 高性能海外机场,免费试用,优惠套餐,解锁流媒体,全球首家支持 Hysteria 协议。
|
- 高性能海外机场,免费试用,优惠套餐,解锁流媒体,全球首家支持 Hysteria 协议。
|
||||||
- 使用 Clash Verge 专属邀请链接注册送 15 天,每天 1G 流量免费试用:https://panel.dg1.top/#/register?code=sFCDayZf
|
- 使用 Clash Verge 专属邀请链接注册送 3 天,每天 1G 流量免费试用:https://verge.狗狗加速.com/#/register?code=oaxsAGo6
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Promotion Detail</summary>
|
|
||||||
|
|
||||||
- Clash Verge 专属 8 折优惠码: verge20 (仅有 500 份)
|
- Clash Verge 专属 8 折优惠码: verge20 (仅有 500 份)
|
||||||
- 优惠套餐每月仅需 15.8 元,160G 流量,年付 8 折
|
- 优惠套餐每月仅需 15.8 元,160G 流量,年付 8 折
|
||||||
- 海外团队,无跑路风险,高达 50% 返佣
|
- 海外团队,无跑路风险,高达 50% 返佣
|
||||||
- 集群负载均衡设计,高速专线(兼容老客户端),极低延迟,无视晚高峰,4K 秒开
|
- 集群负载均衡设计,高速专线(兼容老客户端),极低延迟,无视晚高峰,4K 秒开
|
||||||
- 全球首家 Hysteria 协议机场,将在今年 10 月上线更快的 `tuic` 协议(Clash Verge 客户端最佳搭配)
|
- 全球首家 Hysteria 协议机场,现已上线更快的 `Hysteria2` 协议(Clash Verge 客户端最佳搭配)
|
||||||
- 解锁流媒体及 ChatGPT
|
- 解锁流媒体及 ChatGPT
|
||||||
- 官网:https://dg1.top
|
- 官网:https://狗狗加速.com
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
[EEVPN —— 海外运营机场 ※ 支持 ChatGPT](https://www.eejsq.net/#/register?code=yRr6qBO3)
|
|
||||||
|
|
||||||
- 年付低至 9.99 元,价格低,速度不减
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Promotion Detail</summary>
|
|
||||||
|
|
||||||
- 中国大陆 BGP 网络接入
|
|
||||||
- IEPL 专线网络
|
|
||||||
- 最高 2500Mbps 速率可用
|
|
||||||
- 不限制在线客户端
|
|
||||||
- 解锁流媒体及 ChatGPT
|
|
||||||
- 海外运营 数据安全
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Download from [release](https://github.com/zzzgydi/clash-verge/releases). Supports Windows x64, Linux x86_64 and macOS 11+
|
Download from [release](https://github.com/wonfen/clash-verge-rev/releases). Supports Windows x64, Linux x86_64 and macOS 11+
|
||||||
|
|
||||||
- [Windows x64](https://github.com/zzzgydi/clash-verge/releases/download/v1.3.8/Clash.Verge_1.3.8_x64_en-US.msi)
|
- [Windows x64](https://github.com/wonfen/clash-verge-rev/releases/download/v1.3.9/Clash.Verge_1.3.9_x64_en-US.msi)
|
||||||
- [macOS intel](https://github.com/zzzgydi/clash-verge/releases/download/v1.3.8/Clash.Verge_1.3.8_x64.dmg)
|
- [macOS intel](https://github.com/wonfen/clash-verge-rev/releases/download/v1.3.9/Clash.Verge_1.3.9_x64.dmg)
|
||||||
- [macOS arm](https://github.com/zzzgydi/clash-verge/releases/download/v1.3.8/Clash.Verge_1.3.8_aarch64.dmg)
|
- [macOS arm](https://github.com/wonfen/clash-verge-rev/releases/download/v1.3.9/Clash.Verge_1.3.9_aarch64.dmg)
|
||||||
- [Linux AppImage](https://github.com/zzzgydi/clash-verge/releases/download/v1.3.8/clash-verge_1.3.8_amd64.AppImage)
|
- [Linux AppImage](https://github.com/wonfen/clash-verge-rev/releases/download/v1.3.9/clash-verge_1.3.9_amd64.AppImage)
|
||||||
- [Linux deb](https://github.com/zzzgydi/clash-verge/releases/download/v1.3.8/clash-verge_1.3.8_amd64.deb)
|
- [Linux deb](https://github.com/wonfen/clash-verge-rev/releases/download/v1.3.9/clash-verge_1.3.9_amd64.deb)
|
||||||
- [Fedora Linux](https://github.com/zzzgydi/clash-verge/issues/352)
|
- [Fedora Linux](https://github.com/wonfen/clash-verge-rev/issues/352)
|
||||||
|
|
||||||
Or you can build it yourself. Supports Windows, Linux and macOS 10.15+
|
Or you can build it yourself. Supports Windows, Linux and macOS 10.15+
|
||||||
|
|
||||||
|
@ -85,7 +60,7 @@ You should install Rust and Nodejs, see [here](https://tauri.app/v1/guides/getti
|
||||||
yarn install
|
yarn install
|
||||||
```
|
```
|
||||||
|
|
||||||
Then download the clash binary... Or you can download it from [clash premium release](https://github.com/Dreamacro/clash/releases/tag/premium) and rename it according to [tauri config](https://tauri.studio/docs/api/config/#tauri.bundle.externalBin).
|
Then download the clash binary... Or you can download it from [clash meta release](https://github.com/MetaCubeX/Clash.Meta/releases) and rename it according to [tauri config](https://tauri.studio/docs/api/config/#tauri.bundle.externalBin).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# force update to latest version
|
# force update to latest version
|
||||||
|
|
10
UPDATELOG.md
10
UPDATELOG.md
|
@ -1,3 +1,13 @@
|
||||||
|
## v1.3.9
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- update clash meta core to newest 虚空终端
|
||||||
|
- delete clash core, no longer maintain
|
||||||
|
- small changes here and there
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## v1.3.8
|
## v1.3.8
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "clash-verge",
|
"name": "clash-verge",
|
||||||
"version": "1.3.8",
|
"version": "1.3.9",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tauri dev",
|
"dev": "tauri dev",
|
||||||
|
|
|
@ -14,7 +14,7 @@ const SIDECAR_HOST = execSync("rustc -vV")
|
||||||
.toString()
|
.toString()
|
||||||
.match(/(?<=host: ).+(?=\s*)/g)[0];
|
.match(/(?<=host: ).+(?=\s*)/g)[0];
|
||||||
|
|
||||||
/* ======= clash ======= */
|
/* ======= clash =======
|
||||||
const CLASH_STORAGE_PREFIX = "https://release.dreamacro.workers.dev/";
|
const CLASH_STORAGE_PREFIX = "https://release.dreamacro.workers.dev/";
|
||||||
const CLASH_URL_PREFIX =
|
const CLASH_URL_PREFIX =
|
||||||
"https://github.com/Dreamacro/clash/releases/download/premium/";
|
"https://github.com/Dreamacro/clash/releases/download/premium/";
|
||||||
|
@ -27,31 +27,33 @@ const CLASH_MAP = {
|
||||||
"linux-x64": "clash-linux-amd64",
|
"linux-x64": "clash-linux-amd64",
|
||||||
"linux-arm64": "clash-linux-arm64",
|
"linux-arm64": "clash-linux-arm64",
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
/* ======= clash meta ======= */
|
/* ======= clash meta ======= */
|
||||||
const META_URL_PREFIX = `https://github.com/MetaCubeX/Clash.Meta/releases/download/`;
|
const META_URL_PREFIX = `https://github.com/wonfen/Clash.Meta/releases/download/`;
|
||||||
const META_VERSION = "v1.16.0";
|
const META_VERSION = "2023.11.22";
|
||||||
|
|
||||||
const META_MAP = {
|
const META_MAP = {
|
||||||
"win32-x64": "clash.meta-windows-amd64-compatible",
|
"win32-x64": "clash.meta-windows-amd64",
|
||||||
"darwin-x64": "clash.meta-darwin-amd64",
|
"darwin-x64": "clash.meta-darwin-amd64",
|
||||||
"darwin-arm64": "clash.meta-darwin-arm64",
|
"darwin-arm64": "clash.meta-darwin-arm64",
|
||||||
"linux-x64": "clash.meta-linux-amd64-compatible",
|
"linux-x64": "clash.meta-linux-amd64",
|
||||||
"linux-arm64": "clash.meta-linux-arm64",
|
"linux-arm64": "clash.meta-linux-arm64",
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* check available
|
* check available
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { platform, arch } = process;
|
const { platform, arch } = process;
|
||||||
|
/*
|
||||||
if (!CLASH_MAP[`${platform}-${arch}`]) {
|
if (!CLASH_MAP[`${platform}-${arch}`]) {
|
||||||
throw new Error(`clash unsupported platform "${platform}-${arch}"`);
|
throw new Error(`clash unsupported platform "${platform}-${arch}"`);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (!META_MAP[`${platform}-${arch}`]) {
|
if (!META_MAP[`${platform}-${arch}`]) {
|
||||||
throw new Error(`clash meta unsupported platform "${platform}-${arch}"`);
|
throw new Error(`clash meta unsupported platform "${platform}-${arch}"`);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
function clash() {
|
function clash() {
|
||||||
const name = CLASH_MAP[`${platform}-${arch}`];
|
const name = CLASH_MAP[`${platform}-${arch}`];
|
||||||
|
|
||||||
|
@ -87,7 +89,7 @@ function clashS3() {
|
||||||
downloadURL,
|
downloadURL,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
function clashMeta() {
|
function clashMeta() {
|
||||||
const name = META_MAP[`${platform}-${arch}`];
|
const name = META_MAP[`${platform}-${arch}`];
|
||||||
const isWin = platform === "win32";
|
const isWin = platform === "win32";
|
||||||
|
@ -182,7 +184,7 @@ async function resolveClash() {
|
||||||
/**
|
/**
|
||||||
* only Windows
|
* only Windows
|
||||||
* get the wintun.dll (not required)
|
* get the wintun.dll (not required)
|
||||||
*/
|
|
||||||
async function resolveWintun() {
|
async function resolveWintun() {
|
||||||
const { platform } = process;
|
const { platform } = process;
|
||||||
|
|
||||||
|
@ -217,7 +219,7 @@ async function resolveWintun() {
|
||||||
|
|
||||||
console.log(`[INFO]: resolve wintun.dll finished`);
|
console.log(`[INFO]: resolve wintun.dll finished`);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* download the file to the resources dir
|
* download the file to the resources dir
|
||||||
*/
|
*/
|
||||||
|
@ -286,7 +288,7 @@ const resolveUninstall = () =>
|
||||||
const resolveMmdb = () =>
|
const resolveMmdb = () =>
|
||||||
resolveResource({
|
resolveResource({
|
||||||
file: "Country.mmdb",
|
file: "Country.mmdb",
|
||||||
downloadURL: `https://github.com/Dreamacro/maxmind-geoip/releases/download/20230812/Country.mmdb`,
|
downloadURL: `https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb`,
|
||||||
});
|
});
|
||||||
const resolveGeosite = () =>
|
const resolveGeosite = () =>
|
||||||
resolveResource({
|
resolveResource({
|
||||||
|
@ -300,9 +302,9 @@ const resolveGeoIP = () =>
|
||||||
});
|
});
|
||||||
|
|
||||||
const tasks = [
|
const tasks = [
|
||||||
{ name: "clash", func: () => resolveSidecar(clashS3()), retry: 5 },
|
// { name: "clash", func: resolveClash, retry: 5 },
|
||||||
{ name: "clash-meta", func: () => resolveSidecar(clashMeta()), retry: 5 },
|
{ name: "clash-meta", func: () => resolveSidecar(clashMeta()), retry: 5 },
|
||||||
{ name: "wintun", func: resolveWintun, retry: 5, winOnly: true },
|
// { name: "wintun", func: resolveWintun, retry: 5, winOnly: true },
|
||||||
{ name: "service", func: resolveService, retry: 5, winOnly: true },
|
{ name: "service", func: resolveService, retry: 5, winOnly: true },
|
||||||
{ name: "install", func: resolveInstall, retry: 5, winOnly: true },
|
{ name: "install", func: resolveInstall, retry: 5, winOnly: true },
|
||||||
{ name: "uninstall", func: resolveUninstall, retry: 5, winOnly: true },
|
{ name: "uninstall", func: resolveUninstall, retry: 5, winOnly: true },
|
||||||
|
|
|
@ -18,7 +18,7 @@ async function resolvePortable() {
|
||||||
const zip = new AdmZip();
|
const zip = new AdmZip();
|
||||||
|
|
||||||
zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe"));
|
zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe"));
|
||||||
zip.addLocalFile(path.join(releaseDir, "clash.exe"));
|
// zip.addLocalFile(path.join(releaseDir, "clash.exe"));
|
||||||
zip.addLocalFile(path.join(releaseDir, "clash-meta.exe"));
|
zip.addLocalFile(path.join(releaseDir, "clash-meta.exe"));
|
||||||
zip.addLocalFolder(path.join(releaseDir, "resources"), "resources");
|
zip.addLocalFolder(path.join(releaseDir, "resources"), "resources");
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,8 @@ async function resolveUpdater() {
|
||||||
|
|
||||||
Object.entries(updateDataNew.platforms).forEach(([key, value]) => {
|
Object.entries(updateDataNew.platforms).forEach(([key, value]) => {
|
||||||
if (value.url) {
|
if (value.url) {
|
||||||
updateDataNew.platforms[key].url = "https://ghproxy.com/" + value.url;
|
updateDataNew.platforms[key].url =
|
||||||
|
"https://mirror.ghproxy.com/" + value.url;
|
||||||
} else {
|
} else {
|
||||||
console.log(`[Error]: updateDataNew.platforms.${key} is null`);
|
console.log(`[Error]: updateDataNew.platforms.${key} is null`);
|
||||||
}
|
}
|
||||||
|
|
2063
src-tauri/Cargo.lock
generated
2063
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "clash-verge"
|
name = "clash-verge"
|
||||||
version = "0.1.0"
|
version = "1.3.9"
|
||||||
description = "clash verge"
|
description = "clash verge"
|
||||||
authors = ["zzzgydi"]
|
authors = ["zzzgydi"]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
repository = "https://github.com/zzzgydi/clash-verge.git"
|
repository = "https://github.com/wonfen/clash-verge-rev.git"
|
||||||
default-run = "clash-verge"
|
default-run = "clash-verge"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl Config {
|
||||||
Self::global().runtime_config.clone()
|
Self::global().runtime_config.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 初始化配置
|
/// 初始化订阅
|
||||||
pub fn init_config() -> Result<()> {
|
pub fn init_config() -> Result<()> {
|
||||||
crate::log_err!(Self::generate());
|
crate::log_err!(Self::generate());
|
||||||
if let Err(err) = Self::generate_file(ConfigType::Run) {
|
if let Err(err) = Self::generate_file(ConfigType::Run) {
|
||||||
|
@ -64,7 +64,7 @@ impl Config {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 将配置丢到对应的文件中
|
/// 将订阅丢到对应的文件中
|
||||||
pub fn generate_file(typ: ConfigType) -> Result<PathBuf> {
|
pub fn generate_file(typ: ConfigType) -> Result<PathBuf> {
|
||||||
let path = match typ {
|
let path = match typ {
|
||||||
ConfigType::Run => dirs::app_home_dir()?.join(RUNTIME_CONFIG),
|
ConfigType::Run => dirs::app_home_dir()?.join(RUNTIME_CONFIG),
|
||||||
|
@ -82,7 +82,7 @@ impl Config {
|
||||||
Ok(path)
|
Ok(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 生成配置存好
|
/// 生成订阅存好
|
||||||
pub fn generate() -> Result<()> {
|
pub fn generate() -> Result<()> {
|
||||||
let (config, exists_keys, logs) = enhance::enhance();
|
let (config, exists_keys, logs) = enhance::enhance();
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ impl IProfiles {
|
||||||
Ok(current == uid)
|
Ok(current == uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取current指向的配置内容
|
/// 获取current指向的订阅内容
|
||||||
pub fn current_mapping(&self) -> Result<Mapping> {
|
pub fn current_mapping(&self) -> Result<Mapping> {
|
||||||
match (self.current.as_ref(), self.items.as_ref()) {
|
match (self.current.as_ref(), self.items.as_ref()) {
|
||||||
(Some(current), Some(items)) => {
|
(Some(current), Some(items)) => {
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::collections::HashMap;
|
||||||
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
||||||
pub struct IRuntime {
|
pub struct IRuntime {
|
||||||
pub config: Option<Mapping>,
|
pub config: Option<Mapping>,
|
||||||
// 记录在配置中(包括merge和script生成的)出现过的keys
|
// 记录在订阅中(包括merge和script生成的)出现过的keys
|
||||||
// 这些keys不一定都生效
|
// 这些keys不一定都生效
|
||||||
pub exists_keys: Vec<String>,
|
pub exists_keys: Vec<String>,
|
||||||
pub chain_logs: HashMap<String, Vec<(String, String)>>,
|
pub chain_logs: HashMap<String, Vec<(String, String)>>,
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub async fn get_proxy_delay(name: String, test_url: Option<String>) -> Result<D
|
||||||
let (url, headers) = clash_client_info()?;
|
let (url, headers) = clash_client_info()?;
|
||||||
let url = format!("{url}/proxies/{name}/delay");
|
let url = format!("{url}/proxies/{name}/delay");
|
||||||
|
|
||||||
let default_url = "http://www.gstatic.com/generate_204";
|
let default_url = "http://1.1.1.1";
|
||||||
let test_url = test_url
|
let test_url = test_url
|
||||||
.map(|s| if s.is_empty() { default_url.into() } else { s })
|
.map(|s| if s.is_empty() { default_url.into() } else { s })
|
||||||
.unwrap_or(default_url.into());
|
.unwrap_or(default_url.into());
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl CoreManager {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 检查配置是否正确
|
/// 检查订阅是否正确
|
||||||
pub fn check_config(&self) -> Result<()> {
|
pub fn check_config(&self) -> Result<()> {
|
||||||
let config_path = Config::generate_file(ConfigType::Check)?;
|
let config_path = Config::generate_file(ConfigType::Check)?;
|
||||||
let config_path = dirs::path_to_str(&config_path)?;
|
let config_path = dirs::path_to_str(&config_path)?;
|
||||||
|
@ -267,7 +267,7 @@ impl CoreManager {
|
||||||
|
|
||||||
Config::verge().draft().clash_core = Some(clash_core);
|
Config::verge().draft().clash_core = Some(clash_core);
|
||||||
|
|
||||||
// 更新配置
|
// 更新订阅
|
||||||
Config::generate()?;
|
Config::generate()?;
|
||||||
|
|
||||||
self.check_config()?;
|
self.check_config()?;
|
||||||
|
@ -295,13 +295,13 @@ impl CoreManager {
|
||||||
pub async fn update_config(&self) -> Result<()> {
|
pub async fn update_config(&self) -> Result<()> {
|
||||||
log::debug!(target: "app", "try to update clash config");
|
log::debug!(target: "app", "try to update clash config");
|
||||||
|
|
||||||
// 更新配置
|
// 更新订阅
|
||||||
Config::generate()?;
|
Config::generate()?;
|
||||||
|
|
||||||
// 检查配置是否正常
|
// 检查订阅是否正常
|
||||||
self.check_config()?;
|
self.check_config()?;
|
||||||
|
|
||||||
// 更新运行时配置
|
// 更新运行时订阅
|
||||||
let path = Config::generate_file(ConfigType::Run)?;
|
let path = Config::generate_file(ConfigType::Run)?;
|
||||||
let path = dirs::path_to_str(&path)?;
|
let path = dirs::path_to_str(&path)?;
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ use std::collections::HashSet;
|
||||||
type ResultLog = Vec<(String, String)>;
|
type ResultLog = Vec<(String, String)>;
|
||||||
|
|
||||||
/// Enhance mode
|
/// Enhance mode
|
||||||
/// 返回最终配置、该配置包含的键、和script执行的结果
|
/// 返回最终订阅、该订阅包含的键、和script执行的结果
|
||||||
pub fn enhance() -> (Mapping, Vec<String>, HashMap<String, ResultLog>) {
|
pub fn enhance() -> (Mapping, Vec<String>, HashMap<String, ResultLog>) {
|
||||||
// config.yaml 的配置
|
// config.yaml 的订阅
|
||||||
let clash_config = { Config::clash().latest().0.clone() };
|
let clash_config = { Config::clash().latest().0.clone() };
|
||||||
|
|
||||||
let (clash_core, enable_tun, enable_builtin, enable_filter) = {
|
let (clash_core, enable_tun, enable_builtin, enable_filter) = {
|
||||||
|
|
|
@ -47,7 +47,7 @@ pub fn change_clash_mode(mode: String) {
|
||||||
|
|
||||||
match clash_api::patch_configs(&mapping).await {
|
match clash_api::patch_configs(&mapping).await {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
// 更新配置
|
// 更新订阅
|
||||||
Config::clash().data().patch_config(mapping);
|
Config::clash().data().patch_config(mapping);
|
||||||
|
|
||||||
if Config::clash().data().save_config().is_ok() {
|
if Config::clash().data().save_config().is_ok() {
|
||||||
|
@ -156,7 +156,7 @@ pub fn disable_tun_mode() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 修改clash的配置
|
/// 修改clash的订阅
|
||||||
pub async fn patch_clash(patch: Mapping) -> Result<()> {
|
pub async fn patch_clash(patch: Mapping) -> Result<()> {
|
||||||
Config::clash().draft().patch_config(patch.clone());
|
Config::clash().draft().patch_config(patch.clone());
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ pub async fn patch_clash(patch: Mapping) -> Result<()> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 激活配置
|
// 激活订阅
|
||||||
if mixed_port.is_some()
|
if mixed_port.is_some()
|
||||||
|| patch.get("secret").is_some()
|
|| patch.get("secret").is_some()
|
||||||
|| patch.get("external-controller").is_some()
|
|| patch.get("external-controller").is_some()
|
||||||
|
@ -210,7 +210,7 @@ pub async fn patch_clash(patch: Mapping) -> Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 修改verge的配置
|
/// 修改verge的订阅
|
||||||
/// 一般都是一个个的修改
|
/// 一般都是一个个的修改
|
||||||
pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
||||||
Config::verge().draft().patch_config(patch.clone());
|
Config::verge().draft().patch_config(patch.clone());
|
||||||
|
@ -278,7 +278,7 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 更新某个profile
|
/// 更新某个profile
|
||||||
/// 如果更新当前配置就激活配置
|
/// 如果更新当前订阅就激活订阅
|
||||||
pub async fn update_profile(uid: String, option: Option<PrfOption>) -> Result<()> {
|
pub async fn update_profile(uid: String, option: Option<PrfOption>) -> Result<()> {
|
||||||
let url_opt = {
|
let url_opt = {
|
||||||
let profiles = Config::profiles();
|
let profiles = Config::profiles();
|
||||||
|
@ -316,7 +316,7 @@ pub async fn update_profile(uid: String, option: Option<PrfOption>) -> Result<()
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 更新配置
|
/// 更新订阅
|
||||||
async fn update_core_config() -> Result<()> {
|
async fn update_core_config() -> Result<()> {
|
||||||
match CoreManager::global().update_config().await {
|
match CoreManager::global().update_config().await {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
|
|
|
@ -197,7 +197,7 @@ pub fn init_resources(package_info: &PackageInfo) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat", "wintun.dll"];
|
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"];
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"];
|
let file_list = ["Country.mmdb", "geoip.dat", "geosite.dat"];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Clash Verge",
|
"productName": "Clash Verge",
|
||||||
"version": "1.3.8"
|
"version": "1.3.9"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"distDir": "../dist",
|
"distDir": "../dist",
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"icons/icon.ico"
|
"icons/icon.ico"
|
||||||
],
|
],
|
||||||
"resources": ["resources"],
|
"resources": ["resources"],
|
||||||
"externalBin": ["sidecar/clash", "sidecar/clash-meta"],
|
"externalBin": ["sidecar/clash-meta"],
|
||||||
"copyright": "© 2022 zzzgydi All Rights Reserved",
|
"copyright": "© 2022 zzzgydi All Rights Reserved",
|
||||||
"category": "DeveloperTool",
|
"category": "DeveloperTool",
|
||||||
"shortDescription": "A Clash GUI based on tauri.",
|
"shortDescription": "A Clash GUI based on tauri.",
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
"updater": {
|
"updater": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://ghproxy.com/https://github.com/zzzgydi/clash-verge/releases/download/updater/update-proxy.json",
|
"https://mirror.ghproxy.com/https://github.com/wonfen/clash-verge-rev/releases/download/updater/update-proxy.json",
|
||||||
"https://github.com/zzzgydi/clash-verge/releases/download/updater/update.json"
|
"https://github.com/wonfen/clash-verge-rev/releases/download/updater/update.json"
|
||||||
],
|
],
|
||||||
"dialog": false,
|
"dialog": false,
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDExNUFBNTBBN0FDNEFBRTUKUldUbHFzUjZDcVZhRVRJM25NS3NkSFlFVElxUkNZMzZ6bHUwRVJjb2F3alJXVzRaeDdSaTA2YWYK"
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
||||||
},
|
},
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
"shell": {
|
"shell": {
|
||||||
|
|
|
@ -112,8 +112,8 @@ export const ProfileItem = (props: Props) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 0 不使用任何代理
|
/// 0 不使用任何代理
|
||||||
/// 1 使用配置好的代理
|
/// 1 使用订阅好的代理
|
||||||
/// 2 至少使用一个代理,根据配置,如果没配置,默认使用系统代理
|
/// 2 至少使用一个代理,根据订阅,如果没订阅,默认使用系统代理
|
||||||
const onUpdate = useLockFn(async (type: 0 | 1 | 2) => {
|
const onUpdate = useLockFn(async (type: 0 | 1 | 2) => {
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
setLoadingCache((cache) => ({ ...cache, [itemData.uid]: true }));
|
setLoadingCache((cache) => ({ ...cache, [itemData.uid]: true }));
|
||||||
|
|
|
@ -21,7 +21,7 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
const [values, setValues] = useState({
|
const [values, setValues] = useState({
|
||||||
appLogLevel: "info",
|
appLogLevel: "info",
|
||||||
autoCloseConnection: false,
|
autoCloseConnection: false,
|
||||||
enableClashFields: true,
|
enableClashFields: false,
|
||||||
enableBuiltinEnhanced: true,
|
enableBuiltinEnhanced: true,
|
||||||
proxyLayoutColumn: 6,
|
proxyLayoutColumn: 6,
|
||||||
defaultLatencyTest: "",
|
defaultLatencyTest: "",
|
||||||
|
@ -33,8 +33,8 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
setValues({
|
setValues({
|
||||||
appLogLevel: verge?.app_log_level ?? "info",
|
appLogLevel: verge?.app_log_level ?? "info",
|
||||||
autoCloseConnection: verge?.auto_close_connection ?? false,
|
autoCloseConnection: verge?.auto_close_connection ?? true,
|
||||||
enableClashFields: verge?.enable_clash_fields ?? true,
|
enableClashFields: verge?.enable_clash_fields ?? false,
|
||||||
enableBuiltinEnhanced: verge?.enable_builtin_enhanced ?? true,
|
enableBuiltinEnhanced: verge?.enable_builtin_enhanced ?? true,
|
||||||
proxyLayoutColumn: verge?.proxy_layout_column || 6,
|
proxyLayoutColumn: verge?.proxy_layout_column || 6,
|
||||||
defaultLatencyTest: verge?.default_latency_test || "",
|
defaultLatencyTest: verge?.default_latency_test || "",
|
||||||
|
@ -187,7 +187,7 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
sx={{ width: 250 }}
|
sx={{ width: 250 }}
|
||||||
value={values.defaultLatencyTest}
|
value={values.defaultLatencyTest}
|
||||||
placeholder="http://www.gstatic.com/generate_204"
|
placeholder="http://1.1.1.1"
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
|
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"Label-Proxies": "代 理",
|
"Label-Proxies": "代 理",
|
||||||
"Label-Profiles": "配 置",
|
"Label-Profiles": "订 阅",
|
||||||
"Label-Connections": "连 接",
|
"Label-Connections": "连 接",
|
||||||
"Label-Logs": "日 志",
|
"Label-Logs": "日 志",
|
||||||
"Label-Rules": "规 则",
|
"Label-Rules": "规 则",
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
"direct": "直连",
|
"direct": "直连",
|
||||||
"script": "脚本",
|
"script": "脚本",
|
||||||
|
|
||||||
"Profiles": "配置",
|
"Profiles": "订阅",
|
||||||
"Profile URL": "配置文件链接",
|
"Profile URL": "订阅文件链接",
|
||||||
"Import": "导入",
|
"Import": "导入",
|
||||||
"New": "新建",
|
"New": "新建",
|
||||||
"Create Profile": "新建配置",
|
"Create Profile": "新建订阅",
|
||||||
"Choose File": "选择文件",
|
"Choose File": "选择文件",
|
||||||
"Close All": "关闭全部",
|
"Close All": "关闭全部",
|
||||||
"Select": "使用",
|
"Select": "使用",
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
"Refresh": "刷新",
|
"Refresh": "刷新",
|
||||||
"To Top": "移到最前",
|
"To Top": "移到最前",
|
||||||
"To End": "移到末尾",
|
"To End": "移到末尾",
|
||||||
"Update All Profiles": "更新所有配置",
|
"Update All Profiles": "更新所有订阅",
|
||||||
"View Runtime Config": "查看运行时配置",
|
"View Runtime Config": "查看运行时订阅",
|
||||||
"Reactivate Profiles": "重新激活配置",
|
"Reactivate Profiles": "重新激活订阅",
|
||||||
|
|
||||||
"Location": "当前节点",
|
"Location": "当前节点",
|
||||||
"Delay check": "延迟测试",
|
"Delay check": "延迟测试",
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"Proxy detail": "展示节点细节",
|
"Proxy detail": "展示节点细节",
|
||||||
"Filter": "过滤节点",
|
"Filter": "过滤节点",
|
||||||
"Filter conditions": "过滤条件",
|
"Filter conditions": "过滤条件",
|
||||||
"Refresh profiles": "刷新配置",
|
"Refresh profiles": "刷新订阅",
|
||||||
|
|
||||||
"Type": "类型",
|
"Type": "类型",
|
||||||
"Name": "名称",
|
"Name": "名称",
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
"theme.dark": "深色",
|
"theme.dark": "深色",
|
||||||
"theme.system": "系统",
|
"theme.system": "系统",
|
||||||
"Clash Field": "Clash 字段",
|
"Clash Field": "Clash 字段",
|
||||||
"Runtime Config": "运行配置",
|
"Runtime Config": "运行订阅",
|
||||||
"ReadOnly": "只读",
|
"ReadOnly": "只读",
|
||||||
"Restart": "重启内核",
|
"Restart": "重启内核",
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const defaultTheme = {
|
||||||
error_color: "#d32f2f",
|
error_color: "#d32f2f",
|
||||||
warning_color: "#ed6c02",
|
warning_color: "#ed6c02",
|
||||||
success_color: "#2e7d32",
|
success_color: "#2e7d32",
|
||||||
font_family: `"Roboto", "Helvetica", "Arial", sans-serif`,
|
font_family: `"Roboto", "Helvetica", "Arial", sans-serif, "twemoji mozilla"`,
|
||||||
};
|
};
|
||||||
|
|
||||||
// dark mode
|
// dark mode
|
||||||
|
|
|
@ -168,7 +168,7 @@ const ProfilePage = () => {
|
||||||
mutateLogs();
|
mutateLogs();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 更新所有配置
|
// 更新所有订阅
|
||||||
const setLoadingCache = useSetRecoilState(atomLoadingCache);
|
const setLoadingCache = useSetRecoilState(atomLoadingCache);
|
||||||
const onUpdateAll = useLockFn(async () => {
|
const onUpdateAll = useLockFn(async () => {
|
||||||
const throttleMutate = throttle(mutateProfiles, 2000, {
|
const throttleMutate = throttle(mutateProfiles, 2000, {
|
||||||
|
@ -185,7 +185,7 @@ const ProfilePage = () => {
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
setLoadingCache((cache) => {
|
setLoadingCache((cache) => {
|
||||||
// 获取没有正在更新的配置
|
// 获取没有正在更新的订阅
|
||||||
const items = regularItems.filter(
|
const items = regularItems.filter(
|
||||||
(e) => e.type === "remote" && !cache[e.uid]
|
(e) => e.type === "remote" && !cache[e.uid]
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,7 @@ const SettingPage = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const toGithubRepo = useLockFn(() => {
|
const toGithubRepo = useLockFn(() => {
|
||||||
return openWebUrl("https://github.com/zzzgydi/clash-verge");
|
return openWebUrl("https://github.com/wonfen/clash-verge-rev");
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -26,7 +26,7 @@ const SettingPage = () => {
|
||||||
<IconButton
|
<IconButton
|
||||||
size="small"
|
size="small"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
title="@zzzgydi/clash-verge"
|
title="@wonfen/clash-verge-rev"
|
||||||
onClick={toGithubRepo}
|
onClick={toGithubRepo}
|
||||||
>
|
>
|
||||||
<GitHub fontSize="inherit" />
|
<GitHub fontSize="inherit" />
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const getRules = async () => {
|
||||||
export const getProxyDelay = async (name: string, url?: string) => {
|
export const getProxyDelay = async (name: string, url?: string) => {
|
||||||
const params = {
|
const params = {
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
url: url || "http://www.gstatic.com/generate_204",
|
url: url || "http://1.1.1.1",
|
||||||
};
|
};
|
||||||
const instance = await getAxios();
|
const instance = await getAxios();
|
||||||
const result = await instance.get(
|
const result = await instance.get(
|
||||||
|
|
|
@ -116,10 +116,10 @@ class DelayManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
formatDelayColor(delay: number) {
|
formatDelayColor(delay: number) {
|
||||||
if (delay <= 0) return "text.secondary";
|
|
||||||
if (delay >= 10000) return "error.main";
|
if (delay >= 10000) return "error.main";
|
||||||
|
/*if (delay <= 0) return "text.secondary";
|
||||||
if (delay > 500) return "warning.main";
|
if (delay > 500) return "warning.main";
|
||||||
if (delay > 100) return "text.secondary";
|
if (delay > 100) return "text.secondary";*/
|
||||||
return "success.main";
|
return "success.main";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user