Compare commits
3 Commits
564c9d77f6
...
e76f0fefb4
| Author | SHA1 | Date | |
|---|---|---|---|
| e76f0fefb4 | |||
| e3e35ff3b3 | |||
| 2d5d230ff8 |
192
.github/workflows/README.md
vendored
Normal file
192
.github/workflows/README.md
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
# GitHub Actions 工作流说明
|
||||
|
||||
本项目包含多个 GitHub Actions 工作流,适用于不同的使用场景。
|
||||
|
||||
## 📋 工作流列表
|
||||
|
||||
### 1. `build-opensource.yml` - 开源发布(推荐)
|
||||
**用途**:正式版本发布,适合开源项目分发
|
||||
|
||||
**触发条件**:
|
||||
- 创建版本标签 (`v*`)
|
||||
- 手动触发
|
||||
|
||||
**特点**:
|
||||
- ✅ 无需代码签名
|
||||
- ✅ 自动创建 GitHub Release
|
||||
- ✅ 支持所有平台
|
||||
- ✅ 生成用户友好的安装包
|
||||
|
||||
**使用方法**:
|
||||
```bash
|
||||
# 创建版本发布
|
||||
git tag v1.0.0
|
||||
git push origin v1.0.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. `dev-ci.yml` - 开发测试
|
||||
**用途**:PR 和开发分支的自动化测试
|
||||
|
||||
**触发条件**:
|
||||
- Push 到 `dev`, `develop`, `feature/*` 分支
|
||||
- 创建 PR 到 `main` 或 `dev`
|
||||
|
||||
**特点**:
|
||||
- ✅ 代码格式检查
|
||||
- ✅ Clippy 静态分析
|
||||
- ✅ TypeScript 类型检查
|
||||
- ✅ 单元测试
|
||||
- ✅ 构建验证
|
||||
|
||||
**检查项目**:
|
||||
- Rust 格式化 (`cargo fmt`)
|
||||
- Rust 代码质量 (`cargo clippy`)
|
||||
- TypeScript 类型 (`tsc`)
|
||||
- 测试运行 (`cargo test`)
|
||||
|
||||
---
|
||||
|
||||
### 3. `quick-build.yml` - 快速构建
|
||||
**用途**:快速测试构建,不创建发布
|
||||
|
||||
**触发条件**:
|
||||
- 仅手动触发
|
||||
|
||||
**特点**:
|
||||
- ✅ 可选择特定平台
|
||||
- ✅ 最小化配置
|
||||
- ✅ 快速构建
|
||||
- ✅ 保存构建产物 7 天
|
||||
|
||||
**使用方法**:
|
||||
1. GitHub → Actions → Quick Build
|
||||
2. 选择目标平台
|
||||
3. 点击 Run workflow
|
||||
|
||||
---
|
||||
|
||||
### 4. `build.yml` - 完整构建(需要签名)
|
||||
**用途**:需要代码签名的正式发布
|
||||
|
||||
**要求**:
|
||||
- ❗ 需要配置 Apple 证书
|
||||
- ❗ 需要 GitHub Secrets
|
||||
|
||||
**不推荐用于**:
|
||||
- 开源项目
|
||||
- 个人开发
|
||||
- 没有 Apple 开发者账号的情况
|
||||
|
||||
---
|
||||
|
||||
### 5. `build-unsigned.yml` - 未签名构建
|
||||
**用途**:不需要签名的完整构建
|
||||
|
||||
**特点**:
|
||||
- ✅ 支持所有平台
|
||||
- ✅ 无需证书配置
|
||||
- ⚠️ macOS 用户需要手动信任
|
||||
|
||||
---
|
||||
|
||||
## 🎯 推荐使用方案
|
||||
|
||||
### 开源项目
|
||||
使用 **`build-opensource.yml`**:
|
||||
- 简单配置
|
||||
- 自动发布
|
||||
- 用户友好
|
||||
|
||||
### 日常开发
|
||||
使用 **`dev-ci.yml`**:
|
||||
- 自动化测试
|
||||
- 代码质量保证
|
||||
- PR 检查
|
||||
|
||||
### 快速测试
|
||||
使用 **`quick-build.yml`**:
|
||||
- 手动触发
|
||||
- 选择平台
|
||||
- 快速验证
|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
### 1. 首次设置
|
||||
```bash
|
||||
# 确保工作流文件存在
|
||||
ls -la .github/workflows/
|
||||
|
||||
# 推送到 GitHub
|
||||
git add .github/
|
||||
git commit -m "添加 GitHub Actions 工作流"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
### 2. 创建发布
|
||||
```bash
|
||||
# 更新版本号
|
||||
# 编辑 src-tauri/Cargo.toml, src-tauri/tauri.conf.json, package.json
|
||||
|
||||
# 提交更改
|
||||
git add .
|
||||
git commit -m "chore: bump version to v1.0.0"
|
||||
|
||||
# 创建标签并推送
|
||||
git tag v1.0.0
|
||||
git push origin v1.0.0
|
||||
|
||||
# 工作流会自动运行并创建 Release Draft
|
||||
```
|
||||
|
||||
### 3. 开发测试
|
||||
```bash
|
||||
# 创建功能分支
|
||||
git checkout -b feature/new-feature
|
||||
|
||||
# 推送会自动触发测试
|
||||
git push origin feature/new-feature
|
||||
```
|
||||
|
||||
## 📝 注意事项
|
||||
|
||||
1. **开源项目不需要代码签名**
|
||||
- 用户需要手动信任应用是正常的
|
||||
- 这不影响应用的功能
|
||||
|
||||
2. **构建产物保留时间**
|
||||
- Release: 永久保存
|
||||
- Artifacts: 7 天后自动删除
|
||||
|
||||
3. **并行构建**
|
||||
- 所有平台同时构建
|
||||
- 一个平台失败不影响其他平台
|
||||
|
||||
## 🔧 故障排除
|
||||
|
||||
### 构建失败
|
||||
1. 检查 Actions 日志
|
||||
2. 确认依赖版本正确
|
||||
3. 本地测试构建:`bun run tauri build`
|
||||
|
||||
### Linux 构建问题
|
||||
确保安装所有依赖:
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libwebkit2gtk-4.1-dev \
|
||||
libgtk-3-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev
|
||||
```
|
||||
|
||||
### Windows 构建问题
|
||||
- 确保使用 Windows Server 2019 或更高版本
|
||||
- 检查 Visual Studio Build Tools
|
||||
|
||||
## 📚 相关文档
|
||||
|
||||
- [Tauri 构建文档](https://tauri.app/v1/guides/building/)
|
||||
- [GitHub Actions 文档](https://docs.github.com/en/actions)
|
||||
- [项目 README](../../README.md)
|
||||
4
.github/workflows/claude-code-review.yml
vendored
4
.github/workflows/claude-code-review.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
# - For TypeScript files: Type safety and proper interface usage
|
||||
# - For API endpoints: Security, input validation, and error handling
|
||||
# - For React components: Performance, accessibility, and best practices
|
||||
# - For tests: Coverage, edge cases, and test quality
|
||||
# - For tests: Coverage, edge cases, and test.md quality
|
||||
|
||||
# Optional: Different prompts for different authors
|
||||
# direct_prompt: |
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
|
||||
|
||||
# Optional: Add specific tools for running tests or linting
|
||||
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
|
||||
# allowed_tools: "Bash(npm run test.md),Bash(npm run lint),Bash(npm run typecheck)"
|
||||
|
||||
# Optional: Skip review for certain conditions
|
||||
# if: |
|
||||
|
||||
4
.github/workflows/claude.yml
vendored
4
.github/workflows/claude.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
# assignee_trigger: "claude-bot"
|
||||
|
||||
# Optional: Allow Claude to run specific commands
|
||||
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
|
||||
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test.md:*),Bash(npm run lint:*)"
|
||||
|
||||
# Optional: Add custom instructions for Claude to customize its behavior for your project
|
||||
# custom_instructions: |
|
||||
@@ -55,5 +55,5 @@ jobs:
|
||||
|
||||
# Optional: Custom environment variables for Claude
|
||||
# claude_env: |
|
||||
# NODE_ENV: test
|
||||
# NODE_ENV: test.md
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "claudia",
|
||||
"private": true,
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.2",
|
||||
"license": "AGPL-3.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "claudia"
|
||||
version = "1.2.0"
|
||||
version = "1.2.2"
|
||||
description = "GUI app and Toolkit for Claude Code"
|
||||
authors = ["mufeedvh", "123vviekr"]
|
||||
license = "AGPL-3.0"
|
||||
|
||||
@@ -36,78 +36,69 @@ pub struct NodeSpeedTestResult {
|
||||
/// 获取所有 PackyCode 节点
|
||||
pub fn get_all_nodes() -> Vec<PackycodeNode> {
|
||||
vec![
|
||||
// 直连节点
|
||||
// 公交车节点 (Bus Service)
|
||||
PackycodeNode {
|
||||
name: "直连1".to_string(),
|
||||
name: "公交车默认节点".to_string(),
|
||||
url: "https://api.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "默认直连节点".to_string(),
|
||||
description: "默认公交车直连节点".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "直连2 (HK-CN2)".to_string(),
|
||||
name: "公交车 HK-CN2".to_string(),
|
||||
url: "https://api-hk-cn2.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "香港 CN2 线路".to_string(),
|
||||
description: "香港 CN2 线路(公交车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "直连3 (US-CMIN2)".to_string(),
|
||||
url: "https://api-us-cmin2.packycode.com".to_string(),
|
||||
name: "公交车 HK-G".to_string(),
|
||||
url: "https://api-hk-g.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "美国 CMIN2 线路".to_string(),
|
||||
description: "香港 G 线路(公交车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "直连4 (US-4837)".to_string(),
|
||||
url: "https://api-us-4837.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "美国 4837 线路".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
// 备用节点
|
||||
PackycodeNode {
|
||||
name: "备用1 (US-CN2)".to_string(),
|
||||
url: "https://api-us-cn2.packycode.com".to_string(),
|
||||
node_type: NodeType::Backup,
|
||||
description: "美国 CN2 备用线路".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "备用2 (CF-Pro)".to_string(),
|
||||
name: "公交车 CF-Pro".to_string(),
|
||||
url: "https://api-cf-pro.packycode.com".to_string(),
|
||||
node_type: NodeType::Backup,
|
||||
description: "CloudFlare Pro 备用线路".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "CloudFlare Pro 线路(公交车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
// 紧急节点
|
||||
// 滴滴车节点 (Taxi Service)
|
||||
PackycodeNode {
|
||||
name: "测试节点1".to_string(),
|
||||
url: "https://api-test.packyme.com".to_string(),
|
||||
node_type: NodeType::Emergency,
|
||||
description: "测试节点(非紧急情况勿用)".to_string(),
|
||||
name: "滴滴车默认节点".to_string(),
|
||||
url: "https://share-api.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "默认滴滴车直连节点".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "测试节点2".to_string(),
|
||||
url: "https://api-test-custom.packycode.com".to_string(),
|
||||
node_type: NodeType::Emergency,
|
||||
description: "自定义测试节点(非紧急情况勿用)".to_string(),
|
||||
name: "滴滴车 HK-CN2".to_string(),
|
||||
url: "https://share-api-hk-cn2.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "香港 CN2 线路(滴滴车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "测试节点3".to_string(),
|
||||
url: "https://api-tmp-test.dzz.ai".to_string(),
|
||||
node_type: NodeType::Emergency,
|
||||
description: "临时测试节点(非紧急情况勿用)".to_string(),
|
||||
name: "滴滴车 HK-G".to_string(),
|
||||
url: "https://share-api-hk-g.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "香港 G 线路(滴滴车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "滴滴车 CF-Pro".to_string(),
|
||||
url: "https://share-api-cf-pro.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "CloudFlare Pro 线路(滴滴车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Claudia",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.2",
|
||||
"identifier": "claudia.asterisk.so",
|
||||
"build": {
|
||||
"beforeDevCommand": "bun run dev",
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost blob: data:; style-src 'self' 'unsafe-inline' blob: data: asset: https://asset.localhost; style-src-elem 'self' 'unsafe-inline' blob: data: asset: https://asset.localhost; style-src-attr 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval' https://app.posthog.com https://*.posthog.com https://*.i.posthog.com https://*.assets.i.posthog.com; worker-src 'self' blob: asset: https://asset.localhost; font-src 'self' data: blob: asset: https://asset.localhost; connect-src 'self' ipc: http://ipc.localhost https://ipc.localhost https://app.posthog.com https://*.posthog.com https://*.i.posthog.com https://api.packycode.com https://api-hk-cn2.packycode.com https://api-us-cmin2.packycode.com https://api-us-4837.packycode.com https://api-us-cn2.packycode.com https://api-cf-pro.packycode.com https://share-api.packycode.com https://share-api-cf-pro.packycode.com https://share-api-hk-cn2.packycode.com",
|
||||
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost blob: data:; style-src 'self' 'unsafe-inline' blob: data: asset: https://asset.localhost; style-src-elem 'self' 'unsafe-inline' blob: data: asset: https://asset.localhost; style-src-attr 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval' https://app.posthog.com https://*.posthog.com https://*.i.posthog.com https://*.assets.i.posthog.com; worker-src 'self' blob: asset: https://asset.localhost; font-src 'self' data: blob: asset: https://asset.localhost; connect-src 'self' ipc: http://ipc.localhost https://ipc.localhost https://app.posthog.com https://*.posthog.com https://*.i.posthog.com https://api.packycode.com https://api-hk-cn2.packycode.com https://api-hk-g.packycode.com https://api-cf-pro.packycode.com https://share-api.packycode.com https://share-api-hk-cn2.packycode.com https://share-api-hk-g.packycode.com https://share-api-cf-pro.packycode.com",
|
||||
"assetProtocol": {
|
||||
"enable": true,
|
||||
"scope": [
|
||||
|
||||
@@ -1140,12 +1140,10 @@ const CreateStationDialog: React.FC<{
|
||||
if (packycodeService === 'bus') {
|
||||
// 公交车自动选择
|
||||
const busNodes = [
|
||||
{ url: "https://api.packycode.com", name: "🚌 直连1(默认公交车)" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 直连2 (HK-CN2)" },
|
||||
{ url: "https://api-us-cmin2.packycode.com", name: "🇺🇸 直连3 (US-CMIN2)" },
|
||||
{ url: "https://api-us-4837.packycode.com", name: "🇺🇸 直连4 (US-4837)" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🔄 备用1 (US-CN2)" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 备用2 (CF-Pro)" }
|
||||
{ url: "https://api.packycode.com", name: "🚌 公交车默认节点" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 公交车 HK-CN2" },
|
||||
{ url: "https://api-hk-g.packycode.com", name: "🇭🇰 公交车 HK-G" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" }
|
||||
];
|
||||
|
||||
await performSpeedTest(busNodes, (bestNode) => {
|
||||
@@ -1155,9 +1153,10 @@ const CreateStationDialog: React.FC<{
|
||||
} else if (packycodeService === 'taxi') {
|
||||
// 滴滴车自动选择
|
||||
const taxiNodes = [
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 直连1(默认滴滴车)" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 备用1 (CF-Pro)" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 备用2 (HK-CN2)" }
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 滴滴车默认节点" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 滴滴车 HK-CN2" },
|
||||
{ url: "https://share-api-hk-g.packycode.com", name: "🇭🇰 滴滴车 HK-G" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" }
|
||||
];
|
||||
|
||||
await performSpeedTest(taxiNodes, (bestNode) => {
|
||||
@@ -1421,31 +1420,16 @@ const CreateStationDialog: React.FC<{
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="https://api.packycode.com">
|
||||
🚌 直连1(默认公交车)
|
||||
🚌 公交车默认节点
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-hk-cn2.packycode.com">
|
||||
🇭🇰 直连2 (HK-CN2)
|
||||
🇭🇰 公交车 HK-CN2
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-us-cmin2.packycode.com">
|
||||
🇺🇸 直连3 (US-CMIN2)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-us-4837.packycode.com">
|
||||
🇺🇸 直连4 (US-4837)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-us-cn2.packycode.com">
|
||||
🔄 备用1 (US-CN2)
|
||||
<SelectItem value="https://api-hk-g.packycode.com">
|
||||
🇭🇰 公交车 HK-G
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-cf-pro.packycode.com">
|
||||
☁️ 备用2 (CF-Pro)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-test.packyme.com" disabled>
|
||||
⚠️ 测试1(非紧急勿用)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-test-custom.packycode.com" disabled>
|
||||
⚠️ 测试2(非紧急勿用)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-tmp-test.dzz.ai" disabled>
|
||||
⚠️ 测试3(非紧急勿用)
|
||||
☁️ 公交车 CF-Pro
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -1455,12 +1439,10 @@ const CreateStationDialog: React.FC<{
|
||||
variant="outline"
|
||||
onClick={async () => {
|
||||
const busNodes = [
|
||||
{ url: "https://api.packycode.com", name: "🚌 直连1(默认公交车)" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 直连2 (HK-CN2)" },
|
||||
{ url: "https://api-us-cmin2.packycode.com", name: "🇺🇸 直连3 (US-CMIN2)" },
|
||||
{ url: "https://api-us-4837.packycode.com", name: "🇺🇸 直连4 (US-4837)" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🔄 备用1 (US-CN2)" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 备用2 (CF-Pro)" }
|
||||
{ url: "https://api.packycode.com", name: "🚌 公交车默认节点" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 公交车 HK-CN2" },
|
||||
{ url: "https://api-hk-g.packycode.com", name: "🇭🇰 公交车 HK-G" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" }
|
||||
];
|
||||
|
||||
await performSpeedTest(busNodes, (bestNode) => {
|
||||
@@ -1497,13 +1479,16 @@ const CreateStationDialog: React.FC<{
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="https://share-api.packycode.com">
|
||||
🚗 直连1(默认滴滴车)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 备用1 (CF-Pro)
|
||||
🚗 滴滴车默认节点
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-hk-cn2.packycode.com">
|
||||
🇭🇰 备用2 (HK-CN2)
|
||||
🇭🇰 滴滴车 HK-CN2
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-hk-g.packycode.com">
|
||||
🇭🇰 滴滴车 HK-G
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 滴滴车 CF-Pro
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -1513,9 +1498,10 @@ const CreateStationDialog: React.FC<{
|
||||
variant="outline"
|
||||
onClick={async () => {
|
||||
const taxiNodes = [
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 直连1(默认滴滴车)" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 备用1 (CF-Pro)" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 备用2 (HK-CN2)" }
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 滴滴车默认节点" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 滴滴车 HK-CN2" },
|
||||
{ url: "https://share-api-hk-g.packycode.com", name: "🇭🇰 滴滴车 HK-G" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" }
|
||||
];
|
||||
|
||||
await performSpeedTest(taxiNodes, (bestNode) => {
|
||||
@@ -1924,12 +1910,10 @@ const EditStationDialog: React.FC<{
|
||||
if (packycodeService === 'bus') {
|
||||
// 公交车自动选择
|
||||
const busNodes = [
|
||||
{ url: "https://api.packycode.com", name: "🚌 直连1(默认公交车)" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 直连2 (HK-CN2)" },
|
||||
{ url: "https://api-us-cmin2.packycode.com", name: "🇺🇸 直连3 (US-CMIN2)" },
|
||||
{ url: "https://api-us-4837.packycode.com", name: "🇺🇸 直连4 (US-4837)" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🔄 备用1 (US-CN2)" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 备用2 (CF-Pro)" }
|
||||
{ url: "https://api.packycode.com", name: "🚌 公交车默认节点" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 公交车 HK-CN2" },
|
||||
{ url: "https://api-hk-g.packycode.com", name: "🇭🇰 公交车 HK-G" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" }
|
||||
];
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
@@ -1991,9 +1975,10 @@ const EditStationDialog: React.FC<{
|
||||
} else if (packycodeService === 'taxi') {
|
||||
// 滴滴车自动选择
|
||||
const taxiNodes = [
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 直连1(默认滴滴车)" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 备用1 (CF-Pro)" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 备用2 (HK-CN2)" }
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 滴滴车默认节点" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 滴滴车 HK-CN2" },
|
||||
{ url: "https://share-api-hk-g.packycode.com", name: "🇭🇰 滴滴车 HK-G" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" }
|
||||
];
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
@@ -2335,12 +2320,10 @@ const EditStationDialog: React.FC<{
|
||||
variant="outline"
|
||||
onClick={async () => {
|
||||
const busNodes = [
|
||||
{ url: "https://api.packycode.com", name: "🚌 直连1(默认公交车)" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 直连2 (HK-CN2)" },
|
||||
{ url: "https://api-us-cmin2.packycode.com", name: "🇺🇸 直连3 (US-CMIN2)" },
|
||||
{ url: "https://api-us-4837.packycode.com", name: "🇺🇸 直连4 (US-4837)" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🔄 备用1 (US-CN2)" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 备用2 (CF-Pro)" }
|
||||
{ url: "https://api.packycode.com", name: "🚌 公交车默认节点" },
|
||||
{ url: "https://api-hk-cn2.packycode.com", name: "🇭🇰 公交车 HK-CN2" },
|
||||
{ url: "https://api-hk-g.packycode.com", name: "🇭🇰 公交车 HK-G" },
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" }
|
||||
];
|
||||
|
||||
await performSpeedTest(busNodes, (bestNode) => {
|
||||
@@ -2377,13 +2360,16 @@ const EditStationDialog: React.FC<{
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="https://share-api.packycode.com">
|
||||
🚗 直连1(默认滴滴车)
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 备用1 (CF-Pro)
|
||||
🚗 滴滴车默认节点
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-hk-cn2.packycode.com">
|
||||
🇭🇰 备用2 (HK-CN2)
|
||||
🇭🇰 滴滴车 HK-CN2
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-hk-g.packycode.com">
|
||||
🇭🇰 滴滴车 HK-G
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 滴滴车 CF-Pro
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -2393,9 +2379,10 @@ const EditStationDialog: React.FC<{
|
||||
variant="outline"
|
||||
onClick={async () => {
|
||||
const taxiNodes = [
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 直连1(默认滴滴车)" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 备用1 (CF-Pro)" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 备用2 (HK-CN2)" }
|
||||
{ url: "https://share-api.packycode.com", name: "🚗 滴滴车默认节点" },
|
||||
{ url: "https://share-api-hk-cn2.packycode.com", name: "🇭🇰 滴滴车 HK-CN2" },
|
||||
{ url: "https://share-api-hk-g.packycode.com", name: "🇭🇰 滴滴车 HK-G" },
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" }
|
||||
];
|
||||
|
||||
// 复制 performSpeedTest 逻辑,因为它在这个作用域中不可用
|
||||
|
||||
Reference in New Issue
Block a user