mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
更新包版本,优化分享配置操作,增加不进行分享的配置提示
Cargo.toml + tauri-plugin-single-instance 2.2.0 + tauri-plugin-cli 2.2.0 + tauri-plugin-window-state 2.2.0 + tauri-plugin-fs 2.2.0 + tauri-plugin-log 2.2.0 + tauri-plugin-shell 2.2.0 package.json + "@tauri-apps/plugin-cli" -> ^2.2.0
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod",
|
||||
@@ -16,7 +16,7 @@
|
||||
"@pinia/nuxt": "0.9.0",
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@tauri-apps/plugin-cli": "^2.0.0",
|
||||
"@tauri-apps/plugin-cli": "^2.2.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "^2.0.0",
|
||||
"@tauri-apps/plugin-fs": "^2.2.0",
|
||||
"@tauri-apps/plugin-log": "^2.2.0",
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
打开config.json目录
|
||||
</ElButton>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.enablePreventSleep">防止休眠</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.enablePreventSleep">防止系统休眠(比如:屏幕会一直亮着)</ElCheckbox></div>
|
||||
<ElDivider />
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.disbleListenner">不监听任何端口,只连接到对等节点</ElCheckbox>
|
||||
|
||||
+71
-16
@@ -55,6 +55,7 @@
|
||||
placeholder="请选择服务器地址"
|
||||
default-first-option
|
||||
v-model="config.serverUrl"
|
||||
no-data-text="无服务器地址"
|
||||
@change="handleServerUrlChange"
|
||||
>
|
||||
<template #prefix>
|
||||
@@ -542,7 +543,7 @@
|
||||
Folder,
|
||||
CopyDocument
|
||||
} from "@element-plus/icons-vue";
|
||||
import { reactive, onBeforeUnmount, onMounted, ref } from "vue";
|
||||
import { reactive, onBeforeUnmount, onMounted, ref, toRaw } from "vue";
|
||||
import { useTray, setTrayRunState, setTrayTooltip, checkNewVersion } from "~/composables/tray";
|
||||
import { getMatches } from "@tauri-apps/plugin-cli";
|
||||
import { initStartWinIpBroadcast } from "~/composables/netcard";
|
||||
@@ -1135,8 +1136,8 @@
|
||||
args.push("-l", ...customListener);
|
||||
}
|
||||
}
|
||||
if (!config.disbleListenner && config.enableCustomListenerV6 && config.customListenerV6Data){
|
||||
args.push("--ipv6-listener", config.customListenerV6Data)
|
||||
if (!config.disbleListenner && config.enableCustomListenerV6 && config.customListenerV6Data) {
|
||||
args.push("--ipv6-listener", config.customListenerV6Data);
|
||||
}
|
||||
if (!config.disbleListenner && !config.enableCustomListener && config.port) {
|
||||
args.push("-l", config.port);
|
||||
@@ -1183,7 +1184,7 @@
|
||||
if (config.devName && config.devNameValue) {
|
||||
args.push("--dev-name", config.devNameValue);
|
||||
}
|
||||
if(config.compression && config.compression != 'none') {
|
||||
if (config.compression && config.compression != "none") {
|
||||
args.push("--compression", config.compression);
|
||||
}
|
||||
return args;
|
||||
@@ -1262,25 +1263,78 @@
|
||||
if (command === "share_config") {
|
||||
try {
|
||||
const {
|
||||
proxyNetworks,
|
||||
autoStart,
|
||||
connectAfterStart,
|
||||
protocol,
|
||||
serverUrl,
|
||||
networkName,
|
||||
networkPassword,
|
||||
dhcp,
|
||||
disableIpv6,
|
||||
disbleP2p,
|
||||
enableCustomProtocol,
|
||||
customProtocol,
|
||||
disbleListenner,
|
||||
port,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
enableCustomListenerV6,
|
||||
customListenerV6Data,
|
||||
devName,
|
||||
devNameValue,
|
||||
enableNetCardMetric,
|
||||
netCardMetricValue,
|
||||
disableEncryption,
|
||||
multiThread,
|
||||
hostname,
|
||||
enablExitNode,
|
||||
useSmoltcp,
|
||||
saveErrorLog,
|
||||
logLevel,
|
||||
ipv4,
|
||||
...otherConfig
|
||||
latencyfirst,
|
||||
disableUdpHolePunching,
|
||||
relayAllPeerrpc,
|
||||
compression,
|
||||
enablePreventSleep,
|
||||
} = mainStore.config;
|
||||
const WT = btoa(encodeURIComponent(JSON.stringify({ config: otherConfig })));
|
||||
const WT = btoa(
|
||||
encodeURIComponent(
|
||||
JSON.stringify({
|
||||
config: {
|
||||
protocol,
|
||||
serverUrl,
|
||||
networkName,
|
||||
networkPassword,
|
||||
dhcp,
|
||||
disableIpv6,
|
||||
disbleP2p,
|
||||
enableCustomProtocol,
|
||||
customProtocol,
|
||||
disbleListenner,
|
||||
port,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
enableCustomListenerV6,
|
||||
customListenerV6Data,
|
||||
devName,
|
||||
devNameValue,
|
||||
enableNetCardMetric,
|
||||
netCardMetricValue,
|
||||
disableEncryption,
|
||||
multiThread,
|
||||
latencyfirst,
|
||||
disableUdpHolePunching,
|
||||
relayAllPeerrpc,
|
||||
compression,
|
||||
enablePreventSleep
|
||||
}
|
||||
})
|
||||
)
|
||||
);
|
||||
await writeText(WT);
|
||||
ElMessage.success("配置已复制");
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
ElMessage.error("分享失败");
|
||||
}
|
||||
ElConfirmPrimary(`{action} 虚拟网IP,主机名,子网代理,为子网代理启用smoltcp堆栈,开机自启,软件启动自动联机,出口节点,不生成Tun网卡,错误日志相关配置`, "提示", {
|
||||
confirmButtonText: "知道了",
|
||||
showCancelButton: false,
|
||||
action: "不会分享"
|
||||
});
|
||||
}
|
||||
if (command === "import_config") {
|
||||
importConfigData.data = "";
|
||||
@@ -1298,6 +1352,7 @@
|
||||
});
|
||||
if (!err) {
|
||||
const payload = JSON.parse(decodeURIComponent(atob(importConfigData.data)));
|
||||
payload.config.serverUrl = payload?.config?.serverUrl?.trim() || config.serverUrl;
|
||||
mainStore.$patch({
|
||||
config: {
|
||||
...mainStore.config,
|
||||
@@ -1306,7 +1361,7 @@
|
||||
});
|
||||
ElMessage.success("导入成功");
|
||||
importConfigData.visible = false;
|
||||
mainStore.basePeers = uniq([config.serverUrl, ...mainStore.basePeers]);
|
||||
mainStore.basePeers = uniq([config.serverUrl, ...mainStore.basePeers].filter(el => el.trim()));
|
||||
} else {
|
||||
console.error(err);
|
||||
if (err !== "cancel") {
|
||||
|
||||
Generated
+5
-5
@@ -27,8 +27,8 @@ importers:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
'@tauri-apps/plugin-cli':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
'@tauri-apps/plugin-clipboard-manager':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
@@ -1147,8 +1147,8 @@ packages:
|
||||
engines: {node: '>= 10'}
|
||||
hasBin: true
|
||||
|
||||
'@tauri-apps/plugin-cli@2.0.0':
|
||||
resolution: {integrity: sha512-glQmlL1IiCGEa1FHYa/PTPSeYhfu56omLRgHXWlJECDt6DbJyRuJWVgtkQfUxtqnVdYnnU+DGIGeiInoEqtjLw==}
|
||||
'@tauri-apps/plugin-cli@2.2.0':
|
||||
resolution: {integrity: sha512-rvNhMog9rHr01Xk+trBFKJ0eZICIvPkm9GX6ogB89/0hROU/lf+a/sb4vC0wtSeR7zrJuCSxwxYuvHCZheaYFA==}
|
||||
|
||||
'@tauri-apps/plugin-clipboard-manager@2.0.0':
|
||||
resolution: {integrity: sha512-V1sXmbjnwfXt/r48RJMwfUmDMSaP/8/YbH4CLNxt+/sf1eHlIP8PRFdFDQwLN0cNQKu2rqQVbG/Wc/Ps6cDUhw==}
|
||||
@@ -5042,7 +5042,7 @@ snapshots:
|
||||
'@tauri-apps/cli-win32-ia32-msvc': 2.1.0
|
||||
'@tauri-apps/cli-win32-x64-msvc': 2.1.0
|
||||
|
||||
'@tauri-apps/plugin-cli@2.0.0':
|
||||
'@tauri-apps/plugin-cli@2.2.0':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.1.1
|
||||
|
||||
|
||||
Generated
+22
-20
@@ -1227,7 +1227,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
||||
|
||||
[[package]]
|
||||
name = "easytier-game"
|
||||
version = "1.3.3"
|
||||
version = "1.3.4"
|
||||
dependencies = [
|
||||
"log",
|
||||
"planif",
|
||||
@@ -4496,9 +4496,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-cli"
|
||||
version = "2.0.1"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bccd4692b56822a60874542c7655546c8e7aed3c2e2926166e1498e595bd2a2"
|
||||
checksum = "e5458ae16eac81bdbe8d9da2a9f3e01e8cdedbc381cc1727c01127542c8a61c5"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"log",
|
||||
@@ -4506,7 +4506,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
"thiserror 2.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4526,9 +4526,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.0.3"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96ba7d46e86db8c830d143ef90ab5a453328365b0cc834c24edea4267b16aba0"
|
||||
checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
@@ -4540,16 +4540,18 @@ dependencies = [
|
||||
"serde_repr",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.3",
|
||||
"toml 0.8.2",
|
||||
"url",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-log"
|
||||
version = "2.0.2"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8aa13d15daf90230ba26d5a9b4a4612975fa64ce17290cb7f6e0f89bb6997d82"
|
||||
checksum = "eddd784c138c08a43954bc3e735402e6b2b2ee8d8c254a7391f4e77c01273dd5"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"byte-unit",
|
||||
@@ -4563,15 +4565,15 @@ dependencies = [
|
||||
"swift-rs",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
"thiserror 2.0.3",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.0.2"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ad7880c5586b6b2104be451e3d7fc0f3800c84bda69e9ba81c828f87cb34267"
|
||||
checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
@@ -4584,30 +4586,30 @@ dependencies = [
|
||||
"shared_child",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
"thiserror 2.0.3",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.0.1"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a25ac834491d089699a2bc9266a662faf373c9f779f05a2235bc6e4d9e61769a"
|
||||
checksum = "0f36019ee9832dc99e4450bb55a21cfad8633b19c2c18bd17c7741939b070ede"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"thiserror 1.0.64",
|
||||
"thiserror 2.0.3",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.0.2"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683c8764751fbbcebf3a594bcee24cf84c62773fa0080d1b40fc80698472421e"
|
||||
checksum = "234dd891cc7960fa28f93ea911f3e0d9ce8375ebf9ff303831bdd7a3443d5714"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"log",
|
||||
@@ -4615,7 +4617,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
"thiserror 2.0.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.3.3"
|
||||
version = "1.3.4"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
@@ -31,14 +31,14 @@ tauri = { version = "2.1.1", features = [
|
||||
"image-ico",
|
||||
] }
|
||||
|
||||
tauri-plugin-log = "2.0.2"
|
||||
tauri-plugin-shell = "2.0.2"
|
||||
tauri-plugin-log = "2.2.0"
|
||||
tauri-plugin-shell = "2.2.0"
|
||||
reqwest = { version = "0.12", features = ["json"] }
|
||||
zip = "2.2"
|
||||
sysinfo = '0.32.0'
|
||||
planif = { git = "https://github.com/mattrobineau/planif", tag = "1.0.1" }
|
||||
whoami = "1.5.2"
|
||||
tauri-plugin-fs = "2"
|
||||
tauri-plugin-fs = "2.2.0"
|
||||
tauri-plugin-clipboard-manager = "2.0.2"
|
||||
rand = "0.8.5"
|
||||
tokio = { version = "1.41.1", features = ["process"] }
|
||||
@@ -51,6 +51,6 @@ version = "0.58.0"
|
||||
features = ["Win32_System_TaskScheduler", "Win32_System_Power"]
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-cli = "2"
|
||||
tauri-plugin-single-instance = "2.0.1"
|
||||
tauri-plugin-window-state = "2"
|
||||
tauri-plugin-cli = "2.2.0"
|
||||
tauri-plugin-single-instance = "2.2.0"
|
||||
tauri-plugin-window-state = "2.2.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.3.3",
|
||||
"title": "easytier-game 1.3.4",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
|
||||
+4
-2
@@ -1,7 +1,7 @@
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { ATJ } from "./index";
|
||||
import { h, type VNode } from "vue";
|
||||
type Opt = { action?: string; confirmButtonText?: string; cancelButtonText?: string; VNode?: VNode | null }
|
||||
type Opt = { action?: string; confirmButtonText?: string; cancelButtonText?: string; VNode?: VNode | null, showCancelButton?:boolean }
|
||||
export const ElConfirmDanger = (
|
||||
content: string,
|
||||
title: string,
|
||||
@@ -81,10 +81,11 @@ export const ElConfirmPrimary = (
|
||||
action: "",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
showCancelButton: true,
|
||||
VNode: null
|
||||
}
|
||||
): Promise<any | [any, any]> => {
|
||||
const { action = "", confirmButtonText = "确定", cancelButtonText = "取消", VNode = null } = opt;
|
||||
const { action = "", confirmButtonText = "确定", cancelButtonText = "取消", VNode = null, showCancelButton = true } = opt;
|
||||
const formatContentArr = content.split("{action}");
|
||||
const action_length = formatContentArr.length - 1;
|
||||
const messageArr = [];
|
||||
@@ -103,6 +104,7 @@ export const ElConfirmPrimary = (
|
||||
ElMessageBox.confirm(message, title, {
|
||||
closeOnClickModal: false, // 点击遮罩层不关闭弹窗
|
||||
closeOnPressEscape: false, // 按下Esc键不关闭弹窗
|
||||
showCancelButton,
|
||||
cancelButtonText,
|
||||
confirmButtonText,
|
||||
confirmButtonClass: "el-button--primary"
|
||||
|
||||
Reference in New Issue
Block a user