mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2026-09-20 19:22:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7853d3b2f5 | ||
|
|
aacf47b6f5 | ||
|
|
d9b01fc754 | ||
|
|
844fba8462 | ||
|
|
6bfe3860a8 | ||
|
|
a0b4071c49 | ||
|
|
8e9bb114d6 | ||
|
|
fb8e127198 | ||
|
|
3cd19ae42a | ||
|
|
5be1a681ca | ||
|
|
29464179f5 | ||
|
|
88f06fbeba | ||
|
|
ced035dc36 | ||
|
|
feea75dcb6 |
@@ -1,10 +1,10 @@
|
||||
pnpm run build
|
||||
rustup default nightly
|
||||
rem 使用rust nightly构建支持win7的版本,请先将根目录的windows.0.48.5 放入以下目录
|
||||
rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x64
|
||||
rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x86
|
||||
rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x64
|
||||
rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x86
|
||||
@REM rem 使用rust nightly构建支持win7的版本,请先将根目录的windows.0.48.5 放入以下目录
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x64
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x86
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x64
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x86
|
||||
pnpm tauri build -- -Z build-std --target x86_64-win7-windows-msvc
|
||||
rustup default stable
|
||||
pnpm tauri build
|
||||
|
||||
@@ -2,7 +2,21 @@ import { BaseDirectory, writeTextFile } from "@tauri-apps/plugin-fs";
|
||||
import useMainStore from "@/stores/index";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { uniq, intersection, isNil } from "lodash-es";
|
||||
export const updateConfigJson = async (configJsonSeverUrl: Array<string> | string | null | undefined) => {
|
||||
import { bounce } from "~/utils";
|
||||
|
||||
const b = bounce(600);
|
||||
export type ConfigServerUrlType = Array<string> | string | null | undefined | null;
|
||||
|
||||
export const updateConfigJsonBounce = (configJsonSeverUrl?: ConfigServerUrlType) => {
|
||||
b(async () => {
|
||||
const mainStore = useMainStore();
|
||||
if (mainStore.createConfigInEasytier) {
|
||||
await updateConfigJson(configJsonSeverUrl);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const updateConfigJson = async (configJsonSeverUrl?: ConfigServerUrlType) => {
|
||||
const mainStore = useMainStore();
|
||||
const path = import.meta.env.VITE_CONFIG_FILE_NAME;
|
||||
if (isNil(configJsonSeverUrl)) {
|
||||
@@ -19,6 +33,10 @@ export const updateConfigJson = async (configJsonSeverUrl: Array<string> | strin
|
||||
serverUrl,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
bindDeviceEnable,
|
||||
acceptDNS,
|
||||
enablePortForward,
|
||||
portForwardData,
|
||||
...otherConfig
|
||||
} = mainStore.config;
|
||||
let writeServerUrl: Array<string> | string = serverUrl;
|
||||
|
||||
@@ -20,5 +20,8 @@ export const getServerArgs = () => {
|
||||
if (!whiteList && mainStore.serverConfig.enableWhiteList) {
|
||||
args.push("--relay-network-whitelist");
|
||||
}
|
||||
if (mainStore.serverConfig.privateMode) {
|
||||
args.push("--private-mode", "true");
|
||||
}
|
||||
return args;
|
||||
};
|
||||
|
||||
+50
-37
@@ -4,17 +4,29 @@ import { WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import type { WebviewLabel, WebviewOptions } from "@tauri-apps/api/webview";
|
||||
import useMainStore from "@/stores/index";
|
||||
import { onBeforeUnmount } from "vue";
|
||||
import { updateConfigJsonBounce, type ConfigServerUrlType } from "./configJson";
|
||||
|
||||
const _listenersMaps: { [key: string]: [UnlistenFn | null, UnlistenFn | null] } = {};
|
||||
const _listenersMaps: { [key: string]: [UnlistenFn | null] } = {};
|
||||
|
||||
const dealCloseListener = async (dialog: WebviewWindow, label: string, beforeCloseFunc?: () => void | null) => {
|
||||
const unlistenFnList: [UnlistenFn | null] = _listenersMaps[label] || [null];
|
||||
let [unListenlogClose] = unlistenFnList;
|
||||
|
||||
unListenlogClose && (await unListenlogClose());
|
||||
|
||||
unListenlogClose = await dialog.onCloseRequested(async () => {
|
||||
beforeCloseFunc && (await beforeCloseFunc());
|
||||
unListenlogClose && (await unListenlogClose());
|
||||
console.log("close");
|
||||
});
|
||||
};
|
||||
export default async (
|
||||
label: WebviewLabel,
|
||||
options?: Omit<WebviewOptions, "x" | "y" | "width" | "height"> & WindowOptions,
|
||||
afterCreatedFunc?: (webviewWindow: WebviewWindow, appWindow: Window) => void | null,
|
||||
beforeCloseFunc?: () => void | null
|
||||
) => {
|
||||
const unlistenFnList: [UnlistenFn | null, UnlistenFn | null] = _listenersMaps[label] || [null, null];
|
||||
let [unlistenLogCreated, unListenlogClose] = unlistenFnList;
|
||||
const unlistenFnList: [UnlistenFn | null] = _listenersMaps[label] || [null];
|
||||
let dialog = await WebviewWindow.getByLabel(label);
|
||||
if (!dialog) {
|
||||
let defaultOpts: { [key: string]: any; parent: Window | undefined } = {
|
||||
@@ -29,54 +41,55 @@ export default async (
|
||||
};
|
||||
const appWindow = getCurrentWindow();
|
||||
if (appWindow) {
|
||||
const appSize = await appWindow.outerSize();
|
||||
const factor = await appWindow.scaleFactor();
|
||||
const appPosition = await appWindow.outerPosition();
|
||||
const logicalPosition = new PhysicalPosition(appPosition.x + appSize.width, appPosition.y).toLogical(factor);
|
||||
defaultOpts.parent = appWindow;
|
||||
// console.error(logicalPosition);
|
||||
defaultOpts.x = logicalPosition.x;
|
||||
defaultOpts.y = logicalPosition.y;
|
||||
}
|
||||
unlistenLogCreated && (await (unlistenLogCreated as Function)());
|
||||
unListenlogClose && (await unListenlogClose());
|
||||
dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
|
||||
unlistenLogCreated = await dialog.listen("tauri://webview-created", async () => {
|
||||
if (dialog) {
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
if (defaultOpts.x == 0 && defaultOpts.y == 0) {
|
||||
const appSize = await appWindow.outerSize();
|
||||
const factor = await appWindow.scaleFactor();
|
||||
const appPosition = await appWindow.outerPosition();
|
||||
const logicalPosition = new PhysicalPosition(appPosition.x + appSize.width, appPosition.y).toLogical(factor);
|
||||
defaultOpts.x = logicalPosition.x;
|
||||
defaultOpts.y = logicalPosition.y;
|
||||
}
|
||||
});
|
||||
unlistenFnList[0] = unlistenLogCreated;
|
||||
unListenlogClose = await dialog.onCloseRequested(async () => {
|
||||
beforeCloseFunc && (await beforeCloseFunc());
|
||||
unListenlogClose && (await unListenlogClose());
|
||||
unlistenLogCreated && (await (unlistenLogCreated as Function)());
|
||||
});
|
||||
unlistenFnList[1] = unlistenLogCreated;
|
||||
_listenersMaps[label] = unlistenFnList;
|
||||
}
|
||||
dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
|
||||
await dealCloseListener(dialog, label, beforeCloseFunc);
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
} else {
|
||||
const visible = await dialog.isVisible();
|
||||
if (visible) {
|
||||
await dialog.close();
|
||||
unlistenLogCreated && (await (unlistenLogCreated as Function)());
|
||||
} else {
|
||||
const appWindow = getCurrentWindow();
|
||||
await dealCloseListener(dialog, label, beforeCloseFunc);
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const dataSubscribe = async (cb?: (...args: any) => any) => {
|
||||
if (!cb) return;
|
||||
export const dataSubscribe = async (cb?: any, getconfigServerUrl?: () => ConfigServerUrlType) => {
|
||||
const mainStore = useMainStore();
|
||||
const abort = new AbortController();
|
||||
window.addEventListener("storage", async () => {
|
||||
mainStore.$hydrate();
|
||||
if (cb && cb instanceof Function) {
|
||||
await cb();
|
||||
|
||||
window.addEventListener(
|
||||
"storage",
|
||||
async () => {
|
||||
// console.log("触发", {dhcp:mainStore.config.dhcp, c: mainStore.createConfigInEasytier})
|
||||
mainStore.$hydrate();
|
||||
const configServerUrl = getconfigServerUrl && getconfigServerUrl instanceof Function ? getconfigServerUrl() : null;
|
||||
updateConfigJsonBounce(configServerUrl);
|
||||
if (cb && cb instanceof Function) {
|
||||
await cb();
|
||||
}
|
||||
},
|
||||
{
|
||||
signal: abort.signal
|
||||
}
|
||||
}, {
|
||||
signal: abort.signal
|
||||
})
|
||||
);
|
||||
onBeforeUnmount(() => {
|
||||
console.log("取消监听");
|
||||
abort?.abort();
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
+17
-17
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.6",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod",
|
||||
@@ -12,28 +12,28 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@element-plus/nuxt": "^1.1.1",
|
||||
"@nuxtjs/tailwindcss": "6.13.1",
|
||||
"@pinia/nuxt": "0.10.1",
|
||||
"@tauri-apps/api": "2.3.0",
|
||||
"@tauri-apps/cli": "2.3.0",
|
||||
"@element-plus/nuxt": "1.1.2",
|
||||
"@nuxtjs/tailwindcss": "6.13.2",
|
||||
"@pinia/nuxt": "0.11.0",
|
||||
"@tauri-apps/api": "2.5.0",
|
||||
"@tauri-apps/cli": "2.5.0",
|
||||
"@tauri-apps/plugin-cli": "^2.2.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.2.1",
|
||||
"@tauri-apps/plugin-dialog": "2.2.0",
|
||||
"@tauri-apps/plugin-fs": "^2.2.0",
|
||||
"@tauri-apps/plugin-log": "2.2.2",
|
||||
"@tauri-apps/plugin-shell": "^2.2.0",
|
||||
"@tauri-apps/plugin-window-state": "2.2.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.2.2",
|
||||
"@tauri-apps/plugin-dialog": "2.2.2",
|
||||
"@tauri-apps/plugin-fs": "2.3.0",
|
||||
"@tauri-apps/plugin-log": "2.4.0",
|
||||
"@tauri-apps/plugin-shell": "2.2.1",
|
||||
"@tauri-apps/plugin-window-state": "2.2.2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vitejs/plugin-vue-jsx": "4.1.2",
|
||||
"@vueuse/core": "12.7.0",
|
||||
"archiver": "^7.0.1",
|
||||
"element-plus": "2.9.4",
|
||||
"element-plus": "2.9.11",
|
||||
"less": "4.2.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "3.15.4",
|
||||
"pinia": "3.0.1",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"nuxt": "3.17.4",
|
||||
"pinia": "3.0.2",
|
||||
"pinia-plugin-persistedstate": "4.3.0",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "3.5.2",
|
||||
"prettier-plugin-tailwindcss": "0.6.11"
|
||||
|
||||
+123
-33
@@ -2,8 +2,8 @@
|
||||
<div class="flex h-full flex-col items-start overflow-auto px-[25px]">
|
||||
<div class="flex flex-nowrap items-center gap-[15px]">
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.enableCustomProtocol">默认直连(p2p)使用的协议</ElCheckbox>
|
||||
<ElTooltip content="如果没有支持该协议的节点地址,程序会自动处理,请放心使用">
|
||||
<ElCheckbox v-model="mainStore.config.enableCustomProtocol">直连(P2P)优先使用传输协议</ElCheckbox>
|
||||
<ElTooltip content="若无法建立指定的协议,会自动使用可建立连接的协议">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ElCheckbox v-model="mainStore.config.relayAllPeerrpc">帮助对等节点建立直连(p2p)通信</ElCheckbox>
|
||||
<ElCheckbox v-model="mainStore.config.relayAllPeerrpc">帮助他人建立直连(P2P)连接</ElCheckbox>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.connectAfterStart">软件启动后,自动"启动联机"(搭配开机自启,无感联机)</ElCheckbox></div>
|
||||
<div class="flex flex-nowrap items-center gap-[15px]">
|
||||
@@ -38,8 +38,8 @@
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.enablePreventSleep">防止系统休眠(比如:屏幕会一直亮着)</ElCheckbox></div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.latencyfirst">延迟优先模式,将尝试使用最低延迟路径转发流量</ElCheckbox>
|
||||
<ElTooltip content="视网络质量进行选择,可能会出现中转与直连(p2p)来回切换的情况">
|
||||
<ElCheckbox v-model="mainStore.config.latencyfirst">使用低延迟模式</ElCheckbox>
|
||||
<ElTooltip content="弱网环境下可能会导致网络延迟延迟忽高忽低">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
@@ -59,6 +59,20 @@
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disableUdpHolePunching">禁用UDP打洞功能</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disableIpv6">不使用IPv6</ElCheckbox></div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.acceptDNS">魔法DNS</ElCheckbox>
|
||||
<ElTooltip content="您可以使用域名访问其他节点,例如:<hostname>.et.net。魔法DNS将修改您的系统DNS设置,请谨慎启用">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.3.0" />
|
||||
</div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.privateMode">启用私有模式</ElCheckbox>
|
||||
<ElTooltip content="启用后,不允许使用了与本网络不同的房间名和密码的节点通过本节点进行握手或中转">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.3.1" />
|
||||
</div>
|
||||
<ElDivider />
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.disbleListenner">不监听任何端口,只连接到对等节点</ElCheckbox>
|
||||
@@ -103,6 +117,7 @@
|
||||
class="!mb-0"
|
||||
v-model="listenerDialogData.visible"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
title="自定义监听地址"
|
||||
>
|
||||
<ElInput
|
||||
@@ -125,38 +140,74 @@
|
||||
</ElDialog>
|
||||
</div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox
|
||||
:disabled="mainStore.config.disbleListenner"
|
||||
v-model="mainStore.config.enableCustomListenerV6"
|
||||
<ElCheckbox v-model="mainStore.config.enablePortForward">端口转发</ElCheckbox>
|
||||
<ElTooltip
|
||||
:disabled="mainStore.config.enablePortForward"
|
||||
content="请先开启端口转发功能"
|
||||
>
|
||||
自定义IPV6监听地址
|
||||
</ElCheckbox>
|
||||
<div class="w-[200px]">
|
||||
<ElInput
|
||||
:disabled="mainStore.config.disbleListenner || mainStore.config.enableCustomListenerV6"
|
||||
<ElButton
|
||||
size="small"
|
||||
:maxlength="100"
|
||||
v-model="mainStore.config.customListenerV6Data"
|
||||
placeholder="请输入自定义IPV6监听地址"
|
||||
/>
|
||||
</div>
|
||||
<ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听">
|
||||
:disabled="!mainStore.config.enablePortForward"
|
||||
@click="handlePortForwardDialog"
|
||||
>
|
||||
配置
|
||||
</ElButton>
|
||||
</ElTooltip>
|
||||
<ElTooltip content="将本地端口转发到虚拟网络中的远程端口.如:udp://0.0.0.0:12345/10.126.126.1:23456,表示将本地UDP端口12345转发到虚拟网络中的10.126.126.1:23456.可以指定多个">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.1.0" />
|
||||
<CoreVersionWarning version="2.3.0" />
|
||||
<ElDialog
|
||||
width="95%"
|
||||
top="5px"
|
||||
append-to-body
|
||||
:z-index="10"
|
||||
class="!mb-0"
|
||||
v-model="portForwardDialogData.visible"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
title="端口转发配置"
|
||||
>
|
||||
<div class="mb-4">
|
||||
<ElText
|
||||
size="small"
|
||||
type="info"
|
||||
>
|
||||
<div>• 每行一个转发规则</div>
|
||||
<div>• 格式:协议://本地地址:本地端口/目标地址:目标端口</div>
|
||||
<div class="flex items-center">
|
||||
<span class="mr-auto">• 例如:udp://0.0.0.0:12345/10.126.126.1:23456</span>
|
||||
<ElButton
|
||||
size="default"
|
||||
type="primary"
|
||||
@click.stop="handleFinishInputPortForward"
|
||||
>
|
||||
填写完毕
|
||||
</ElButton>
|
||||
</div>
|
||||
</ElText>
|
||||
</div>
|
||||
<ElInput
|
||||
type="textarea"
|
||||
:rows="10"
|
||||
placeholder="请输入端口转发规则,每行一个 例如: udp://0.0.0.0:12345/10.126.126.1:23456 tcp://0.0.0.0:8080/192.168.1.100:80"
|
||||
v-model="mainStore.config.portForwardData"
|
||||
></ElInput>
|
||||
<!-- -->
|
||||
</ElDialog>
|
||||
</div>
|
||||
<ElDivider />
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.devName">自定义网卡名</ElCheckbox>
|
||||
<ElCheckbox v-model="mainStore.config.devName">自定义虚拟网卡名称</ElCheckbox>
|
||||
<ElInput
|
||||
size="small"
|
||||
maxlength="10"
|
||||
v-model="mainStore.config.devNameValue"
|
||||
placeholder="请输入网卡名"
|
||||
placeholder="请输入虚拟网卡名称"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.enableNetCardMetric">自定义easytier网卡跃点</ElCheckbox>
|
||||
<ElCheckbox v-model="mainStore.config.enableNetCardMetric">自定义虚拟网卡优先级</ElCheckbox>
|
||||
<ElInputNumber
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
@@ -166,9 +217,9 @@
|
||||
:precision="0"
|
||||
size="small"
|
||||
v-model="mainStore.config.netCardMetricValue"
|
||||
placeholder="请选择跃点数"
|
||||
placeholder="请输入优先级"
|
||||
/>
|
||||
<ElTooltip content="设置easytier网卡的跃点,提升网卡优先级,跃点越小,网卡优先级越高">
|
||||
<ElTooltip content="数值越小,优先级越高">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
@@ -177,17 +228,43 @@
|
||||
size="small"
|
||||
type="warning"
|
||||
>
|
||||
(不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡,也可以使用 “设置跃点” 功能,除非你启用了下面的功能)
|
||||
(不使用自定义虚拟网卡名称,那么联机时默认会生成一个名为 "et_xxx" 的网卡,也可以使用 “自定义虚拟网卡优先级”
|
||||
功能,除非你启用了下面的功能)
|
||||
</ElText>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.noTun">不创建TUN设备(网卡),可以使用子网代理访问节点</ElCheckbox></div>
|
||||
|
||||
<div class="flex items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.noTun">不创建TUN虚拟网卡</ElCheckbox>
|
||||
|
||||
<ElTooltip content="开启后该节点无法主动访问其他节点">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-[5px]">
|
||||
<div><ElCheckbox v-model="mainStore.config.bindDeviceEnable">绑定物理网卡</ElCheckbox></div>
|
||||
<ElTooltip content="将连接器的套接字绑定到物理设备以避免路由问题。比如子网代理网段与某节点的网段冲突,绑定物理设备后可以与该节点正常通信">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.2.3" />
|
||||
</div>
|
||||
|
||||
<ElDivider />
|
||||
<div><ElCheckbox v-model="mainStore.config.enablExitNode">允许此节点成为出口节点</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disableEncryption">禁用对等节点通信的加密</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.multiThread">启用多线程运行</ElCheckbox></div>
|
||||
<div class="flex items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.disableEncryption">关闭信息加密</ElCheckbox>
|
||||
<ElTooltip content="关闭后通信数据将在互联网上明文传输,如房间名和密码">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
<div class="flex items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.multiThread">开启多线程</ElCheckbox>
|
||||
<ElTooltip content="开启后可能会提高网络性能">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElText>压缩算法</ElText>
|
||||
<ElText>传输数据压缩算法</ElText>
|
||||
<div class="w-[160px]">
|
||||
<ElSelect
|
||||
size="small"
|
||||
@@ -210,8 +287,8 @@
|
||||
<ElDivider />
|
||||
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.useSmoltcp">为子网代理启用smoltcp堆栈</ElCheckbox>
|
||||
<ElTooltip content="使用用户态TCP/IP协议栈smoltcp,避免操作系统防火墙问题导致无法子网代理">
|
||||
<ElCheckbox v-model="mainStore.config.useSmoltcp">为子网代理和 KCP 代理开启用户网络栈</ElCheckbox>
|
||||
<ElTooltip content="开启后会降低网络性能,但不需要配置防火墙">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
@@ -261,6 +338,15 @@
|
||||
loading: false
|
||||
});
|
||||
|
||||
const portForwardDialogData = reactive<{ [key: string]: any }>({
|
||||
visible: false,
|
||||
loading: false
|
||||
});
|
||||
|
||||
const handlePortForwardDialog = () => {
|
||||
portForwardDialogData.visible = true;
|
||||
};
|
||||
|
||||
const handleListenerDialog = () => {
|
||||
listenerDialogData.visible = true;
|
||||
};
|
||||
@@ -269,6 +355,10 @@
|
||||
listenerDialogData.visible = false;
|
||||
};
|
||||
|
||||
const handleFinishInputPortForward = async () => {
|
||||
portForwardDialogData.visible = false;
|
||||
};
|
||||
|
||||
const mainStore = useMainStore();
|
||||
const data = ["trace", "debug", "info", "warn", "error", "off"];
|
||||
const guids = ref<string[][]>([]);
|
||||
@@ -297,7 +387,7 @@
|
||||
};
|
||||
|
||||
// 为bind_device功能增加改方法
|
||||
const _getGuids = async () => {
|
||||
const getGuids = async () => {
|
||||
const guidsValue = await invoke<string[][]>("get_network_adapter_guids");
|
||||
guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : [];
|
||||
};
|
||||
|
||||
+15
-10
@@ -1,12 +1,18 @@
|
||||
<template>
|
||||
<div class="flex h-full flex-col gap-[10px]">
|
||||
<ElRadioGroup
|
||||
:disabled="!data.isSwitchEnable"
|
||||
v-model="mainStore.cidrEnable"
|
||||
>
|
||||
<ElRadioButton :value="true">开启</ElRadioButton>
|
||||
<ElRadioButton :value="false">关闭</ElRadioButton>
|
||||
</ElRadioGroup>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElRadioGroup
|
||||
:disabled="!data.isSwitchEnable"
|
||||
v-model="mainStore.cidrEnable"
|
||||
>
|
||||
<ElRadioButton :value="true">开启</ElRadioButton>
|
||||
<ElRadioButton :value="false">关闭</ElRadioButton>
|
||||
</ElRadioGroup>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.proxyForwardBySystem">通过系统内核转发子网代理数据包,禁用内置NAT</ElCheckbox>
|
||||
<CoreVersionWarning version="2.2.3" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 overflow-auto">
|
||||
<ElInput
|
||||
placeholder="例如: 192.168.1.0/24 一行一个"
|
||||
@@ -107,12 +113,11 @@
|
||||
|
||||
onMounted(async () => {
|
||||
unlistenStart = await listenStart();
|
||||
dataSubscribe();
|
||||
});
|
||||
|
||||
dataSubscribe();
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
unlistenStart && unlistenStart();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
+171
-95
@@ -2,7 +2,7 @@
|
||||
<ElForm
|
||||
size="small"
|
||||
label-position="top"
|
||||
:model="config"
|
||||
:model="mainStore.config"
|
||||
>
|
||||
<ElFormItem
|
||||
label="服务器"
|
||||
@@ -70,18 +70,18 @@
|
||||
filterable
|
||||
placeholder="请选择服务器地址"
|
||||
default-first-option
|
||||
v-model="config.serverUrl"
|
||||
v-model="mainStore.config.serverUrl"
|
||||
no-data-text="无服务器地址"
|
||||
@change="handleServerUrlChange"
|
||||
>
|
||||
<template #prefix>
|
||||
<div :class="config.protocol && config.protocol.length > 1 ? 'w-[120px]' : 'w-[80px]'">
|
||||
<div :class="mainStore.config.protocol && mainStore.config.protocol.length > 1 ? 'w-[120px]' : 'w-[80px]'">
|
||||
<ElSelect
|
||||
placeholder="协议"
|
||||
multiple
|
||||
collapse-tags
|
||||
@click.stop
|
||||
v-model="config.protocol"
|
||||
v-model="mainStore.config.protocol"
|
||||
@change="handleServerUrlChange"
|
||||
>
|
||||
<ElOption
|
||||
@@ -98,7 +98,7 @@
|
||||
<ElLink
|
||||
type="primary"
|
||||
size="small"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
@click.stop="open(publicPeersLink)"
|
||||
>
|
||||
其他公共服务器
|
||||
@@ -161,7 +161,7 @@
|
||||
<ElInput
|
||||
maxlength="100"
|
||||
placeholder="请输入房间名"
|
||||
v-model="config.networkName"
|
||||
v-model="mainStore.config.networkName"
|
||||
></ElInput>
|
||||
</ElFormItem>
|
||||
</div>
|
||||
@@ -179,7 +179,7 @@
|
||||
show-password
|
||||
maxlength="100"
|
||||
placeholder="请输入房间密码"
|
||||
v-model="config.networkPassword"
|
||||
v-model="mainStore.config.networkPassword"
|
||||
type="password"
|
||||
></ElInput>
|
||||
</ElFormItem>
|
||||
@@ -198,7 +198,7 @@
|
||||
<ElInput
|
||||
maxlength="100"
|
||||
placeholder="例如: Player1"
|
||||
v-model="config.hostname"
|
||||
v-model="mainStore.config.hostname"
|
||||
></ElInput>
|
||||
</ElFormItem>
|
||||
<ElFormItem
|
||||
@@ -217,7 +217,7 @@
|
||||
:icon="CopyDocument"
|
||||
></ElButton>
|
||||
<ElSwitch
|
||||
v-model="config.dhcp"
|
||||
v-model="mainStore.config.dhcp"
|
||||
inline-prompt
|
||||
inactive-text="固定IP"
|
||||
active-text="动态获取"
|
||||
@@ -230,21 +230,21 @@
|
||||
</template>
|
||||
<ElInput
|
||||
maxlength="100"
|
||||
:readonly="config.dhcp"
|
||||
:placeholder="data.isStart && config.dhcp ? '等待动态分配IP...' : '例如: 10.126.126.1'"
|
||||
v-model="config.ipv4"
|
||||
:readonly="mainStore.config.dhcp"
|
||||
:placeholder="data.isStart && mainStore.config.dhcp ? '等待动态分配IP...' : '例如: 10.126.126.1'"
|
||||
v-model="mainStore.config.ipv4"
|
||||
>
|
||||
<template #prefix>
|
||||
<ElTooltip
|
||||
class="!text-[10px]"
|
||||
placement="top-end"
|
||||
:content="config.dhcp ? '动态获取无法手动填写' : '固定IP可以手动填写'"
|
||||
:content="mainStore.config.dhcp ? '动态获取无法手动填写' : '固定IP可以手动填写'"
|
||||
>
|
||||
<ElTag
|
||||
size="small"
|
||||
:type="config.dhcp ? 'info' : 'success'"
|
||||
:type="mainStore.config.dhcp ? 'info' : 'success'"
|
||||
>
|
||||
{{ config.dhcp ? "只读" : "可填" }}
|
||||
{{ mainStore.config.dhcp ? "只读" : "可填" }}
|
||||
</ElTag>
|
||||
</ElTooltip>
|
||||
</template>
|
||||
@@ -252,6 +252,10 @@
|
||||
</ElFormItem>
|
||||
</div>
|
||||
</ElForm>
|
||||
<!-- <div class="flex justify-center items-center gap-[5px]">
|
||||
<el-button>分享当前配置</el-button>
|
||||
<el-button>导入联机配置</el-button>
|
||||
</div> -->
|
||||
<div class="mt-auto flex items-start">
|
||||
<div>
|
||||
<div class="pt-[4px]">
|
||||
@@ -330,7 +334,7 @@
|
||||
</div>
|
||||
<div class="mt-[10px] pl-[2px]">
|
||||
<ElTooltip
|
||||
placement="left"
|
||||
placement="top"
|
||||
content="日志"
|
||||
>
|
||||
<ElButton
|
||||
@@ -359,7 +363,7 @@
|
||||
</div>
|
||||
<div class="ml-auto">
|
||||
<ElCheckbox
|
||||
v-model="config.disbleP2p"
|
||||
v-model="mainStore.config.disbleP2p"
|
||||
size="small"
|
||||
>
|
||||
强制中转
|
||||
@@ -370,7 +374,7 @@
|
||||
>
|
||||
<ElCheckbox
|
||||
@change="handleAutoStartByTask"
|
||||
:model-value="config.autoStart"
|
||||
:model-value="mainStore.config.autoStart"
|
||||
size="small"
|
||||
>
|
||||
开机自启
|
||||
@@ -415,7 +419,7 @@
|
||||
<ElLink
|
||||
class="ml-[8px] truncate pb-[2px] !text-[9px]"
|
||||
type="info"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
@click="open('https://github.com/EasyTier/EasytierGame')"
|
||||
>
|
||||
EasytierGame主页
|
||||
@@ -720,11 +724,11 @@
|
||||
import { getAllWebviewWindows, WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import etWindows, { dataSubscribe } from "@/composables/windows";
|
||||
import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path";
|
||||
import { readDir, exists, mkdir, BaseDirectory, readTextFile, readFile, writeFile, remove as removeFile } from "@tauri-apps/plugin-fs";
|
||||
import { updateConfigJson } from "~/composables/configJson";
|
||||
import { readDir, exists, mkdir, BaseDirectory, readTextFile, readFile, writeFile, remove as removeFile, stat } from "@tauri-apps/plugin-fs";
|
||||
import { updateConfigJson, updateConfigJsonBounce } from "~/composables/configJson";
|
||||
import { writeText, readText } from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { sortedUniq, uniq } from "lodash-es";
|
||||
import { bounce, addQQGroup, supportProtocols, preventSleep, stopPreventSleep, ATJ, copyText, isValidWindowsFileName } from "~/utils";
|
||||
import { addQQGroup, supportProtocols, preventSleep, stopPreventSleep, ATJ, copyText, isValidWindowsFileName } from "~/utils";
|
||||
import { ElConfirmDanger, ElConfirmPrimary } from "~/utils/element";
|
||||
import { getServerArgs } from "@/composables/server";
|
||||
|
||||
@@ -746,10 +750,10 @@
|
||||
);
|
||||
|
||||
const mainStore = useMainStore();
|
||||
const config = mainStore.config;
|
||||
// console.error(config);
|
||||
|
||||
const protocols = supportProtocols();
|
||||
const data = reactive({ //easytierGame有没有新版
|
||||
const data = reactive({
|
||||
//easytierGame有没有新版
|
||||
logVisible: false,
|
||||
cidrVisible: false,
|
||||
advanceVisible: false,
|
||||
@@ -811,8 +815,8 @@
|
||||
};
|
||||
|
||||
const handleCopyIp = async () => {
|
||||
if (!config.ipv4?.trim()) return;
|
||||
if (data.isStart || !config.dhcp) {
|
||||
if (!mainStore.config.ipv4?.trim()) return;
|
||||
if (data.isStart || !mainStore.config.dhcp) {
|
||||
await copyText(mainStore.config.ipv4);
|
||||
} else {
|
||||
await copyText(mainStore.config.ipv4, "复制成功,联机后IP可能会变化");
|
||||
@@ -837,8 +841,8 @@
|
||||
const newBasePeers = [...mainStore.basePeers];
|
||||
const idx = newBasePeers.indexOf(url);
|
||||
if (idx >= 0) {
|
||||
if (config.serverUrl === url) {
|
||||
config.serverUrl = "";
|
||||
if (mainStore.config.serverUrl === url) {
|
||||
mainStore.config.serverUrl = "";
|
||||
}
|
||||
newBasePeers.splice(idx, 1);
|
||||
}
|
||||
@@ -851,7 +855,7 @@
|
||||
const handleServerUrlChange = () => {
|
||||
let inputProtocols: string | null = null;
|
||||
for (const p of protocols) {
|
||||
if (config.serverUrl.toLowerCase().startsWith(`${p}://`)) {
|
||||
if (mainStore.config.serverUrl.toLowerCase().startsWith(`${p}://`)) {
|
||||
inputProtocols = p;
|
||||
break;
|
||||
}
|
||||
@@ -1091,9 +1095,9 @@
|
||||
|
||||
const handleAutoStartByTask = async () => {
|
||||
if (import.meta.env.DEV) return ElMessage.warning("开发环境不支持开机自启");
|
||||
await invoke("spawn_autostart", { enabled: !config.autoStart });
|
||||
await invoke("spawn_autostart", { enabled: !mainStore.config.autoStart });
|
||||
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
config.autoStart = is_enable_by_task;
|
||||
mainStore.config.autoStart = is_enable_by_task;
|
||||
};
|
||||
|
||||
const compatibleInitAutoStart = async () => {
|
||||
@@ -1106,17 +1110,37 @@
|
||||
await invoke("spawn_autostart", { enabled: true });
|
||||
}
|
||||
is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
config.autoStart = is_enable_by_task;
|
||||
mainStore.config.autoStart = is_enable_by_task;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
await invoke("spawn_autostart", { enabled: false });
|
||||
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
config.autoStart = is_enable_by_task;
|
||||
mainStore.config.autoStart = is_enable_by_task;
|
||||
}
|
||||
};
|
||||
|
||||
const compatibleIpv6Listener = async () => {
|
||||
// ipv6监听在后续版本合并到customListenner里了,这里做兼容处理
|
||||
if (mainStore.config.enableCustomListenerV6 && mainStore.config.customListenerV6Data) {
|
||||
const customListener = mainStore.config.customListenerV6Data.trim();
|
||||
if (customListener) {
|
||||
const customListenerV4 = mainStore.config.customListenerData
|
||||
.trim()
|
||||
.split("\n")
|
||||
.map(el => el.trim())
|
||||
.filter(el => el);
|
||||
if (!customListenerV4.includes(customListener)) {
|
||||
mainStore.config.customListenerData += `\n${customListener}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mainStore.config.enableCustomListenerV6) {
|
||||
mainStore.config.enableCustomListenerV6 = false;
|
||||
}
|
||||
};
|
||||
|
||||
const initConnectAfterStart = async () => {
|
||||
if (config.connectAfterStart && data.coreVersion) {
|
||||
if (mainStore.config.connectAfterStart && data.coreVersion) {
|
||||
await reset();
|
||||
await handleConnection();
|
||||
}
|
||||
@@ -1206,12 +1230,12 @@
|
||||
let serverLogsTimer: NodeJS.Timeout | null = null;
|
||||
let cidrTimer: NodeJS.Timeout | null = null;
|
||||
|
||||
const b = bounce(600);
|
||||
onMounted(async () => {
|
||||
await initGuiJson();
|
||||
await compatibleInitAutoStart();
|
||||
// await initAutoStart();
|
||||
await initStartWinIpBroadcast();
|
||||
await compatibleIpv6Listener();
|
||||
await getCoreVersion();
|
||||
await listenObj.listenThreadId();
|
||||
await listenObj.listenServerThreadId();
|
||||
@@ -1222,15 +1246,21 @@
|
||||
initPreventSleep();
|
||||
mountedShow(); // 不需要await
|
||||
closePrevent();
|
||||
dataSubscribe(async () => {
|
||||
if (mainStore.createConfigInEasytier) {
|
||||
b(async () => {
|
||||
await updateConfigJson(data.configJsonSeverUrl);
|
||||
});
|
||||
}
|
||||
});
|
||||
getReleaseList();
|
||||
checkNewVersion();
|
||||
if (import.meta.env.PROD) {
|
||||
getReleaseList();
|
||||
checkNewVersion();
|
||||
}
|
||||
await storageDialog();
|
||||
});
|
||||
|
||||
// storageEventEmitter.addEventListener("localStorageChange", () => {
|
||||
// if(mainStore.createConfigInEasytier) {
|
||||
// updateConfigJsonBounce(data.configJsonSeverUrl)
|
||||
// }
|
||||
// })
|
||||
|
||||
dataSubscribe(null, () => {
|
||||
return data.configJsonSeverUrl;
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
@@ -1241,6 +1271,7 @@
|
||||
serverLogsTimer && clearInterval(serverLogsTimer);
|
||||
cidrTimer && clearInterval(cidrTimer);
|
||||
stopPreventSleep();
|
||||
// unListenStorage && unListenStorage();
|
||||
});
|
||||
|
||||
const getArgs = async () => {
|
||||
@@ -1273,42 +1304,42 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (config.dhcp) {
|
||||
if (mainStore.config.dhcp) {
|
||||
args.push("-d");
|
||||
}
|
||||
if (config.hostname) {
|
||||
args.push("--hostname", config.hostname);
|
||||
if (mainStore.config.hostname) {
|
||||
args.push("--hostname", mainStore.config.hostname);
|
||||
}
|
||||
if (config.networkName) {
|
||||
args.push("--network-name", config.networkName);
|
||||
if (mainStore.config.networkName) {
|
||||
args.push("--network-name", mainStore.config.networkName);
|
||||
}
|
||||
if (config.networkPassword) {
|
||||
args.push("--network-secret", config.networkPassword);
|
||||
if (mainStore.config.networkPassword) {
|
||||
args.push("--network-secret", mainStore.config.networkPassword);
|
||||
}
|
||||
if (config.ipv4) {
|
||||
args.push("--ipv4", config.ipv4.trim());
|
||||
if (mainStore.config.ipv4) {
|
||||
args.push("--ipv4", mainStore.config.ipv4.trim());
|
||||
}
|
||||
if (config.serverUrl) {
|
||||
const formatUrl = config.serverUrl.replace(/\\/g, "/");
|
||||
args.push("--peers", ...config.protocol.map(protocol => `${protocol}://${formatUrl}`));
|
||||
if (mainStore.config.serverUrl) {
|
||||
const formatUrl = mainStore.config.serverUrl.replace(/\\/g, "/");
|
||||
args.push("--peers", ...mainStore.config.protocol.map(protocol => `${protocol}://${formatUrl}`));
|
||||
}
|
||||
if (config.enableCustomProtocol) {
|
||||
const includes = config.protocol.includes(config.customProtocol);
|
||||
if (mainStore.config.enableCustomProtocol) {
|
||||
const includes = mainStore.config.protocol.includes(mainStore.config.customProtocol);
|
||||
if (includes) {
|
||||
args.push("--default-protocol", config.customProtocol);
|
||||
args.push("--default-protocol", mainStore.config.customProtocol);
|
||||
}
|
||||
}
|
||||
if (config.disbleP2p) {
|
||||
if (mainStore.config.disbleP2p) {
|
||||
args.push("--disable-p2p");
|
||||
}
|
||||
if (config.disableIpv6) {
|
||||
if (mainStore.config.disableIpv6) {
|
||||
args.push("--disable-ipv6");
|
||||
}
|
||||
if (config.disbleListenner) {
|
||||
if (mainStore.config.disbleListenner) {
|
||||
args.push("--no-listener");
|
||||
}
|
||||
if (!config.disbleListenner && config.enableCustomListener && config.customListenerData) {
|
||||
const customListener = config.customListenerData
|
||||
if (!mainStore.config.disbleListenner && mainStore.config.enableCustomListener && mainStore.config.customListenerData) {
|
||||
const customListener = mainStore.config.customListenerData
|
||||
.trim()
|
||||
.split("\n")
|
||||
.map(el => el.trim())
|
||||
@@ -1317,14 +1348,14 @@
|
||||
args.push("-l", ...customListener);
|
||||
}
|
||||
}
|
||||
if (!config.disbleListenner && config.enableCustomListenerV6 && config.customListenerV6Data) {
|
||||
args.push("--ipv6-listener", config.customListenerV6Data);
|
||||
if (!mainStore.config.disbleListenner && mainStore.config.enableCustomListenerV6 && mainStore.config.customListenerV6Data) {
|
||||
args.push("--ipv6-listener", mainStore.config.customListenerV6Data);
|
||||
}
|
||||
if (!config.disbleListenner && !config.enableCustomListener && config.port) {
|
||||
args.push("-l", config.port);
|
||||
if (!mainStore.config.disbleListenner && !mainStore.config.enableCustomListener && mainStore.config.port) {
|
||||
args.push("-l", mainStore.config.port);
|
||||
}
|
||||
if (mainStore.cidrEnable && config.proxyNetworks) {
|
||||
let formatProxyNetworks = config.proxyNetworks.trim().split("\n");
|
||||
if (mainStore.cidrEnable && mainStore.config.proxyNetworks) {
|
||||
let formatProxyNetworks = mainStore.config.proxyNetworks.trim().split("\n");
|
||||
const newformatProxyNetworks = formatProxyNetworks
|
||||
.map(el => el.trim())
|
||||
.filter(cidr => {
|
||||
@@ -1333,55 +1364,76 @@
|
||||
if (newformatProxyNetworks.length > 0) {
|
||||
args.push("--proxy-networks", ...newformatProxyNetworks);
|
||||
}
|
||||
config.proxyNetworks = formatProxyNetworks.join("\n");
|
||||
mainStore.config.proxyNetworks = formatProxyNetworks.join("\n");
|
||||
}
|
||||
if (config.disableEncryption) {
|
||||
if (mainStore.config.disableEncryption) {
|
||||
args.push("--disable-encryption");
|
||||
}
|
||||
if (config.multiThread) {
|
||||
if (mainStore.config.multiThread) {
|
||||
args.push("--multi-thread");
|
||||
}
|
||||
if (config.enablExitNode) {
|
||||
if (mainStore.config.enablExitNode) {
|
||||
args.push("--enable-exit-node");
|
||||
}
|
||||
if (config.noTun) {
|
||||
if (mainStore.config.noTun) {
|
||||
args.push("--no-tun");
|
||||
}
|
||||
if (config.latencyfirst) {
|
||||
if (mainStore.config.latencyfirst) {
|
||||
args.push("--latency-first");
|
||||
}
|
||||
if (config.useSmoltcp) {
|
||||
if (mainStore.config.useSmoltcp) {
|
||||
args.push("--use-smoltcp");
|
||||
}
|
||||
if (config.disableUdpHolePunching) {
|
||||
if (mainStore.config.disableUdpHolePunching) {
|
||||
args.push("--disable-udp-hole-punching");
|
||||
}
|
||||
if (config.relayAllPeerrpc) {
|
||||
if (mainStore.config.relayAllPeerrpc) {
|
||||
args.push("--relay-all-peer-rpc");
|
||||
}
|
||||
if (config.saveErrorLog) {
|
||||
args.push("--file-log-level", config.logLevel, "--file-log-dir", import.meta.env.VITE_LOG_PATH);
|
||||
if (mainStore.config.saveErrorLog) {
|
||||
args.push("--file-log-level", mainStore.config.logLevel, "--file-log-dir", import.meta.env.VITE_LOG_PATH);
|
||||
}
|
||||
if (config.devName && config.devNameValue) {
|
||||
args.push("--dev-name", config.devNameValue);
|
||||
if (mainStore.config.devName && mainStore.config.devNameValue) {
|
||||
args.push("--dev-name", mainStore.config.devNameValue);
|
||||
}
|
||||
if (config.compression && config.compression != "none") {
|
||||
args.push("--compression", config.compression);
|
||||
if (mainStore.config.compression && mainStore.config.compression != "none") {
|
||||
args.push("--compression", mainStore.config.compression);
|
||||
}
|
||||
if (config.enableKcpProxy) {
|
||||
if (mainStore.config.enableKcpProxy) {
|
||||
args.push("--enable-kcp-proxy");
|
||||
}
|
||||
if (config.disableKcpInput) {
|
||||
if (mainStore.config.disableKcpInput) {
|
||||
args.push("--disable-kcp-input");
|
||||
}
|
||||
if (mainStore.config.bindDeviceEnable) {
|
||||
args.push("--bind-device", "true");
|
||||
}
|
||||
if (mainStore.proxyForwardBySystem) {
|
||||
args.push("--proxy-forward-by-system");
|
||||
}
|
||||
if (mainStore.config.acceptDNS) {
|
||||
args.push("--accept-dns", "true");
|
||||
}
|
||||
if (mainStore.config.enablePortForward) {
|
||||
let formatPortForward = mainStore.config.portForwardData.trim().split("\n");
|
||||
const newformatPortForward = formatPortForward.map(el => el.trim()).filter(el => el);
|
||||
if (newformatPortForward.length > 0) {
|
||||
newformatPortForward.map(el => {
|
||||
args.push("--port-forward", el);
|
||||
});
|
||||
}
|
||||
}
|
||||
if(mainStore.config.privateMode) {
|
||||
args.push("--private-mode", "true");
|
||||
}
|
||||
return args;
|
||||
};
|
||||
|
||||
const reset = async () => {
|
||||
data.isStart = false;
|
||||
data.isSuccessGetIp = false;
|
||||
if (config.dhcp) {
|
||||
config.ipv4 = "";
|
||||
if (mainStore.config.dhcp) {
|
||||
mainStore.config.ipv4 = "";
|
||||
}
|
||||
const memberDialog = await getAllWebviewWindows();
|
||||
const memberDialogs = memberDialog.filter(item => item.label === "member");
|
||||
@@ -1482,7 +1534,8 @@
|
||||
compression,
|
||||
enablePreventSleep,
|
||||
enableKcpProxy,
|
||||
disableKcpInput
|
||||
disableKcpInput,
|
||||
privateMode
|
||||
} = mainStore.config;
|
||||
const WT = btoa(
|
||||
encodeURIComponent(
|
||||
@@ -1515,7 +1568,8 @@
|
||||
compression,
|
||||
enablePreventSleep,
|
||||
enableKcpProxy,
|
||||
disableKcpInput
|
||||
disableKcpInput,
|
||||
privateMode
|
||||
}
|
||||
})
|
||||
)
|
||||
@@ -1686,7 +1740,7 @@
|
||||
});
|
||||
if (!err) {
|
||||
const payload = JSON.parse(decodeURIComponent(atob(importConfigData.data)));
|
||||
payload.config.serverUrl = payload?.config?.serverUrl?.trim() || config.serverUrl;
|
||||
payload.config.serverUrl = payload?.config?.serverUrl?.trim() || mainStore.config.serverUrl;
|
||||
mainStore.$patch({
|
||||
config: {
|
||||
...mainStore.config,
|
||||
@@ -1695,7 +1749,7 @@
|
||||
});
|
||||
ElMessage.success("导入成功");
|
||||
importConfigData.visible = false;
|
||||
mainStore.basePeers = uniq([config.serverUrl, ...mainStore.basePeers].filter(el => el.trim()));
|
||||
mainStore.basePeers = uniq([mainStore.config.serverUrl, ...mainStore.basePeers].filter(el => el.trim()));
|
||||
} else {
|
||||
console.error(err);
|
||||
if (err !== "cancel") {
|
||||
@@ -1795,7 +1849,7 @@
|
||||
cidrTimer && clearInterval(cidrTimer);
|
||||
cidrTimer = setInterval(() => {
|
||||
appWindow.emitTo({ kind: "WebviewWindow", label: "cidr" }, "route", data.isStart);
|
||||
}, 1000);
|
||||
}, 650);
|
||||
},
|
||||
() => {
|
||||
cidrTimer && clearInterval(cidrTimer);
|
||||
@@ -1870,4 +1924,26 @@
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const storageDialog = async () => {
|
||||
await etWindows("storage-listener", {
|
||||
title: "自建服务器",
|
||||
minWidth: 0,
|
||||
minHeight: 0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
x: 9999,
|
||||
y: 9999,
|
||||
resizable: false,
|
||||
transparent: true,
|
||||
hiddenTitle: true,
|
||||
alwaysOnBottom: true,
|
||||
url: "#/storage-listener"
|
||||
},
|
||||
(dialog) => {
|
||||
dialog.hide();
|
||||
},
|
||||
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
+154
-1
@@ -48,13 +48,21 @@
|
||||
width="120"
|
||||
prop="ipv4"
|
||||
label="虚拟网IP"
|
||||
:sort-method="sortIpv4"
|
||||
:sort-orders="['ascending', 'descending', null]"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="lat_ms"
|
||||
width="100"
|
||||
label="延迟/ms"
|
||||
></ElTableColumn>
|
||||
:sort-method="sortLatMs"
|
||||
:sort-orders="['ascending', 'descending', null]"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ formatLatency(row.lat_ms) }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="100"
|
||||
@@ -92,11 +100,15 @@
|
||||
width="90"
|
||||
prop="rx_bytes"
|
||||
label="接收"
|
||||
:sort-method="sortBytes"
|
||||
:sort-orders="['ascending', 'descending', null]"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="tx_bytes"
|
||||
label="传输"
|
||||
:sort-method="(a, b) => sortBytes(a, b, 'tx_bytes')"
|
||||
:sort-orders="['ascending', 'descending', null]"
|
||||
></ElTableColumn>
|
||||
</ElTable>
|
||||
</div>
|
||||
@@ -108,6 +120,7 @@
|
||||
import { ATJ, parseCliInfo } from "@/utils";
|
||||
import { ElConfirmDanger } from "~/utils/element";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { isNaN } from "lodash-es";
|
||||
// enum NatType {
|
||||
// // has NAT; but own a single public IP, port is not changed
|
||||
// Unknown = 0;
|
||||
@@ -139,6 +152,146 @@
|
||||
member: []
|
||||
});
|
||||
|
||||
// 延迟排序函数
|
||||
const sortLatMs = (a: any, b: any): number => {
|
||||
const getLatencyValue = (row: any): number => {
|
||||
const latMs = row.lat_ms;
|
||||
|
||||
if (latMs === null || latMs === undefined || latMs === "") {
|
||||
return Infinity;
|
||||
}
|
||||
|
||||
const num = Number(latMs);
|
||||
if (isNaN(num) || num < 0) {
|
||||
return Infinity;
|
||||
}
|
||||
|
||||
return Math.floor(num);
|
||||
};
|
||||
|
||||
const valueA = getLatencyValue(a);
|
||||
const valueB = getLatencyValue(b);
|
||||
|
||||
if (valueA === Infinity && valueB === Infinity) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return valueA - valueB;
|
||||
};
|
||||
|
||||
// IP地址排序函数
|
||||
const sortIpv4 = (a: any, b: any): number => {
|
||||
const ipToNumber = (ip: string): number => {
|
||||
if (!ip || ip === "-" || ip === "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 处理可能包含端口号或子网掩码的情况
|
||||
const cleanIp = ip.split("/")[0].split(":")[0];
|
||||
const parts = cleanIp.split(".");
|
||||
|
||||
if (parts.length !== 4) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
const nums = parts.map(part => {
|
||||
const num = parseInt(part, 10);
|
||||
return isNaN(num) || num < 0 || num > 255 ? 0 : num;
|
||||
});
|
||||
|
||||
// 将IP地址转换为32位数字进行比较
|
||||
return (nums[0] << 24) + (nums[1] << 16) + (nums[2] << 8) + nums[3];
|
||||
} catch {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
const numA = ipToNumber(a.ipv4);
|
||||
const numB = ipToNumber(b.ipv4);
|
||||
|
||||
return numA - numB;
|
||||
};
|
||||
|
||||
// 字节数据排序函数
|
||||
const sortBytes = (a: any, b: any, field: string = 'rx_bytes'): number => {
|
||||
const parseBytes = (bytesStr: string): number => {
|
||||
if (!bytesStr || bytesStr === "-" || bytesStr === "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 统一转换为小写并去除空格
|
||||
const cleanStr = bytesStr.toLowerCase().trim();
|
||||
|
||||
// 使用正则表达式匹配数字和单位
|
||||
const match = cleanStr.match(/^(\d+(?:\.\d+)?)\s*([a-z]*)$/);
|
||||
if (!match) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const value = parseFloat(match[1]);
|
||||
const unit = match[2];
|
||||
|
||||
if (isNaN(value)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 根据单位转换为字节数
|
||||
switch (unit) {
|
||||
case 'b':
|
||||
case 'byte':
|
||||
case 'bytes':
|
||||
case '':
|
||||
return value;
|
||||
case 'k':
|
||||
case 'kb':
|
||||
case 'kib':
|
||||
return value * 1024;
|
||||
case 'm':
|
||||
case 'mb':
|
||||
case 'mib':
|
||||
return value * 1024 * 1024;
|
||||
case 'g':
|
||||
case 'gb':
|
||||
case 'gib':
|
||||
return value * 1024 * 1024 * 1024;
|
||||
case 't':
|
||||
case 'tb':
|
||||
case 'tib':
|
||||
return value * 1024 * 1024 * 1024 * 1024;
|
||||
case 'p':
|
||||
case 'pb':
|
||||
case 'pib':
|
||||
return value * 1024 * 1024 * 1024 * 1024 * 1024;
|
||||
default:
|
||||
return value; // 未知单位当作字节处理
|
||||
}
|
||||
};
|
||||
|
||||
const bytesA = parseBytes(a[field]);
|
||||
const bytesB = parseBytes(b[field]);
|
||||
|
||||
return bytesA - bytesB;
|
||||
};
|
||||
|
||||
// 格式化延迟显示
|
||||
const formatLatency = (latMs: any): string => {
|
||||
if (latMs === null || latMs === undefined || latMs === "") {
|
||||
return "-";
|
||||
}
|
||||
|
||||
const num = Number(latMs);
|
||||
if (isNaN(num)) {
|
||||
return "-";
|
||||
}
|
||||
|
||||
if (num < 0) {
|
||||
return "-";
|
||||
}
|
||||
|
||||
return num.toFixed(0);
|
||||
};
|
||||
|
||||
const _showTableHeader = [
|
||||
["hostname", "主机名"],
|
||||
["cost", "路由"],
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
>
|
||||
<ElCheckbox v-model="mainStore.serverConfig.autoStart">自动启动</ElCheckbox>
|
||||
</ElTooltip>
|
||||
<ElTooltip
|
||||
placement="top"
|
||||
content="启用后,不允许使用了与本网络不同的房间名和密码的节点通过本节点进行握手或中转"
|
||||
>
|
||||
<ElCheckbox v-model="mainStore.serverConfig.privateMode">私有模式</ElCheckbox>
|
||||
</ElTooltip>
|
||||
<ElTooltip
|
||||
placement="top"
|
||||
content="帮助其他虚拟网建立P2P链接"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<template></template>
|
||||
<script setup lang="ts">
|
||||
import { dataSubscribe } from "~/composables/windows";
|
||||
|
||||
dataSubscribe();
|
||||
</script>
|
||||
+28
-15
@@ -25,7 +25,7 @@
|
||||
<ElLink
|
||||
class="mr-[10px] !text-[15px]"
|
||||
type="info"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
@click="open('https://github.com/dechamps/WinIPBroadcast/releases/tag/winipbroadcast-1.6')"
|
||||
>
|
||||
WinIPBroadcast
|
||||
@@ -55,7 +55,7 @@
|
||||
<ElLink
|
||||
class="!text-[15px]"
|
||||
type="info"
|
||||
:underline="false"
|
||||
underline="never"
|
||||
@click="open('https://r1ch.net/projects/forcebindip')"
|
||||
>
|
||||
ForceBindIP
|
||||
@@ -198,16 +198,10 @@
|
||||
<ElButton
|
||||
type="warning"
|
||||
size="small"
|
||||
@click.stop="handleCloseAllFireWall"
|
||||
>
|
||||
一键关闭防火墙
|
||||
</ElButton>
|
||||
<ElButton
|
||||
@click="handleCustomFireWall"
|
||||
type="danger"
|
||||
size="small"
|
||||
>
|
||||
自定义防火墙策略
|
||||
</ElButton>
|
||||
</div>
|
||||
<div class="mb-[10px]">
|
||||
<ElText class="!mx-[10px]">域防火墙</ElText>
|
||||
@@ -251,10 +245,17 @@
|
||||
<ElButton
|
||||
size="small"
|
||||
:disabled="data.isPing"
|
||||
@click="handleTestPing"
|
||||
@click="handleTestPing('v4')"
|
||||
>
|
||||
Ping一下
|
||||
</ElButton>
|
||||
<!-- <ElButton
|
||||
size="small"
|
||||
:disabled="data.isPing"
|
||||
@click="handleTestPing('v6')"
|
||||
>
|
||||
Ping一下(v6)
|
||||
</ElButton> -->
|
||||
</div>
|
||||
<div class="mt-[5px] flex-1 overflow-auto">
|
||||
<ElInput
|
||||
@@ -305,8 +306,18 @@
|
||||
forceBindStart: false
|
||||
});
|
||||
|
||||
const handleCustomFireWall = async () => {
|
||||
await open("wf.msc");
|
||||
|
||||
const handleCloseAllFireWall = async () => {
|
||||
try {
|
||||
const output = await Command.create("netsh", ["advfirewall", "set", "allprofiles", "state", "off"], {
|
||||
encoding: "gb2312"
|
||||
}).execute();
|
||||
ElMessage.success("关闭成功");
|
||||
await initFirewall();
|
||||
} catch (err) {
|
||||
ElMessage.error(`关闭失败${err}`);
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
const handleTabsChange = async (tabPaneName: TabPaneName) => {
|
||||
@@ -341,14 +352,15 @@
|
||||
});
|
||||
};
|
||||
|
||||
const handleTestPing = async () => {
|
||||
const handleTestPing = async (type: 'v4' | 'v6' = 'v4') => {
|
||||
// const is = isValidIP(data.pingIp);
|
||||
if (data.pingIp) {
|
||||
data.pingLog = "";
|
||||
data.isPing = true;
|
||||
const args = type === 'v4' ? ["-n", "1", data.pingIp] : ["-6", '-n', "1", data.pingIp]
|
||||
try {
|
||||
for (let i = 0; i < data.pingNum; i++) {
|
||||
const output = await Command.create("ping", ["-n", "1", data.pingIp], {
|
||||
const output = await Command.create("ping", args, {
|
||||
encoding: "gb2312"
|
||||
}).execute();
|
||||
if (output.stdout) {
|
||||
@@ -492,6 +504,7 @@
|
||||
data.pingIp = mainStore.config.ipv4;
|
||||
initStartWinIpBroadcast();
|
||||
getGuids();
|
||||
dataSubscribe();
|
||||
});
|
||||
|
||||
dataSubscribe();
|
||||
</script>
|
||||
|
||||
Generated
+4247
-1865
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
/gen/schemas
|
||||
/easytier/logs
|
||||
/easytier/logs/*.*
|
||||
target/
|
||||
gen/schemas
|
||||
./easytier/logs
|
||||
easytier/logs
|
||||
Generated
+215
-197
@@ -77,15 +77,15 @@ checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
||||
|
||||
[[package]]
|
||||
name = "android_log-sys"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937"
|
||||
checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d"
|
||||
|
||||
[[package]]
|
||||
name = "android_logger"
|
||||
version = "0.14.1"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05b07e8e73d720a1f2e4b6014766e6039fd2e96a4fa44e2a78d0e1fa2ff49826"
|
||||
checksum = "f6f39be698127218cca460cb624878c9aa4e2b47dba3b277963d2bf00bad263b"
|
||||
dependencies = [
|
||||
"android_log-sys",
|
||||
"env_filter",
|
||||
@@ -180,6 +180,7 @@ dependencies = [
|
||||
"objc2-foundation 0.2.2",
|
||||
"parking_lot",
|
||||
"windows-sys 0.48.0",
|
||||
"wl-clipboard-rs",
|
||||
"x11rb",
|
||||
]
|
||||
|
||||
@@ -206,7 +207,7 @@ dependencies = [
|
||||
"url",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols",
|
||||
"wayland-protocols 0.32.5",
|
||||
"zbus 4.0.1",
|
||||
]
|
||||
|
||||
@@ -672,9 +673,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cargo_toml"
|
||||
version = "0.21.0"
|
||||
version = "0.22.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fbd1fe9db3ebf71b89060adaf7b0504c2d6a425cf061313099547e382c2e472"
|
||||
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"toml",
|
||||
@@ -1092,6 +1093,17 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive-new"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_arbitrary"
|
||||
version = "1.4.1"
|
||||
@@ -1241,11 +1253,10 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
||||
|
||||
[[package]]
|
||||
name = "easytier-game"
|
||||
version = "1.4.2"
|
||||
version = "1.4.6"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.2",
|
||||
"log",
|
||||
"planif",
|
||||
"rand 0.9.0",
|
||||
"reqwest",
|
||||
"serde",
|
||||
@@ -1261,6 +1272,7 @@ dependencies = [
|
||||
"tauri-plugin-shell",
|
||||
"tauri-plugin-single-instance",
|
||||
"tauri-plugin-window-state",
|
||||
"thunk-rs",
|
||||
"tokio",
|
||||
"whoami",
|
||||
"windows 0.58.0",
|
||||
@@ -1426,6 +1438,12 @@ dependencies = [
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.35"
|
||||
@@ -1746,10 +1764,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2085,7 +2101,6 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tower-service",
|
||||
"webpki-roots",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2673,6 +2688,12 @@ version = "0.3.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.8.2"
|
||||
@@ -2780,6 +2801,18 @@ dependencies = [
|
||||
"memoffset",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"cfg-if",
|
||||
"cfg_aliases 0.1.1",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.29.0"
|
||||
@@ -2799,6 +2832,16 @@ version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ntapi"
|
||||
version = "0.4.1"
|
||||
@@ -3279,6 +3322,16 @@ version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||
|
||||
[[package]]
|
||||
name = "petgraph"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
|
||||
dependencies = [
|
||||
"fixedbitset",
|
||||
"indexmap 2.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.8.0"
|
||||
@@ -3442,14 +3495,6 @@ version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
||||
|
||||
[[package]]
|
||||
name = "planif"
|
||||
version = "1.0.0"
|
||||
source = "git+https://github.com/mattrobineau/planif?tag=1.0.1#90e228e2bc0f142b16a0ba415ec242e1c836cc35"
|
||||
dependencies = [
|
||||
"windows 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "plist"
|
||||
version = "1.7.0"
|
||||
@@ -3617,58 +3662,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn"
|
||||
version = "0.11.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"pin-project-lite",
|
||||
"quinn-proto",
|
||||
"quinn-udp",
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
"socket2",
|
||||
"thiserror 2.0.10",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.2.15",
|
||||
"rand 0.8.5",
|
||||
"ring",
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
"rustls-pki-types",
|
||||
"slab",
|
||||
"thiserror 2.0.10",
|
||||
"tinyvec",
|
||||
"tracing",
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn-udp"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
|
||||
dependencies = [
|
||||
"cfg_aliases 0.2.1",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.38"
|
||||
@@ -3907,10 +3900,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"quinn",
|
||||
"rustls",
|
||||
"rustls-pemfile",
|
||||
"rustls-pki-types",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
@@ -3918,7 +3908,6 @@ dependencies = [
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-rustls",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-service",
|
||||
@@ -3927,7 +3916,6 @@ dependencies = [
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-streams",
|
||||
"web-sys",
|
||||
"webpki-roots",
|
||||
"windows-registry",
|
||||
]
|
||||
|
||||
@@ -4020,12 +4008,6 @@ version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
@@ -4055,7 +4037,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
"rustls-webpki",
|
||||
"subtle",
|
||||
@@ -4076,9 +4057,6 @@ name = "rustls-pki-types"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
|
||||
dependencies = [
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
@@ -4675,9 +4653,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.32.3"
|
||||
version = "0.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d8f5e5fe19612f3dd187ac3928d48f5ad23d3edd9821806d05b0c3beb6537bd"
|
||||
checksum = "1e59c1f38e657351a2e822eadf40d6a2ad4627b9c25557bc1180ec1b3295ef82"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"core-foundation 0.10.0",
|
||||
@@ -4706,8 +4684,8 @@ dependencies = [
|
||||
"tao-macros",
|
||||
"unicode-segmentation",
|
||||
"url",
|
||||
"windows 0.60.0",
|
||||
"windows-core 0.60.1",
|
||||
"windows 0.61.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-version",
|
||||
"x11-dl",
|
||||
]
|
||||
@@ -4737,9 +4715,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.3.0"
|
||||
version = "2.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f32eadd4a507f1b61e4fd1f792d0ed4184127a3241ff5bcb1848b9a574a58d6"
|
||||
checksum = "e7b0bc1aec81bda6bc455ea98fcaed26b3c98c1648c627ad6ff1c704e8bf8cbc"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -4762,6 +4740,7 @@ dependencies = [
|
||||
"objc2 0.6.0",
|
||||
"objc2-app-kit 0.3.0",
|
||||
"objc2-foundation 0.3.0",
|
||||
"objc2-ui-kit",
|
||||
"percent-encoding",
|
||||
"plist",
|
||||
"raw-window-handle",
|
||||
@@ -4784,14 +4763,14 @@ dependencies = [
|
||||
"webkit2gtk",
|
||||
"webview2-com",
|
||||
"window-vibrancy",
|
||||
"windows 0.60.0",
|
||||
"windows 0.61.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.0.6"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51a2e96f3c0baa0581656bb58e6fdd0f7c9c31eaf6721a0c08689d938fe85f2d"
|
||||
checksum = "d7a0350f0df1db385ca5c02888a83e0e66655c245b7443db8b78a70da7d7f8fc"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -4811,9 +4790,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.0.5"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e357ec3daf8faad1029bc7109e7f5b308ceb63b6073d110d7388923a4cce5e55"
|
||||
checksum = "f93f035551bf7b11b3f51ad9bc231ebbe5e085565527991c16cf326aa38cdf47"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"brotli",
|
||||
@@ -4838,9 +4817,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.0.5"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "447ee4dd94690d77f1422f2b57e783c654ba75c535ad6f6e727887330804fff2"
|
||||
checksum = "8db4df25e2d9d45de0c4c910da61cd5500190da14ae4830749fee3466dddd112"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -4884,9 +4863,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-clipboard-manager"
|
||||
version = "2.2.1"
|
||||
version = "2.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "54de1e3a2ea008687954d5d72952800e87b09f6fbea6d0960d99e58050537642"
|
||||
checksum = "3ab4cb42fdf745229b768802e9180920a4be63122cf87ed1c879103f7609d98e"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"log",
|
||||
@@ -4899,9 +4878,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-dialog"
|
||||
version = "2.2.0"
|
||||
version = "2.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b59fd750551b1066744ab956a1cd6b1ea3e1b3763b0b9153ac27a044d596426"
|
||||
checksum = "a33318fe222fc2a612961de8b0419e2982767f213f54a4d3a21b0d7b85c41df8"
|
||||
dependencies = [
|
||||
"log",
|
||||
"raw-window-handle",
|
||||
@@ -4917,9 +4896,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223"
|
||||
checksum = "33ead0daec5d305adcefe05af9d970fc437bcc7996052d564e7393eb291252da"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
@@ -4935,21 +4914,20 @@ dependencies = [
|
||||
"thiserror 2.0.10",
|
||||
"toml",
|
||||
"url",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-log"
|
||||
version = "2.2.2"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e106ce75445f592879022757789ccd41c6d2829cd3043f2bf24379b52dc8710"
|
||||
checksum = "2341d5b9bc5318c8e34f35a569140c78337241aa9c14091550b424c49f0314e0"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"byte-unit",
|
||||
"fern",
|
||||
"log",
|
||||
"objc2 0.5.2",
|
||||
"objc2-foundation 0.2.2",
|
||||
"objc2 0.6.0",
|
||||
"objc2-foundation 0.3.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_repr",
|
||||
@@ -4962,9 +4940,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79"
|
||||
checksum = "69d5eb3368b959937ad2aeaf6ef9a8f5d11e01ffe03629d3530707bbcb27ff5d"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
@@ -4983,9 +4961,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.2.2"
|
||||
version = "2.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25bbc73eed15bba8ad290a52614f2711280df4bf575b36ce78f64367074b90b7"
|
||||
checksum = "97d0e07b40fb2eb13778e30778f5979347a2bf30e1b9d47f78ff7fe92d2e4b3d"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -4998,9 +4976,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.2.1"
|
||||
version = "2.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35e344b512b0d99d9d06225f235d87d6c66d89496a3bf323d9b578d940596e6c"
|
||||
checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"log",
|
||||
@@ -5013,28 +4991,31 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.4.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e758a405ab39e25f4d1235c5f06fe563f44b01ee18bbe38ddec5356d4f581908"
|
||||
checksum = "00f004905d549854069e6774533d742b03cacfd6f03deb08940a8677586cbe39"
|
||||
dependencies = [
|
||||
"cookie",
|
||||
"dpi",
|
||||
"gtk",
|
||||
"http",
|
||||
"jni",
|
||||
"objc2 0.6.0",
|
||||
"objc2-ui-kit",
|
||||
"raw-window-handle",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri-utils",
|
||||
"thiserror 2.0.10",
|
||||
"url",
|
||||
"windows 0.60.0",
|
||||
"windows 0.61.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.4.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ef46e0c9c30d3524990cb10556f82cde0aa2281e9600e7ed2f499842db8b080"
|
||||
checksum = "f85d056f4d4b014fe874814034f3416d57114b617a493a4fe552580851a3f3a2"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@@ -5043,6 +5024,7 @@ dependencies = [
|
||||
"objc2 0.6.0",
|
||||
"objc2-app-kit 0.3.0",
|
||||
"objc2-foundation 0.3.0",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"raw-window-handle",
|
||||
"softbuffer",
|
||||
@@ -5052,16 +5034,17 @@ dependencies = [
|
||||
"url",
|
||||
"webkit2gtk",
|
||||
"webview2-com",
|
||||
"windows 0.60.0",
|
||||
"windows 0.61.1",
|
||||
"wry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.2.0"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "107a959dbd5ff53d89a98f6f2e3e987c611334141a43630caae1d80e79446dd6"
|
||||
checksum = "b2900399c239a471bcff7f15c4399eb1a8c4fe511ba2853e07c996d771a5e0a4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"brotli",
|
||||
"cargo_metadata",
|
||||
"ctor",
|
||||
@@ -5174,6 +5157,11 @@ dependencies = [
|
||||
"syn 2.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thunk-rs"
|
||||
version = "0.3.3"
|
||||
source = "git+https://github.com/easytier/thunk.git#5e8371a3100dbc18dda952a2036c6bd6fb0504db"
|
||||
|
||||
[[package]]
|
||||
name = "tiff"
|
||||
version = "0.9.1"
|
||||
@@ -5245,9 +5233,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.43.0"
|
||||
version = "1.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
|
||||
checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"bytes",
|
||||
@@ -5429,6 +5417,19 @@ dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree_magic_mini"
|
||||
version = "3.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aac5e8971f245c3389a5a76e648bfc80803ae066a1243a75db0064d7c1129d63"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"memchr",
|
||||
"nom",
|
||||
"once_cell",
|
||||
"petgraph",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "try-lock"
|
||||
version = "0.2.5"
|
||||
@@ -5777,6 +5778,18 @@ dependencies = [
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols"
|
||||
version = "0.31.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols"
|
||||
version = "0.32.5"
|
||||
@@ -5789,6 +5802,19 @@ dependencies = [
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-wlr"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6"
|
||||
dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols 0.31.2",
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-scanner"
|
||||
version = "0.31.5"
|
||||
@@ -5821,16 +5847,6 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-time"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webkit2gtk"
|
||||
version = "2.0.1"
|
||||
@@ -5875,27 +5891,18 @@ dependencies = [
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.26.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
|
||||
dependencies = [
|
||||
"rustls-pki-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webview2-com"
|
||||
version = "0.36.0"
|
||||
version = "0.37.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3"
|
||||
checksum = "b542b5cfbd9618c46c2784e4d41ba218c336ac70d44c55e47b251033e7d85601"
|
||||
dependencies = [
|
||||
"webview2-com-macros",
|
||||
"webview2-com-sys",
|
||||
"windows 0.60.0",
|
||||
"windows-core 0.60.1",
|
||||
"windows-implement 0.59.0",
|
||||
"windows-interface 0.59.0",
|
||||
"windows 0.61.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-implement 0.60.0",
|
||||
"windows-interface 0.59.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5911,13 +5918,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webview2-com-sys"
|
||||
version = "0.36.0"
|
||||
version = "0.37.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac"
|
||||
checksum = "8ae2d11c4a686e4409659d7891791254cf9286d3cfe0eef54df1523533d22295"
|
||||
dependencies = [
|
||||
"thiserror 2.0.10",
|
||||
"windows 0.60.0",
|
||||
"windows-core 0.60.1",
|
||||
"windows 0.61.1",
|
||||
"windows-core 0.61.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5983,15 +5990,6 @@ dependencies = [
|
||||
"windows-version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.57.0"
|
||||
@@ -6014,12 +6012,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.60.0"
|
||||
version = "0.61.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529"
|
||||
checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
|
||||
dependencies = [
|
||||
"windows-collections",
|
||||
"windows-core 0.60.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-future",
|
||||
"windows-link",
|
||||
"windows-numerics",
|
||||
@@ -6027,11 +6025,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-collections"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec"
|
||||
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
|
||||
dependencies = [
|
||||
"windows-core 0.60.1",
|
||||
"windows-core 0.61.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6070,24 +6068,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.60.1"
|
||||
version = "0.61.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247"
|
||||
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
||||
dependencies = [
|
||||
"windows-implement 0.59.0",
|
||||
"windows-interface 0.59.0",
|
||||
"windows-implement 0.60.0",
|
||||
"windows-interface 0.59.1",
|
||||
"windows-link",
|
||||
"windows-result 0.3.1",
|
||||
"windows-strings 0.3.1",
|
||||
"windows-result 0.3.2",
|
||||
"windows-strings 0.4.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-future"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0"
|
||||
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
|
||||
dependencies = [
|
||||
"windows-core 0.60.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
@@ -6115,9 +6113,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-implement"
|
||||
version = "0.59.0"
|
||||
version = "0.60.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
|
||||
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -6148,9 +6146,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-interface"
|
||||
version = "0.59.0"
|
||||
version = "0.59.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01"
|
||||
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -6159,17 +6157,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
|
||||
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
|
||||
|
||||
[[package]]
|
||||
name = "windows-numerics"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed"
|
||||
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
|
||||
dependencies = [
|
||||
"windows-core 0.60.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
@@ -6204,9 +6202,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-result"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189"
|
||||
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
@@ -6223,9 +6221,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-strings"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
|
||||
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
@@ -6554,6 +6552,26 @@ dependencies = [
|
||||
"bitflags 2.7.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wl-clipboard-rs"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12b41773911497b18ca8553c3daaf8ec9fe9819caf93d451d3055f69de028adb"
|
||||
dependencies = [
|
||||
"derive-new",
|
||||
"libc",
|
||||
"log",
|
||||
"nix 0.28.0",
|
||||
"os_pipe",
|
||||
"tempfile",
|
||||
"thiserror 1.0.69",
|
||||
"tree_magic_mini",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols 0.31.2",
|
||||
"wayland-protocols-wlr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "write16"
|
||||
version = "1.0.0"
|
||||
@@ -6568,9 +6586,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.50.1"
|
||||
version = "0.51.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a5eabce267929af61619166232d5221aeec2d7af8712bc33cf54a78416ad711"
|
||||
checksum = "c886a0a9d2a94fd90cfa1d929629b79cfefb1546e2c7430c63a47f0664c0e4e2"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"block2 0.6.0",
|
||||
@@ -6604,8 +6622,8 @@ dependencies = [
|
||||
"webkit2gtk",
|
||||
"webkit2gtk-sys",
|
||||
"webview2-com",
|
||||
"windows 0.60.0",
|
||||
"windows-core 0.60.1",
|
||||
"windows 0.61.1",
|
||||
"windows-core 0.61.0",
|
||||
"windows-version",
|
||||
"x11-dl",
|
||||
]
|
||||
|
||||
+15
-12
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.4.2"
|
||||
version = "1.4.6"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
@@ -18,31 +18,34 @@ name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.6", features = [] }
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
# prost-build = "0.13.2"
|
||||
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
thunk-rs = { git = "https://github.com/easytier/thunk.git", default-features = false, features = ["win7"] } # 需要安装curl和7zip,并添加他们的路径到环境变量
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.137"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
log = "0.4.26"
|
||||
tauri = { version = "2.3.0", features = [ "protocol-asset",
|
||||
tauri = { version = "2.5.1", features = [ "protocol-asset",
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
"image-ico"
|
||||
] }
|
||||
|
||||
tauri-plugin-log = "2.2.2"
|
||||
tauri-plugin-shell = "2.2.0"
|
||||
tauri-plugin-log = "2.3.1"
|
||||
tauri-plugin-shell = "2.2.1"
|
||||
reqwest = { version = "0.12.12", features = ["json"] }
|
||||
zip = "2.2.3"
|
||||
sysinfo = '0.33.1'
|
||||
planif = { git = "https://github.com/mattrobineau/planif", tag = "1.0.1" }
|
||||
# planif = { git = "https://github.com/mattrobineau/planif", tag = "1.0.1" }
|
||||
whoami = "1.5.2"
|
||||
tauri-plugin-fs = "2.2.0"
|
||||
tauri-plugin-clipboard-manager = "2.2.1"
|
||||
tauri-plugin-fs = "2.3.0"
|
||||
tauri-plugin-clipboard-manager = "2.2.2"
|
||||
rand = "0.9.0"
|
||||
tokio = { version = "1.43.0", features = ["process"] }
|
||||
tauri-plugin-dialog = "2.2.0"
|
||||
tokio = { version = "1.45.1", features = ["process"] }
|
||||
tauri-plugin-dialog = "2.2.2"
|
||||
# prost = "0.13"
|
||||
# prost-types = "0.13"
|
||||
hashbrown = "0.15.2"
|
||||
@@ -54,5 +57,5 @@ features = ["Win32_System_TaskScheduler", "Win32_System_Com", "Win32_System_Powe
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-cli = "2.2.0"
|
||||
tauri-plugin-single-instance = "2.2.2"
|
||||
tauri-plugin-window-state = "2.2.1"
|
||||
tauri-plugin-single-instance = "2.2.4"
|
||||
tauri-plugin-window-state = "2.2.2"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
fn main() {
|
||||
thunk::thunk();
|
||||
let mut windows = tauri_build::WindowsAttributes::new();
|
||||
windows = windows.app_manifest(
|
||||
r#"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "enables the default permissions",
|
||||
"windows": ["main", "log", "member", "cidr", "advance", "tool", "server", "gameList"],
|
||||
"windows": ["main", "log", "member", "cidr", "advance", "tool", "server", "gameList", "storage-listener"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"core:window:allow-minimize",
|
||||
|
||||
@@ -36,5 +36,6 @@
|
||||
"enablePreventSleep": false, // 启用防止睡眠
|
||||
"compression": "none", // 压缩算法
|
||||
"enableKcpProxy": true, // 启用kcp代理
|
||||
"disableKcpInput": false // 禁用kcp输入
|
||||
"disableKcpInput": false, // 禁用kcp输入
|
||||
"privateMode": false // 启用私有模式
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
+109
-30
@@ -1,7 +1,3 @@
|
||||
use planif::enums::TaskCreationFlags;
|
||||
use planif::schedule::TaskScheduler as planIfTaskScheduler;
|
||||
use planif::schedule_builder::{Action, ScheduleBuilder};
|
||||
use planif::settings::{Duration, LogonType, PrincipalSettings, RunLevel};
|
||||
use reqwest::{Client, Error};
|
||||
// use futures_util::StreamExt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -17,7 +13,7 @@ use sysinfo::System;
|
||||
use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent};
|
||||
use tauri::Emitter;
|
||||
use tauri::Manager;
|
||||
use windows::core::{BSTR, VARIANT};
|
||||
use windows::core::{Interface, BSTR, VARIANT};
|
||||
use windows::Win32::Foundation::VARIANT_BOOL;
|
||||
use windows::Win32::NetworkManagement::IpHelper::{
|
||||
GetAdaptersAddresses, GAA_FLAG_INCLUDE_PREFIX, IP_ADAPTER_ADDRESSES_LH,
|
||||
@@ -656,6 +652,50 @@ fn autostart_is_enabled() -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
// 新增辅助函数
|
||||
fn ensure_task_folder_and_cleanup(
|
||||
task_service: &ITaskService,
|
||||
folder_path: &BSTR,
|
||||
task_name: &BSTR,
|
||||
) -> Result<ITaskFolder, Box<dyn std::error::Error>> {
|
||||
unsafe {
|
||||
let root = BSTR::from("\\");
|
||||
let root_folder: ITaskFolder = task_service.GetFolder(&root)?;
|
||||
|
||||
match task_service.GetFolder(folder_path) {
|
||||
Ok(existing_folder) => {
|
||||
println!("任务文件夹已存在: {}", folder_path);
|
||||
|
||||
// 检查并清理现有任务
|
||||
if let Ok(_existing_task) = existing_folder.GetTask(task_name) {
|
||||
println!("发现同名任务: {},准备删除", task_name);
|
||||
match existing_folder.DeleteTask(task_name, 0) {
|
||||
Ok(_) => println!("成功删除现有任务"),
|
||||
Err(e) => {
|
||||
log::error!("删除现有任务失败: {}", e);
|
||||
// 继续执行,尝试覆盖
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(existing_folder)
|
||||
}
|
||||
Err(_) => {
|
||||
println!("创建新的任务文件夹: {}", folder_path);
|
||||
match root_folder.CreateFolder(folder_path, &VARIANT::default()) {
|
||||
Ok(new_folder) => {
|
||||
println!("成功创建任务文件夹");
|
||||
Ok(new_folder)
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("创建任务文件夹失败: {}", e);
|
||||
Err(e.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pub const AUTOSTART_ARG: &str = "--autostart";
|
||||
pub const TASKAUTOSTART_ARG: &str = "--task-auto-start";
|
||||
fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -690,33 +730,72 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
CoUninitialize();
|
||||
}
|
||||
} else {
|
||||
let ts = planIfTaskScheduler::new()?;
|
||||
let com = ts.get_com();
|
||||
let sb = ScheduleBuilder::new(&com).unwrap();
|
||||
unsafe {
|
||||
let task_service: ITaskService = CoCreateInstance(&TaskScheduler, None, CLSCTX_ALL)?;
|
||||
task_service.Connect(
|
||||
&VARIANT::default(),
|
||||
&VARIANT::default(),
|
||||
&VARIANT::default(),
|
||||
&VARIANT::default(),
|
||||
)?;
|
||||
|
||||
let folder_path = BSTR::from("\\easytierGame");
|
||||
let task_name = BSTR::from("auto start");
|
||||
|
||||
let task_definition = task_service.NewTask(0)?;
|
||||
|
||||
// 设置任务信息
|
||||
let registration_info = task_definition.RegistrationInfo()?;
|
||||
registration_info.SetDescription(&BSTR::from("EasytierGame auto start task"))?;
|
||||
registration_info.SetAuthor(&BSTR::from("EasytierGame"))?;
|
||||
|
||||
// 改为用户登录触发
|
||||
let triggers = task_definition.Triggers()?;
|
||||
let trigger = triggers.Create(TASK_TRIGGER_LOGON)?;
|
||||
let logon_trigger: ILogonTrigger = trigger.cast()?;
|
||||
logon_trigger.SetEnabled(VARIANT_BOOL::from(true))?;
|
||||
|
||||
// 设置动作
|
||||
let actions = task_definition.Actions()?;
|
||||
let action = actions.Create(TASK_ACTION_EXEC)?;
|
||||
let exec_action: IExecAction = action.cast()?;
|
||||
let exe = std::env::current_exe()?;
|
||||
let exe_path: &str = exe.to_str().unwrap();
|
||||
exec_action.SetPath(&BSTR::from(exe_path))?;
|
||||
exec_action.SetArguments(&BSTR::from("--task-auto-start"))?;
|
||||
|
||||
// 使用当前用户运行
|
||||
let principal = task_definition.Principal()?;
|
||||
principal.SetUserId(&BSTR::from(whoami::username().as_str()))?;
|
||||
principal.SetLogonType(TASK_LOGON_INTERACTIVE_TOKEN)?;
|
||||
principal.SetRunLevel(TASK_RUNLEVEL_HIGHEST)?;
|
||||
|
||||
let exe = std::env::current_exe()?;
|
||||
let exe = exe.to_str().unwrap();
|
||||
|
||||
let settings = PrincipalSettings {
|
||||
display_name: "".to_string(),
|
||||
group_id: None,
|
||||
id: "".to_string(),
|
||||
logon_type: LogonType::InteractiveToken,
|
||||
run_level: RunLevel::Highest,
|
||||
user_id: Some(whoami::username()),
|
||||
};
|
||||
sb.create_logon()
|
||||
.author("heixiansen")?
|
||||
.trigger("trigger", enabled)?
|
||||
.action(Action::new("auto start", exe, "", &TASKAUTOSTART_ARG))?
|
||||
.in_folder("easytierGame")?
|
||||
.principal(settings)?
|
||||
.delay(Duration {
|
||||
seconds: Some(6),
|
||||
..Default::default()
|
||||
})?
|
||||
.build()?
|
||||
.register("auto start", TaskCreationFlags::CreateOrUpdate as i32)?;
|
||||
// 设置任务设置
|
||||
let settings = task_definition.Settings()?;
|
||||
settings.SetEnabled(VARIANT_BOOL::from(true))?;
|
||||
settings.SetCompatibility(TASK_COMPATIBILITY_V2)?; // Windows 7
|
||||
settings.SetStartWhenAvailable(VARIANT_BOOL::from(true))?;
|
||||
// settings.SetHidden(VARIANT_BOOL::from(true))?; // 注释掉让任务可见
|
||||
settings.SetExecutionTimeLimit(&BSTR::from("PT0S"))?;
|
||||
|
||||
|
||||
|
||||
// 获取文件夹并注册任务
|
||||
let task_folder = ensure_task_folder_and_cleanup(&task_service, &folder_path, &task_name)?;
|
||||
|
||||
let _auto_task = task_folder.RegisterTaskDefinition(
|
||||
&task_name,
|
||||
&task_definition,
|
||||
TASK_CREATE_OR_UPDATE.0,
|
||||
&VARIANT::default(),
|
||||
&VARIANT::default(),
|
||||
TASK_LOGON_INTERACTIVE_TOKEN,
|
||||
&VARIANT::default()
|
||||
)?;
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.6",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -12,7 +12,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.4.2",
|
||||
"title": "easytier-game 1.4.6",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
|
||||
+24
-2
@@ -1,4 +1,7 @@
|
||||
import { acceptHMRUpdate, defineStore } from "pinia";
|
||||
|
||||
|
||||
|
||||
const store = defineStore("main", {
|
||||
state() {
|
||||
return {
|
||||
@@ -40,7 +43,13 @@ const store = defineStore("main", {
|
||||
enablePreventSleep: false, //组织系统休眠
|
||||
compression: "none", //加密算法
|
||||
enableKcpProxy: true, //启用kcp代理 默认开启
|
||||
disableKcpInput: false //禁用kcp输入
|
||||
disableKcpInput: false, //禁用kcp输入
|
||||
bindDeviceEnable: false, //是否绑定设备
|
||||
acceptDNS: false, //魔法dns
|
||||
privateMode: false, //是否启用私有模式
|
||||
|
||||
enablePortForward: false, //是否启用端口转发
|
||||
portForwardData: "", //端口转发数据
|
||||
},
|
||||
serverConfig: {
|
||||
enableWhiteList: true, // 是否启用白名单
|
||||
@@ -48,9 +57,11 @@ const store = defineStore("main", {
|
||||
serverWhiteList: "", // 服务器流量转发白名单
|
||||
// enableListener: true, // 是否启用监听
|
||||
autoStart: false, //随软件自启
|
||||
port: "11010" // 服务器端口
|
||||
port: "11010", // 服务器端口
|
||||
privateMode: false, //是否启用私有模式
|
||||
},
|
||||
cidrEnable: false,
|
||||
proxyForwardBySystem: false, // 是否通过系统内核转发子网代理数据包,禁用内置NAT
|
||||
basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"],
|
||||
theme: false, //主题 false light true dark
|
||||
configStartEnable: false, //使用配置文件启动
|
||||
@@ -103,6 +114,9 @@ const store = defineStore("main", {
|
||||
"config.netCardMetricValue",
|
||||
"config.port",
|
||||
|
||||
"config.enablePortForward",
|
||||
"config.portForwardData",
|
||||
|
||||
"config.disbleListenner",
|
||||
"config.enableCustomListener",
|
||||
"config.customListenerData",
|
||||
@@ -117,14 +131,22 @@ const store = defineStore("main", {
|
||||
"config.enableKcpProxy",
|
||||
"config.disableKcpInput",
|
||||
|
||||
"config.bindDeviceEnable",
|
||||
|
||||
"config.acceptDNS",
|
||||
|
||||
"config.privateMode",
|
||||
|
||||
"serverConfig.autoStart",
|
||||
// 'serverConfig.enableListener',
|
||||
"serverConfig.enableWhiteList",
|
||||
"serverConfig.relayAllPeerrpc",
|
||||
"serverConfig.serverWhiteList",
|
||||
"serverConfig.port",
|
||||
"serverConfig.privateMode",
|
||||
|
||||
"cidrEnable",
|
||||
"proxyForwardBySystem",
|
||||
"basePeers",
|
||||
"theme",
|
||||
"configStartEnable",
|
||||
|
||||
Reference in New Issue
Block a user