#Update 增加txt协议,更新包体,修复停止联机后的依旧显示联机成功的问题

This commit is contained in:
黑先森
2026-01-06 22:45:52 +08:00
parent e91bd07ce8
commit 70c3217ab5
6 changed files with 239 additions and 263 deletions
+4 -4
View File
@@ -14,9 +14,9 @@
"@element-plus/icons-vue": "2.3.2",
"@element-plus/nuxt": "1.1.4",
"@nuxtjs/tailwindcss": "6.13.2",
"@oxc-minify/binding-win32-x64-msvc": "^0.103.0",
"@oxc-parser/binding-win32-x64-msvc": "^0.103.0",
"@oxc-transform/binding-win32-x64-msvc": "^0.103.0",
"@oxc-minify/binding-win32-x64-msvc": "^0.107.0",
"@oxc-parser/binding-win32-x64-msvc": "^0.107.0",
"@oxc-transform/binding-win32-x64-msvc": "^0.107.0",
"@pinia/nuxt": "0.11.2",
"@tauri-apps/api": "2.9.1",
"@tauri-apps/cli": "2.9.6",
@@ -31,7 +31,7 @@
"@vitejs/plugin-vue-jsx": "5.1.1",
"@vueuse/core": "12.7.0",
"archiver": "7.0.1",
"element-plus": "2.12.0",
"element-plus": "2.13.0",
"less": "4.2.1",
"lodash-es": "4.17.21",
"nuxt": "3.20.2",
+8 -3
View File
@@ -1013,6 +1013,12 @@
getMemeberTimer && clearInterval(getMemeberTimer);
getMemeberTimer = setInterval(async () => {
const [error, member] = await ATJ(invoke<string>("get_members_by_cli"));
if(!data.isStart) {
getMemeberTimer && clearInterval(getMemeberTimer);
getMemeberTimer = null;
ipReset();
return;
}
if (!error && member !== "_EasytierGameCliFailedToConnect_") {
const memberJson = JSON.parse(member) as Member[];
const localData = memberJson.find(member => member?.cost == "Local");
@@ -1641,7 +1647,6 @@
const reset = async () => {
data.isStart = false;
await ipReset();
const memberDialog = await getAllWebviewWindows();
const memberDialogs = memberDialog.filter(item => item.label === "member");
if (memberDialogs && memberDialogs.length > 0) {
@@ -1653,8 +1658,8 @@
}
}
}
await unListenAll();
await ipReset();
};
const handleConnection = async () => {
@@ -2021,7 +2026,7 @@
const handleShowMemberDialog = async () => {
if (!data.isStart) {
return ElMessage.warning("请先开始联机");
return ElMessage.warning("请先启动联机");
}
// if (!mainStore.config.ipv4) {
// return ElMessage.warning("请等待获取IP");
+47 -52
View File
@@ -17,19 +17,19 @@ importers:
version: 2.3.2(vue@3.5.25)
'@element-plus/nuxt':
specifier: 1.1.4
version: 1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.25))(element-plus@2.12.0(vue@3.5.25))(magicast@0.5.1)
version: 1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.25))(element-plus@2.13.0(vue@3.5.25))(magicast@0.5.1)
'@nuxtjs/tailwindcss':
specifier: 6.13.2
version: 6.13.2(magicast@0.5.1)(yaml@2.8.2)
'@oxc-minify/binding-win32-x64-msvc':
specifier: ^0.103.0
version: 0.103.0
specifier: ^0.107.0
version: 0.107.0
'@oxc-parser/binding-win32-x64-msvc':
specifier: ^0.103.0
version: 0.103.0
specifier: ^0.107.0
version: 0.107.0
'@oxc-transform/binding-win32-x64-msvc':
specifier: ^0.103.0
version: 0.103.0
specifier: ^0.107.0
version: 0.107.0
'@pinia/nuxt':
specifier: 0.11.2
version: 0.11.2(magicast@0.5.1)(pinia@3.0.4(vue@3.5.25))
@@ -73,8 +73,8 @@ importers:
specifier: 7.0.1
version: 7.0.1
element-plus:
specifier: 2.12.0
version: 2.12.0(vue@3.5.25)
specifier: 2.13.0
version: 2.13.0(vue@3.5.25)
less:
specifier: 4.2.1
version: 4.2.1
@@ -831,8 +831,8 @@ packages:
cpu: [x64]
os: [win32]
'@oxc-minify/binding-win32-x64-msvc@0.103.0':
resolution: {integrity: sha512-tnVwRbhiYOkyusMdHr7kQt6V+/cF6pEaDR9QQXVNyRk2mbfEmSZ5wPO9S2R+UxfpgsWX6z0wiZ022TPZXM0uQA==}
'@oxc-minify/binding-win32-x64-msvc@0.107.0':
resolution: {integrity: sha512-BQ0vmZWxIdllKjmaXfoyECOVogoL4UKUc6dbwcCKBsmiwTDhTeQRkX+XK017HsmvCoh/8gpsr8lBUlIh18mj4g==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [win32]
@@ -932,8 +932,8 @@ packages:
cpu: [x64]
os: [win32]
'@oxc-parser/binding-win32-x64-msvc@0.103.0':
resolution: {integrity: sha512-WV3Y/v/oZUSgb6BokUCCdU8/JPBE7UAP6LletpzhB60bjgepV83iaOIUOuhtDzTfwYZ88Y+6CtVFkLnz037gvg==}
'@oxc-parser/binding-win32-x64-msvc@0.107.0':
resolution: {integrity: sha512-8x6u+nIKEFR3WT5oHhSP7oPZGI8VLq3iVxOEeV75NfB5ubGUA7sNHcssZ37jmUfhYnkYzBiCGhEAIRa9bUMzBw==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [win32]
@@ -1036,8 +1036,8 @@ packages:
cpu: [x64]
os: [win32]
'@oxc-transform/binding-win32-x64-msvc@0.103.0':
resolution: {integrity: sha512-+/5iMDAhWlVfj4HKhC2JuZMOi3BkIMQhMocDOiDP9tmEhbmQY99bGBuFZyJdEmWaeqDoa7L71Cec20o47jdzxw==}
'@oxc-transform/binding-win32-x64-msvc@0.107.0':
resolution: {integrity: sha512-dz/yY+c4832akxvhoBIfHP6RddERWZatQ5nXPBip79kioIHgwYWCm3To7PgAcbT+cMbuVm4TZCgWlvdSZs4C1w==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [win32]
@@ -1489,9 +1489,6 @@ packages:
'@types/resolve@1.20.2':
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
'@types/web-bluetooth@0.0.16':
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
'@types/web-bluetooth@0.0.20':
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
@@ -1633,24 +1630,24 @@ packages:
'@vue/shared@3.5.25':
resolution: {integrity: sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==}
'@vueuse/core@10.11.1':
resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==}
'@vueuse/core@12.7.0':
resolution: {integrity: sha512-jtK5B7YjZXmkGNHjviyGO4s3ZtEhbzSgrbX+s5o+Lr8i2nYqNyHuPVOeTdM1/hZ5Tkxg/KktAuAVDDiHMraMVA==}
'@vueuse/core@9.13.0':
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
'@vueuse/metadata@10.11.1':
resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==}
'@vueuse/metadata@12.7.0':
resolution: {integrity: sha512-4VvTH9mrjXqFN5LYa5YfqHVRI6j7R00Vy4995Rw7PQxyCL3z0Lli86iN4UemWqixxEvYfRjG+hF9wL8oLOn+3g==}
'@vueuse/metadata@9.13.0':
resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
'@vueuse/shared@10.11.1':
resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==}
'@vueuse/shared@12.7.0':
resolution: {integrity: sha512-coLlUw2HHKsm7rPN6WqHJQr18WymN4wkA/3ThFaJ4v4gWGWAQQGK+MJxLuJTBs4mojQiazlVWAKNJNpUWGRkNw==}
'@vueuse/shared@9.13.0':
resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==}
abbrev@3.0.1:
resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==}
engines: {node: ^18.17.0 || >=20.5.0}
@@ -2202,10 +2199,10 @@ packages:
electron-to-chromium@1.5.267:
resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==}
element-plus@2.12.0:
resolution: {integrity: sha512-M9YLSn2np9OnqrSKWsiXvGe3qnF8pd94+TScsHj1aTMCD+nSEvucXermf807qNt6hOP040le0e5Aft7E9ZfHmA==}
element-plus@2.13.0:
resolution: {integrity: sha512-qjxS+SBChvqCl6lU6ShiliLMN6WqFHiXQENYbAY3GKNflG+FS3jqn8JmQq0CBZq4koFqsi95NT1M6SL4whZfrA==}
peerDependencies:
vue: ^3.2.0
vue: ^3.3.0
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -4493,11 +4490,11 @@ snapshots:
dependencies:
vue: 3.5.25
'@element-plus/nuxt@1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.25))(element-plus@2.12.0(vue@3.5.25))(magicast@0.5.1)':
'@element-plus/nuxt@1.1.4(@element-plus/icons-vue@2.3.2(vue@3.5.25))(element-plus@2.13.0(vue@3.5.25))(magicast@0.5.1)':
dependencies:
'@element-plus/icons-vue': 2.3.2(vue@3.5.25)
'@nuxt/kit': 3.20.2(magicast@0.5.1)
element-plus: 2.12.0(vue@3.5.25)
element-plus: 2.13.0(vue@3.5.25)
magic-string: 0.27.0
unplugin: 1.16.1
transitivePeerDependencies:
@@ -5142,7 +5139,7 @@ snapshots:
'@oxc-minify/binding-win32-x64-msvc@0.102.0':
optional: true
'@oxc-minify/binding-win32-x64-msvc@0.103.0': {}
'@oxc-minify/binding-win32-x64-msvc@0.107.0': {}
'@oxc-parser/binding-android-arm64@0.102.0':
optional: true
@@ -5191,7 +5188,7 @@ snapshots:
'@oxc-parser/binding-win32-x64-msvc@0.102.0':
optional: true
'@oxc-parser/binding-win32-x64-msvc@0.103.0': {}
'@oxc-parser/binding-win32-x64-msvc@0.107.0': {}
'@oxc-project/types@0.102.0': {}
@@ -5242,7 +5239,7 @@ snapshots:
'@oxc-transform/binding-win32-x64-msvc@0.102.0':
optional: true
'@oxc-transform/binding-win32-x64-msvc@0.103.0': {}
'@oxc-transform/binding-win32-x64-msvc@0.107.0': {}
'@parcel/watcher-android-arm64@2.5.1':
optional: true
@@ -5570,8 +5567,6 @@ snapshots:
'@types/resolve@1.20.2': {}
'@types/web-bluetooth@0.0.16': {}
'@types/web-bluetooth@0.0.20': {}
'@unhead/vue@2.0.19(vue@3.5.25)':
@@ -5813,6 +5808,16 @@ snapshots:
'@vue/shared@3.5.25': {}
'@vueuse/core@10.11.1(vue@3.5.25)':
dependencies:
'@types/web-bluetooth': 0.0.20
'@vueuse/metadata': 10.11.1
'@vueuse/shared': 10.11.1(vue@3.5.25)
vue-demi: 0.14.10(vue@3.5.25)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/core@12.7.0':
dependencies:
'@types/web-bluetooth': 0.0.20
@@ -5822,33 +5827,23 @@ snapshots:
transitivePeerDependencies:
- typescript
'@vueuse/core@9.13.0(vue@3.5.25)':
'@vueuse/metadata@10.11.1': {}
'@vueuse/metadata@12.7.0': {}
'@vueuse/shared@10.11.1(vue@3.5.25)':
dependencies:
'@types/web-bluetooth': 0.0.16
'@vueuse/metadata': 9.13.0
'@vueuse/shared': 9.13.0(vue@3.5.25)
vue-demi: 0.14.10(vue@3.5.25)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/metadata@12.7.0': {}
'@vueuse/metadata@9.13.0': {}
'@vueuse/shared@12.7.0':
dependencies:
vue: 3.5.25
transitivePeerDependencies:
- typescript
'@vueuse/shared@9.13.0(vue@3.5.25)':
dependencies:
vue-demi: 0.14.10(vue@3.5.25)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
abbrev@3.0.1: {}
abort-controller@3.0.0:
@@ -6348,7 +6343,7 @@ snapshots:
electron-to-chromium@1.5.267: {}
element-plus@2.12.0(vue@3.5.25):
element-plus@2.13.0(vue@3.5.25):
dependencies:
'@ctrl/tinycolor': 3.6.1
'@element-plus/icons-vue': 2.3.2(vue@3.5.25)
@@ -6356,7 +6351,7 @@ snapshots:
'@popperjs/core': '@sxzz/popperjs-es@2.11.7'
'@types/lodash': 4.17.21
'@types/lodash-es': 4.17.12
'@vueuse/core': 9.13.0(vue@3.5.25)
'@vueuse/core': 10.11.1(vue@3.5.25)
async-validator: 4.2.5
dayjs: 1.11.19
lodash: 4.17.21
+177 -169
View File
File diff suppressed because it is too large Load Diff
+2 -34
View File
@@ -1,7 +1,7 @@
use reqwest::{Client, Error};
// use futures_util::StreamExt;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use serde::{Deserialize};
// use std::collections::HashMap;
use std::fs::{self, File};
use std::io::{BufRead, BufReader, Write};
use std::os::windows::process::CommandExt;
@@ -237,38 +237,6 @@ fn get_tool_exe_path(path: &str) -> String {
return tool_path;
}
#[derive(Serialize, Deserialize, Debug)]
struct RoutePeerInfo {
peer_id: u64,
cost: u64,
hostname: Option<String>,
udp_stun_info: String,
easytier_version: String,
network_length: u64,
}
#[derive(Serialize, Deserialize, Debug)]
struct RouteTable {
peer_infos: HashMap<u32, RoutePeerInfo>,
ipv4_peer_id_map: HashMap<String, u64>,
}
#[derive(Serialize, Deserialize, Debug)]
struct PeerRouteServiceImpl {
route_table_with_cost: RouteTable,
}
#[derive(Serialize, Deserialize, Debug)]
struct PeerRoute {
my_peer_id: u64,
service_impl: PeerRouteServiceImpl,
}
#[derive(Serialize, Deserialize, Debug)]
struct MyResponse {
response: PeerRoute,
}
#[tauri::command(rename_all = "snake_case")]
async fn get_members_by_cli() -> String {
+1 -1
View File
@@ -94,7 +94,7 @@ export const ATJ = (promise: Promise<any>, errorExt: string | undefined = undefi
});
};
const _supportProtocols = ["tcp", "udp", "ws", "wss", "srv", "schema"];
const _supportProtocols = ["tcp", "udp", "ws", "wss", "srv", "schema", "txt"];
export const supportProtocols = () => {
return _supportProtocols.slice();