新增节点
This commit is contained in:
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -718,7 +718,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "claudia"
|
||||
version = "1.2.0"
|
||||
version = "1.2.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
||||
@@ -69,6 +69,14 @@ pub fn get_all_nodes() -> Vec<PackycodeNode> {
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "公交车 US-CN2".to_string(),
|
||||
url: "https://api-us-cn2.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "美国 CN2 线路(公交车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
// 滴滴车节点 (Taxi Service)
|
||||
PackycodeNode {
|
||||
name: "滴滴车默认节点".to_string(),
|
||||
@@ -102,6 +110,14 @@ pub fn get_all_nodes() -> Vec<PackycodeNode> {
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
PackycodeNode {
|
||||
name: "滴滴车 US-CN2".to_string(),
|
||||
url: "https://share-api-us-cn2.packycode.com".to_string(),
|
||||
node_type: NodeType::Direct,
|
||||
description: "美国 CN2 线路(滴滴车)".to_string(),
|
||||
response_time: None,
|
||||
available: None,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -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-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",
|
||||
"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://api-us-cn2.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 https://share-api-us-cn2.packycode.com",
|
||||
"assetProtocol": {
|
||||
"enable": true,
|
||||
"scope": [
|
||||
|
||||
@@ -1143,7 +1143,8 @@ const CreateStationDialog: React.FC<{
|
||||
{ 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" }
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🇺🇸 公交车 US-CN2" }
|
||||
];
|
||||
|
||||
await performSpeedTest(busNodes, (bestNode) => {
|
||||
@@ -1156,7 +1157,8 @@ const CreateStationDialog: React.FC<{
|
||||
{ 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" }
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" },
|
||||
{ url: "https://share-api-us-cn2.packycode.com", name: "🇺🇸 滴滴车 US-CN2" }
|
||||
];
|
||||
|
||||
await performSpeedTest(taxiNodes, (bestNode) => {
|
||||
@@ -1431,6 +1433,9 @@ const CreateStationDialog: React.FC<{
|
||||
<SelectItem value="https://api-cf-pro.packycode.com">
|
||||
☁️ 公交车 CF-Pro
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-us-cn2.packycode.com">
|
||||
🇺🇸 公交车 US-CN2
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -1490,6 +1495,9 @@ const CreateStationDialog: React.FC<{
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 滴滴车 CF-Pro
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-us-cn2.packycode.com">
|
||||
🇺🇸 滴滴车 US-CN2
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
@@ -1913,7 +1921,8 @@ const EditStationDialog: React.FC<{
|
||||
{ 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" }
|
||||
{ url: "https://api-cf-pro.packycode.com", name: "☁️ 公交车 CF-Pro" },
|
||||
{ url: "https://api-us-cn2.packycode.com", name: "🇺🇸 公交车 US-CN2" }
|
||||
];
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
@@ -1978,7 +1987,8 @@ const EditStationDialog: React.FC<{
|
||||
{ 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" }
|
||||
{ url: "https://share-api-cf-pro.packycode.com", name: "☁️ 滴滴车 CF-Pro" },
|
||||
{ url: "https://share-api-us-cn2.packycode.com", name: "🇺🇸 滴滴车 US-CN2" }
|
||||
];
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
@@ -2295,22 +2305,19 @@ const EditStationDialog: 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 value="https://api-hk-g.packycode.com">
|
||||
🇭🇰 公交车 HK-G
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-us-cn2.packycode.com">
|
||||
🔄 备用1 (US-CN2)
|
||||
🇺🇸 公交车 US-CN2
|
||||
</SelectItem>
|
||||
<SelectItem value="https://api-cf-pro.packycode.com">
|
||||
☁️ 备用2 (CF-Pro)
|
||||
☁️ 公交车 CF-Pro
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -2371,6 +2378,9 @@ const EditStationDialog: React.FC<{
|
||||
<SelectItem value="https://share-api-cf-pro.packycode.com">
|
||||
☁️ 滴滴车 CF-Pro
|
||||
</SelectItem>
|
||||
<SelectItem value="https://share-api-us-cn2.packycode.com">
|
||||
🇺🇸 滴滴车 US-CN2
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user