Compare commits

...
5 Commits
16 changed files with 2218 additions and 1981 deletions
+8 -8
View File
@@ -1,12 +1,12 @@
pnpm run build pnpm run build
rustup default nightly @REM rustup default nightly
rem 使用rust nightly构建支持win7的版本,请先将根目录的windows.0.48.5 放入以下目录 @REM rem 使用rust nightly构建支持win7的版本,请先将根目录的windows.0.48.5 放入以下目录
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\x64
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\你自己的版本\lib\x86
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\x64
rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x86 @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 @REM pnpm tauri build -- -Z build-std --target x86_64-win7-windows-msvc
rustup default stable rustup default stable
pnpm tauri build pnpm tauri build
pnpm run release pnpm run release
pnpm run release-win7 @REM pnpm run release-win7
+1
View File
@@ -19,6 +19,7 @@ export const updateConfigJson = async (configJsonSeverUrl: Array<string> | strin
serverUrl, serverUrl,
enableCustomListener, enableCustomListener,
customListenerData, customListenerData,
bindDeviceEnable,
...otherConfig ...otherConfig
} = mainStore.config; } = mainStore.config;
let writeServerUrl: Array<string> | string = serverUrl; let writeServerUrl: Array<string> | string = serverUrl;
+39 -28
View File
@@ -5,16 +5,31 @@ import type { WebviewLabel, WebviewOptions } from "@tauri-apps/api/webview";
import useMainStore from "@/stores/index"; import useMainStore from "@/stores/index";
import { onBeforeUnmount } from "vue"; import { onBeforeUnmount } from "vue";
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 ( export default async (
label: WebviewLabel, label: WebviewLabel,
options?: Omit<WebviewOptions, "x" | "y" | "width" | "height"> & WindowOptions, options?: Omit<WebviewOptions, "x" | "y" | "width" | "height"> & WindowOptions,
afterCreatedFunc?: (webviewWindow: WebviewWindow, appWindow: Window) => void | null, afterCreatedFunc?: (webviewWindow: WebviewWindow, appWindow: Window) => void | null,
beforeCloseFunc?: () => void | null beforeCloseFunc?: () => void | null
) => { ) => {
const unlistenFnList: [UnlistenFn | null, UnlistenFn | null] = _listenersMaps[label] || [null, null]; const unlistenFnList: [UnlistenFn | null] = _listenersMaps[label] || [null];
let [unlistenLogCreated, unListenlogClose] = unlistenFnList;
let dialog = await WebviewWindow.getByLabel(label); let dialog = await WebviewWindow.getByLabel(label);
if (!dialog) { if (!dialog) {
let defaultOpts: { [key: string]: any; parent: Window | undefined } = { let defaultOpts: { [key: string]: any; parent: Window | undefined } = {
@@ -38,28 +53,20 @@ export default async (
defaultOpts.x = logicalPosition.x; defaultOpts.x = logicalPosition.x;
defaultOpts.y = logicalPosition.y; defaultOpts.y = logicalPosition.y;
} }
unlistenLogCreated && (await (unlistenLogCreated as Function)());
unListenlogClose && (await unListenlogClose());
dialog = new WebviewWindow(label, { ...defaultOpts, ...options }); dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
unlistenLogCreated = await dialog.listen("tauri://webview-created", async () => { await dealCloseListener(dialog, label, beforeCloseFunc);
if (dialog) { afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow)); await dialog.show();
await dialog.show();
}
});
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;
} else { } else {
const visible = await dialog.isVisible(); const visible = await dialog.isVisible();
if (visible) { if (visible) {
await dialog.close(); 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();
} }
} }
}; };
@@ -68,15 +75,19 @@ export const dataSubscribe = async (cb?: (...args: any) => any) => {
if (!cb) return; if (!cb) return;
const mainStore = useMainStore(); const mainStore = useMainStore();
const abort = new AbortController(); const abort = new AbortController();
window.addEventListener("storage", async () => { window.addEventListener(
mainStore.$hydrate(); "storage",
if (cb && cb instanceof Function) { async () => {
await cb(); mainStore.$hydrate();
if (cb && cb instanceof Function) {
await cb();
}
},
{
signal: abort.signal
} }
}, { );
signal: abort.signal
})
onBeforeUnmount(() => { onBeforeUnmount(() => {
abort?.abort(); abort?.abort();
}) });
}; };
+15 -15
View File
@@ -3,7 +3,7 @@
"private": true, "private": true,
"author": "leizi97", "author": "leizi97",
"description": "A simple network initiator based on Easytier", "description": "A simple network initiator based on Easytier",
"version": "1.4.2", "version": "1.4.4",
"scripts": { "scripts": {
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0", "dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
"build": "nuxt generate --dotenv env/.env.prod", "build": "nuxt generate --dotenv env/.env.prod",
@@ -13,26 +13,26 @@
"devDependencies": { "devDependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@element-plus/nuxt": "^1.1.1", "@element-plus/nuxt": "^1.1.1",
"@nuxtjs/tailwindcss": "6.13.1", "@nuxtjs/tailwindcss": "6.13.2",
"@pinia/nuxt": "0.10.1", "@pinia/nuxt": "0.11.0",
"@tauri-apps/api": "2.3.0", "@tauri-apps/api": "2.5.0",
"@tauri-apps/cli": "2.3.0", "@tauri-apps/cli": "2.5.0",
"@tauri-apps/plugin-cli": "^2.2.0", "@tauri-apps/plugin-cli": "^2.2.0",
"@tauri-apps/plugin-clipboard-manager": "2.2.1", "@tauri-apps/plugin-clipboard-manager": "2.2.2",
"@tauri-apps/plugin-dialog": "2.2.0", "@tauri-apps/plugin-dialog": "2.2.1",
"@tauri-apps/plugin-fs": "^2.2.0", "@tauri-apps/plugin-fs": "2.2.1",
"@tauri-apps/plugin-log": "2.2.2", "@tauri-apps/plugin-log": "2.3.1",
"@tauri-apps/plugin-shell": "^2.2.0", "@tauri-apps/plugin-shell": "2.2.1",
"@tauri-apps/plugin-window-state": "2.2.1", "@tauri-apps/plugin-window-state": "2.2.2",
"@types/lodash-es": "^4.17.12", "@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", "@vueuse/core": "12.7.0",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"element-plus": "2.9.4", "element-plus": "2.9.7",
"less": "4.2.1", "less": "4.2.1",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"nuxt": "3.15.4", "nuxt": "3.16.2",
"pinia": "3.0.1", "pinia": "3.0.2",
"pinia-plugin-persistedstate": "^4.2.0", "pinia-plugin-persistedstate": "^4.2.0",
"postcss": "^8.4.38", "postcss": "^8.4.38",
"prettier": "3.5.2", "prettier": "3.5.2",
+79 -22
View File
@@ -2,8 +2,8 @@
<div class="flex h-full flex-col items-start overflow-auto px-[25px]"> <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-[15px]">
<div class="flex flex-nowrap items-center gap-[5px]"> <div class="flex flex-nowrap items-center gap-[5px]">
<ElCheckbox v-model="mainStore.config.enableCustomProtocol">默认直连(p2p)使用的协议</ElCheckbox> <ElCheckbox v-model="mainStore.config.enableCustomProtocol">直连(P2P)优先使用传输协议</ElCheckbox>
<ElTooltip content="如果没有支持该协议的节点地址,程序会自动处理,请放心使用"> <ElTooltip content="若无法建立指定的协议,会自动使用可建立连接的协议">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
</div> </div>
@@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div> <div>
<ElCheckbox v-model="mainStore.config.relayAllPeerrpc">帮助对等节点建立直连(p2p)通信</ElCheckbox> <ElCheckbox v-model="mainStore.config.relayAllPeerrpc">帮助他人建立直连(P2P)连接</ElCheckbox>
</div> </div>
<div><ElCheckbox v-model="mainStore.config.connectAfterStart">软件启动后自动"启动联机"(搭配开机自启无感联机)</ElCheckbox></div> <div><ElCheckbox v-model="mainStore.config.connectAfterStart">软件启动后自动"启动联机"(搭配开机自启无感联机)</ElCheckbox></div>
<div class="flex flex-nowrap items-center gap-[15px]"> <div class="flex flex-nowrap items-center gap-[15px]">
@@ -38,8 +38,8 @@
</div> </div>
<div><ElCheckbox v-model="mainStore.config.enablePreventSleep">防止系统休眠(比如:屏幕会一直亮着)</ElCheckbox></div> <div><ElCheckbox v-model="mainStore.config.enablePreventSleep">防止系统休眠(比如:屏幕会一直亮着)</ElCheckbox></div>
<div class="flex flex-nowrap items-center gap-[5px]"> <div class="flex flex-nowrap items-center gap-[5px]">
<ElCheckbox v-model="mainStore.config.latencyfirst">延迟优先模式将尝试使用低延迟路径转发流量</ElCheckbox> <ElCheckbox v-model="mainStore.config.latencyfirst">使用低延迟模式</ElCheckbox>
<ElTooltip content="视网络质量进行选择,可能会出现中转与直连(p2p)来回切换的情况"> <ElTooltip content="弱网环境下可能会导致网络延迟延迟忽高忽低">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
</div> </div>
@@ -124,10 +124,11 @@
</template> </template>
</ElDialog> </ElDialog>
</div> </div>
<div class="flex items-center gap-[10px]"> <!-- <div class="flex items-center gap-[10px]">
<ElCheckbox <ElCheckbox
:disabled="mainStore.config.disbleListenner" :disabled="mainStore.config.disbleListenner"
v-model="mainStore.config.enableCustomListenerV6" :model-value="mainStore.config.enableCustomListenerV6"
@change="handleCustomListenerV6Change"
> >
自定义IPV6监听地址 自定义IPV6监听地址
</ElCheckbox> </ElCheckbox>
@@ -140,23 +141,23 @@
placeholder="请输入自定义IPV6监听地址" placeholder="请输入自定义IPV6监听地址"
/> />
</div> </div>
<ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听"> <ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听(内核版本2.2.3之后,ipv6监听被移除并合并到'自定义监听')">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
<CoreVersionWarning version="2.1.0" /> <CoreVersionWarning version="2.1.0" />
</div> </div> -->
<ElDivider /> <ElDivider />
<div class="flex items-center gap-[10px]"> <div class="flex items-center gap-[10px]">
<ElCheckbox v-model="mainStore.config.devName">自定义网卡名</ElCheckbox> <ElCheckbox v-model="mainStore.config.devName">自定义虚拟网卡名</ElCheckbox>
<ElInput <ElInput
size="small" size="small"
maxlength="10" maxlength="10"
v-model="mainStore.config.devNameValue" v-model="mainStore.config.devNameValue"
placeholder="请输入网卡名" placeholder="请输入虚拟网卡名"
/> />
</div> </div>
<div class="flex items-center gap-[10px]"> <div class="flex items-center gap-[10px]">
<ElCheckbox v-model="mainStore.config.enableNetCardMetric">自定义easytier网卡跃点</ElCheckbox> <ElCheckbox v-model="mainStore.config.enableNetCardMetric">自定义虚拟网卡优先级</ElCheckbox>
<ElInputNumber <ElInputNumber
controls-position="right" controls-position="right"
:min="1" :min="1"
@@ -166,9 +167,9 @@
:precision="0" :precision="0"
size="small" size="small"
v-model="mainStore.config.netCardMetricValue" v-model="mainStore.config.netCardMetricValue"
placeholder="请选择跃点数" placeholder="请输入优先级"
/> />
<ElTooltip content="设置easytier网卡的跃点,提升网卡优先级,跃点越小,网卡优先级越高"> <ElTooltip content="数值越小,优先级越高">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
</div> </div>
@@ -177,17 +178,59 @@
size="small" size="small"
type="warning" type="warning"
> >
(不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡也可以使用 设置跃点 功能除非你启用了下面的功能) (不使用自定义虚拟网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡也可以使用 自定义虚拟网卡优先级
功能除非你启用了下面的功能)
</ElText> </ElText>
</div> </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>
<!-- <div class="flex items-center gap-[5px]"> -->
<!-- <ElSelect
placeholder="选择设备"
v-model="mainStore.config.bindDevice"
filterable
no-data-text="暂无网卡设备数据请刷新"
>
<ElOption
v-for="guid in guids"
:key="guid[0]"
:label="guid[1]"
:value="guid[0]"
></ElOption>
</ElSelect> -->
<!-- <ElButton @click="getGuids">刷新</ElButton> -->
<ElTooltip content="将连接器的套接字绑定到物理设备以避免路由问题。比如子网代理网段与某节点的网段冲突,绑定物理设备后可以与该节点正常通信">
<ElIcon><QuestionFilled /></ElIcon>
</ElTooltip>
<!-- </div> -->
<CoreVersionWarning version="2.2.3" />
</div>
<ElDivider /> <ElDivider />
<div><ElCheckbox v-model="mainStore.config.enablExitNode">允许此节点成为出口节点</ElCheckbox></div> <div><ElCheckbox v-model="mainStore.config.enablExitNode">允许此节点成为出口节点</ElCheckbox></div>
<div><ElCheckbox v-model="mainStore.config.disableEncryption">禁用对等节点通信的加密</ElCheckbox></div> <div class="flex items-center gap-[5px]">
<div><ElCheckbox v-model="mainStore.config.multiThread">启用多线程运行</ElCheckbox></div> <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]"> <div class="flex items-center gap-[10px]">
<ElText>压缩算法</ElText> <ElText>传输数据压缩算法</ElText>
<div class="w-[160px]"> <div class="w-[160px]">
<ElSelect <ElSelect
size="small" size="small"
@@ -210,8 +253,8 @@
<ElDivider /> <ElDivider />
<div class="flex items-center gap-[10px]"> <div class="flex items-center gap-[10px]">
<ElCheckbox v-model="mainStore.config.useSmoltcp">为子网代理启用smoltcp堆栈</ElCheckbox> <ElCheckbox v-model="mainStore.config.useSmoltcp">为子网代理和 KCP 代理开启用户网络栈</ElCheckbox>
<ElTooltip content="使用用户态TCP/IP协议栈smoltcp,避免操作系统防火墙问题导致无法子网代理"> <ElTooltip content="开启后会降低网络性能,但不需要配置防火墙">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
</div> </div>
@@ -269,6 +312,20 @@
listenerDialogData.visible = false; listenerDialogData.visible = false;
}; };
// const handleCustomListenerV6Change = async (value: boolean) => {
// if (value) {
// const [error, _] = await ElConfirmDanger("内核版本2.2.3之后,ipv6监听被移除并合并到'自定义监听',请谨慎使用", "警告", {
// confirmButtonText: "继续使用",
// cancelButtonText: "取消"
// });
// if (!error) {
// mainStore.config.enableCustomListenerV6 = value;
// }
// } else {
// mainStore.config.enableCustomListenerV6 = value;
// }
// };
const mainStore = useMainStore(); const mainStore = useMainStore();
const data = ["trace", "debug", "info", "warn", "error", "off"]; const data = ["trace", "debug", "info", "warn", "error", "off"];
const guids = ref<string[][]>([]); const guids = ref<string[][]>([]);
@@ -297,7 +354,7 @@
}; };
// 为bind_device功能增加改方法 // 为bind_device功能增加改方法
const _getGuids = async () => { const getGuids = async () => {
const guidsValue = await invoke<string[][]>("get_network_adapter_guids"); const guidsValue = await invoke<string[][]>("get_network_adapter_guids");
guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : []; guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : [];
}; };
+13 -9
View File
@@ -1,12 +1,18 @@
<template> <template>
<div class="flex h-full flex-col gap-[10px]"> <div class="flex h-full flex-col gap-[10px]">
<ElRadioGroup <div class="flex items-center gap-[10px]">
:disabled="!data.isSwitchEnable" <ElRadioGroup
v-model="mainStore.cidrEnable" :disabled="!data.isSwitchEnable"
> v-model="mainStore.cidrEnable"
<ElRadioButton :value="true">开启</ElRadioButton> >
<ElRadioButton :value="false">关闭</ElRadioButton> <ElRadioButton :value="true">开启</ElRadioButton>
</ElRadioGroup> <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"> <div class="flex-1 overflow-auto">
<ElInput <ElInput
placeholder="例如: 192.168.1.0/24 一行一个" placeholder="例如: 192.168.1.0/24 一行一个"
@@ -113,6 +119,4 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
unlistenStart && unlistenStart(); unlistenStart && unlistenStart();
}); });
</script> </script>
+35 -3
View File
@@ -252,6 +252,10 @@
</ElFormItem> </ElFormItem>
</div> </div>
</ElForm> </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 class="mt-auto flex items-start">
<div> <div>
<div class="pt-[4px]"> <div class="pt-[4px]">
@@ -330,7 +334,7 @@
</div> </div>
<div class="mt-[10px] pl-[2px]"> <div class="mt-[10px] pl-[2px]">
<ElTooltip <ElTooltip
placement="left" placement="top"
content="日志" content="日志"
> >
<ElButton <ElButton
@@ -749,7 +753,8 @@
const config = mainStore.config; const config = mainStore.config;
// console.error(config); // console.error(config);
const protocols = supportProtocols(); const protocols = supportProtocols();
const data = reactive({ //easytierGame有没有新版 const data = reactive({
//easytierGame有没有新版
logVisible: false, logVisible: false,
cidrVisible: false, cidrVisible: false,
advanceVisible: false, advanceVisible: false,
@@ -1115,6 +1120,26 @@
} }
}; };
const compatibleIpv6Listener = async () => {
// ipv6监听在后续版本合并到customListenner里了,这里做兼容处理
if (config.enableCustomListenerV6 && config.customListenerV6Data) {
const customListener = config.customListenerV6Data.trim();
if (customListener) {
const customListenerV4 = config.customListenerData
.trim()
.split("\n")
.map(el => el.trim())
.filter(el => el);
if (!customListenerV4.includes(customListener)) {
config.customListenerData += `\n${customListener}`;
}
}
}
if (config.enableCustomListenerV6) {
config.enableCustomListenerV6 = false;
}
};
const initConnectAfterStart = async () => { const initConnectAfterStart = async () => {
if (config.connectAfterStart && data.coreVersion) { if (config.connectAfterStart && data.coreVersion) {
await reset(); await reset();
@@ -1212,6 +1237,7 @@
await compatibleInitAutoStart(); await compatibleInitAutoStart();
// await initAutoStart(); // await initAutoStart();
await initStartWinIpBroadcast(); await initStartWinIpBroadcast();
await compatibleIpv6Listener();
await getCoreVersion(); await getCoreVersion();
await listenObj.listenThreadId(); await listenObj.listenThreadId();
await listenObj.listenServerThreadId(); await listenObj.listenServerThreadId();
@@ -1374,6 +1400,12 @@
if (config.disableKcpInput) { if (config.disableKcpInput) {
args.push("--disable-kcp-input"); args.push("--disable-kcp-input");
} }
if (config.bindDeviceEnable) {
args.push("--bind-device", "true");
}
if (mainStore.proxyForwardBySystem) {
args.push("--proxy-forward-by-system");
}
return args; return args;
}; };
@@ -1795,7 +1827,7 @@
cidrTimer && clearInterval(cidrTimer); cidrTimer && clearInterval(cidrTimer);
cidrTimer = setInterval(() => { cidrTimer = setInterval(() => {
appWindow.emitTo({ kind: "WebviewWindow", label: "cidr" }, "route", data.isStart); appWindow.emitTo({ kind: "WebviewWindow", label: "cidr" }, "route", data.isStart);
}, 1000); }, 650);
}, },
() => { () => {
cidrTimer && clearInterval(cidrTimer); cidrTimer && clearInterval(cidrTimer);
+6 -1
View File
@@ -54,7 +54,11 @@
prop="lat_ms" prop="lat_ms"
width="100" width="100"
label="延迟/ms" label="延迟/ms"
></ElTableColumn> >
<template #default="{ row }">
{{ row.lat_ms && !isNaN(Number(row.lat_ms)) ? Number(row.lat_ms).toFixed(0) : row.lat_ms || "-" }}
</template>
</ElTableColumn>
<ElTableColumn <ElTableColumn
sortable sortable
width="100" width="100"
@@ -108,6 +112,7 @@
import { ATJ, parseCliInfo } from "@/utils"; import { ATJ, parseCliInfo } from "@/utils";
import { ElConfirmDanger } from "~/utils/element"; import { ElConfirmDanger } from "~/utils/element";
import { getCurrentWindow } from "@tauri-apps/api/window"; import { getCurrentWindow } from "@tauri-apps/api/window";
import { isNaN } from "lodash-es";
// enum NatType { // enum NatType {
// // has NAT; but own a single public IP, port is not changed // // has NAT; but own a single public IP, port is not changed
// Unknown = 0; // Unknown = 0;
+1787 -1706
View File
File diff suppressed because it is too large Load Diff
+213 -176
View File
@@ -77,15 +77,15 @@ checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]] [[package]]
name = "android_log-sys" name = "android_log-sys"
version = "0.3.1" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d"
[[package]] [[package]]
name = "android_logger" name = "android_logger"
version = "0.14.1" version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05b07e8e73d720a1f2e4b6014766e6039fd2e96a4fa44e2a78d0e1fa2ff49826" checksum = "f6f39be698127218cca460cb624878c9aa4e2b47dba3b277963d2bf00bad263b"
dependencies = [ dependencies = [
"android_log-sys", "android_log-sys",
"env_filter", "env_filter",
@@ -180,6 +180,7 @@ dependencies = [
"objc2-foundation 0.2.2", "objc2-foundation 0.2.2",
"parking_lot", "parking_lot",
"windows-sys 0.48.0", "windows-sys 0.48.0",
"wl-clipboard-rs",
"x11rb", "x11rb",
] ]
@@ -206,7 +207,7 @@ dependencies = [
"url", "url",
"wayland-backend", "wayland-backend",
"wayland-client", "wayland-client",
"wayland-protocols", "wayland-protocols 0.32.5",
"zbus 4.0.1", "zbus 4.0.1",
] ]
@@ -672,9 +673,9 @@ dependencies = [
[[package]] [[package]]
name = "cargo_toml" name = "cargo_toml"
version = "0.21.0" version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fbd1fe9db3ebf71b89060adaf7b0504c2d6a425cf061313099547e382c2e472" checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
dependencies = [ dependencies = [
"serde", "serde",
"toml", "toml",
@@ -1092,6 +1093,17 @@ dependencies = [
"syn 1.0.109", "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]] [[package]]
name = "derive_arbitrary" name = "derive_arbitrary"
version = "1.4.1" version = "1.4.1"
@@ -1241,7 +1253,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]] [[package]]
name = "easytier-game" name = "easytier-game"
version = "1.4.2" version = "1.4.4"
dependencies = [ dependencies = [
"hashbrown 0.15.2", "hashbrown 0.15.2",
"log", "log",
@@ -1261,6 +1273,7 @@ dependencies = [
"tauri-plugin-shell", "tauri-plugin-shell",
"tauri-plugin-single-instance", "tauri-plugin-single-instance",
"tauri-plugin-window-state", "tauri-plugin-window-state",
"thunk-rs",
"tokio", "tokio",
"whoami", "whoami",
"windows 0.58.0", "windows 0.58.0",
@@ -1426,6 +1439,12 @@ dependencies = [
"rustc_version", "rustc_version",
] ]
[[package]]
name = "fixedbitset"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]] [[package]]
name = "flate2" name = "flate2"
version = "1.0.35" version = "1.0.35"
@@ -1746,10 +1765,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys",
"libc", "libc",
"wasi 0.11.0+wasi-snapshot-preview1", "wasi 0.11.0+wasi-snapshot-preview1",
"wasm-bindgen",
] ]
[[package]] [[package]]
@@ -2085,7 +2102,6 @@ dependencies = [
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"tower-service", "tower-service",
"webpki-roots",
] ]
[[package]] [[package]]
@@ -2673,6 +2689,12 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.8.2" version = "0.8.2"
@@ -2780,6 +2802,18 @@ dependencies = [
"memoffset", "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]] [[package]]
name = "nix" name = "nix"
version = "0.29.0" version = "0.29.0"
@@ -2799,6 +2833,16 @@ version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" 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]] [[package]]
name = "ntapi" name = "ntapi"
version = "0.4.1" version = "0.4.1"
@@ -3279,6 +3323,16 @@ version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 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]] [[package]]
name = "phf" name = "phf"
version = "0.8.0" version = "0.8.0"
@@ -3617,58 +3671,6 @@ dependencies = [
"memchr", "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]] [[package]]
name = "quote" name = "quote"
version = "1.0.38" version = "1.0.38"
@@ -3907,10 +3909,7 @@ dependencies = [
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"quinn",
"rustls",
"rustls-pemfile", "rustls-pemfile",
"rustls-pki-types",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
@@ -3918,7 +3917,6 @@ dependencies = [
"system-configuration", "system-configuration",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
"tokio-rustls",
"tokio-util", "tokio-util",
"tower", "tower",
"tower-service", "tower-service",
@@ -3927,7 +3925,6 @@ dependencies = [
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-streams", "wasm-streams",
"web-sys", "web-sys",
"webpki-roots",
"windows-registry", "windows-registry",
] ]
@@ -4020,12 +4017,6 @@ version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
[[package]] [[package]]
name = "rustc_version" name = "rustc_version"
version = "0.4.1" version = "0.4.1"
@@ -4055,7 +4046,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"ring",
"rustls-pki-types", "rustls-pki-types",
"rustls-webpki", "rustls-webpki",
"subtle", "subtle",
@@ -4076,9 +4066,6 @@ name = "rustls-pki-types"
version = "1.10.1" version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
dependencies = [
"web-time",
]
[[package]] [[package]]
name = "rustls-webpki" name = "rustls-webpki"
@@ -4675,9 +4662,9 @@ dependencies = [
[[package]] [[package]]
name = "tao" name = "tao"
version = "0.32.3" version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d8f5e5fe19612f3dd187ac3928d48f5ad23d3edd9821806d05b0c3beb6537bd" checksum = "1e59c1f38e657351a2e822eadf40d6a2ad4627b9c25557bc1180ec1b3295ef82"
dependencies = [ dependencies = [
"bitflags 2.7.0", "bitflags 2.7.0",
"core-foundation 0.10.0", "core-foundation 0.10.0",
@@ -4706,8 +4693,8 @@ dependencies = [
"tao-macros", "tao-macros",
"unicode-segmentation", "unicode-segmentation",
"url", "url",
"windows 0.60.0", "windows 0.61.1",
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-version", "windows-version",
"x11-dl", "x11-dl",
] ]
@@ -4737,9 +4724,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "2.3.0" version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f32eadd4a507f1b61e4fd1f792d0ed4184127a3241ff5bcb1848b9a574a58d6" checksum = "be03adf68fba02f87c4653da7bd73f40b0ecf9c6b7c2c39830f6981d0651912f"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@@ -4762,6 +4749,7 @@ dependencies = [
"objc2 0.6.0", "objc2 0.6.0",
"objc2-app-kit 0.3.0", "objc2-app-kit 0.3.0",
"objc2-foundation 0.3.0", "objc2-foundation 0.3.0",
"objc2-ui-kit",
"percent-encoding", "percent-encoding",
"plist", "plist",
"raw-window-handle", "raw-window-handle",
@@ -4784,14 +4772,14 @@ dependencies = [
"webkit2gtk", "webkit2gtk",
"webview2-com", "webview2-com",
"window-vibrancy", "window-vibrancy",
"windows 0.60.0", "windows 0.61.1",
] ]
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "2.0.6" version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51a2e96f3c0baa0581656bb58e6fdd0f7c9c31eaf6721a0c08689d938fe85f2d" checksum = "d7a0350f0df1db385ca5c02888a83e0e66655c245b7443db8b78a70da7d7f8fc"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@@ -4811,9 +4799,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "2.0.5" version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e357ec3daf8faad1029bc7109e7f5b308ceb63b6073d110d7388923a4cce5e55" checksum = "f93f035551bf7b11b3f51ad9bc231ebbe5e085565527991c16cf326aa38cdf47"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"brotli", "brotli",
@@ -4838,9 +4826,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "2.0.5" version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "447ee4dd94690d77f1422f2b57e783c654ba75c535ad6f6e727887330804fff2" checksum = "8db4df25e2d9d45de0c4c910da61cd5500190da14ae4830749fee3466dddd112"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
@@ -4884,9 +4872,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-clipboard-manager" name = "tauri-plugin-clipboard-manager"
version = "2.2.1" version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54de1e3a2ea008687954d5d72952800e87b09f6fbea6d0960d99e58050537642" checksum = "3ab4cb42fdf745229b768802e9180920a4be63122cf87ed1c879103f7609d98e"
dependencies = [ dependencies = [
"arboard", "arboard",
"log", "log",
@@ -4899,9 +4887,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-dialog" name = "tauri-plugin-dialog"
version = "2.2.0" version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b59fd750551b1066744ab956a1cd6b1ea3e1b3763b0b9153ac27a044d596426" checksum = "bcaf6e5d6062423a0f711a23c2a573ccba222b6a16a9322d8499928f27e41376"
dependencies = [ dependencies = [
"log", "log",
"raw-window-handle", "raw-window-handle",
@@ -4917,9 +4905,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-fs" name = "tauri-plugin-fs"
version = "2.2.0" version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223" checksum = "88371e340ad2f07409a3b68294abe73f20bc9c1bc1b631a31dc37a3d0161f682"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"dunce", "dunce",
@@ -4940,16 +4928,16 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-log" name = "tauri-plugin-log"
version = "2.2.2" version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e106ce75445f592879022757789ccd41c6d2829cd3043f2bf24379b52dc8710" checksum = "2341d5b9bc5318c8e34f35a569140c78337241aa9c14091550b424c49f0314e0"
dependencies = [ dependencies = [
"android_logger", "android_logger",
"byte-unit", "byte-unit",
"fern", "fern",
"log", "log",
"objc2 0.5.2", "objc2 0.6.0",
"objc2-foundation 0.2.2", "objc2-foundation 0.3.0",
"serde", "serde",
"serde_json", "serde_json",
"serde_repr", "serde_repr",
@@ -4962,9 +4950,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-shell" name = "tauri-plugin-shell"
version = "2.2.0" version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79" checksum = "69d5eb3368b959937ad2aeaf6ef9a8f5d11e01ffe03629d3530707bbcb27ff5d"
dependencies = [ dependencies = [
"encoding_rs", "encoding_rs",
"log", "log",
@@ -4983,9 +4971,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-single-instance" name = "tauri-plugin-single-instance"
version = "2.2.2" version = "2.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25bbc73eed15bba8ad290a52614f2711280df4bf575b36ce78f64367074b90b7" checksum = "1320af4d866a7fb5f5721d299d14d0dd9e4e6bc0359ff3e263124a2bf6814efa"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
@@ -4998,9 +4986,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-window-state" name = "tauri-plugin-window-state"
version = "2.2.1" version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35e344b512b0d99d9d06225f235d87d6c66d89496a3bf323d9b578d940596e6c" checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd"
dependencies = [ dependencies = [
"bitflags 2.7.0", "bitflags 2.7.0",
"log", "log",
@@ -5013,28 +5001,31 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "2.4.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e758a405ab39e25f4d1235c5f06fe563f44b01ee18bbe38ddec5356d4f581908" checksum = "00f004905d549854069e6774533d742b03cacfd6f03deb08940a8677586cbe39"
dependencies = [ dependencies = [
"cookie",
"dpi", "dpi",
"gtk", "gtk",
"http", "http",
"jni", "jni",
"objc2 0.6.0",
"objc2-ui-kit",
"raw-window-handle", "raw-window-handle",
"serde", "serde",
"serde_json", "serde_json",
"tauri-utils", "tauri-utils",
"thiserror 2.0.10", "thiserror 2.0.10",
"url", "url",
"windows 0.60.0", "windows 0.61.1",
] ]
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "2.4.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ef46e0c9c30d3524990cb10556f82cde0aa2281e9600e7ed2f499842db8b080" checksum = "f85d056f4d4b014fe874814034f3416d57114b617a493a4fe552580851a3f3a2"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@@ -5043,6 +5034,7 @@ dependencies = [
"objc2 0.6.0", "objc2 0.6.0",
"objc2-app-kit 0.3.0", "objc2-app-kit 0.3.0",
"objc2-foundation 0.3.0", "objc2-foundation 0.3.0",
"once_cell",
"percent-encoding", "percent-encoding",
"raw-window-handle", "raw-window-handle",
"softbuffer", "softbuffer",
@@ -5052,16 +5044,17 @@ dependencies = [
"url", "url",
"webkit2gtk", "webkit2gtk",
"webview2-com", "webview2-com",
"windows 0.60.0", "windows 0.61.1",
"wry", "wry",
] ]
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "2.2.0" version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "107a959dbd5ff53d89a98f6f2e3e987c611334141a43630caae1d80e79446dd6" checksum = "b2900399c239a471bcff7f15c4399eb1a8c4fe511ba2853e07c996d771a5e0a4"
dependencies = [ dependencies = [
"anyhow",
"brotli", "brotli",
"cargo_metadata", "cargo_metadata",
"ctor", "ctor",
@@ -5174,6 +5167,11 @@ dependencies = [
"syn 2.0.96", "syn 2.0.96",
] ]
[[package]]
name = "thunk-rs"
version = "0.3.3"
source = "git+https://github.com/easytier/thunk.git#5e8371a3100dbc18dda952a2036c6bd6fb0504db"
[[package]] [[package]]
name = "tiff" name = "tiff"
version = "0.9.1" version = "0.9.1"
@@ -5429,6 +5427,19 @@ dependencies = [
"windows-sys 0.59.0", "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]] [[package]]
name = "try-lock" name = "try-lock"
version = "0.2.5" version = "0.2.5"
@@ -5777,6 +5788,18 @@ dependencies = [
"wayland-scanner", "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]] [[package]]
name = "wayland-protocols" name = "wayland-protocols"
version = "0.32.5" version = "0.32.5"
@@ -5789,6 +5812,19 @@ dependencies = [
"wayland-scanner", "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]] [[package]]
name = "wayland-scanner" name = "wayland-scanner"
version = "0.31.5" version = "0.31.5"
@@ -5821,16 +5857,6 @@ dependencies = [
"wasm-bindgen", "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]] [[package]]
name = "webkit2gtk" name = "webkit2gtk"
version = "2.0.1" version = "2.0.1"
@@ -5875,27 +5901,18 @@ dependencies = [
"system-deps", "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]] [[package]]
name = "webview2-com" name = "webview2-com"
version = "0.36.0" version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3" checksum = "b542b5cfbd9618c46c2784e4d41ba218c336ac70d44c55e47b251033e7d85601"
dependencies = [ dependencies = [
"webview2-com-macros", "webview2-com-macros",
"webview2-com-sys", "webview2-com-sys",
"windows 0.60.0", "windows 0.61.1",
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-implement 0.59.0", "windows-implement 0.60.0",
"windows-interface 0.59.0", "windows-interface 0.59.1",
] ]
[[package]] [[package]]
@@ -5911,13 +5928,13 @@ dependencies = [
[[package]] [[package]]
name = "webview2-com-sys" name = "webview2-com-sys"
version = "0.36.0" version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" checksum = "8ae2d11c4a686e4409659d7891791254cf9286d3cfe0eef54df1523533d22295"
dependencies = [ dependencies = [
"thiserror 2.0.10", "thiserror 2.0.10",
"windows 0.60.0", "windows 0.61.1",
"windows-core 0.60.1", "windows-core 0.61.0",
] ]
[[package]] [[package]]
@@ -6014,12 +6031,12 @@ dependencies = [
[[package]] [[package]]
name = "windows" name = "windows"
version = "0.60.0" version = "0.61.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
dependencies = [ dependencies = [
"windows-collections", "windows-collections",
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-future", "windows-future",
"windows-link", "windows-link",
"windows-numerics", "windows-numerics",
@@ -6027,11 +6044,11 @@ dependencies = [
[[package]] [[package]]
name = "windows-collections" name = "windows-collections"
version = "0.1.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
dependencies = [ dependencies = [
"windows-core 0.60.1", "windows-core 0.61.0",
] ]
[[package]] [[package]]
@@ -6070,24 +6087,24 @@ dependencies = [
[[package]] [[package]]
name = "windows-core" name = "windows-core"
version = "0.60.1" version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [ dependencies = [
"windows-implement 0.59.0", "windows-implement 0.60.0",
"windows-interface 0.59.0", "windows-interface 0.59.1",
"windows-link", "windows-link",
"windows-result 0.3.1", "windows-result 0.3.2",
"windows-strings 0.3.1", "windows-strings 0.4.0",
] ]
[[package]] [[package]]
name = "windows-future" name = "windows-future"
version = "0.1.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0" checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
dependencies = [ dependencies = [
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-link", "windows-link",
] ]
@@ -6115,9 +6132,9 @@ dependencies = [
[[package]] [[package]]
name = "windows-implement" name = "windows-implement"
version = "0.59.0" version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -6148,9 +6165,9 @@ dependencies = [
[[package]] [[package]]
name = "windows-interface" name = "windows-interface"
version = "0.59.0" version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -6159,17 +6176,17 @@ dependencies = [
[[package]] [[package]]
name = "windows-link" name = "windows-link"
version = "0.1.0" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]] [[package]]
name = "windows-numerics" name = "windows-numerics"
version = "0.1.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [ dependencies = [
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-link", "windows-link",
] ]
@@ -6204,9 +6221,9 @@ dependencies = [
[[package]] [[package]]
name = "windows-result" name = "windows-result"
version = "0.3.1" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
dependencies = [ dependencies = [
"windows-link", "windows-link",
] ]
@@ -6223,9 +6240,9 @@ dependencies = [
[[package]] [[package]]
name = "windows-strings" name = "windows-strings"
version = "0.3.1" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
dependencies = [ dependencies = [
"windows-link", "windows-link",
] ]
@@ -6554,6 +6571,26 @@ dependencies = [
"bitflags 2.7.0", "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]] [[package]]
name = "write16" name = "write16"
version = "1.0.0" version = "1.0.0"
@@ -6568,9 +6605,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]] [[package]]
name = "wry" name = "wry"
version = "0.50.1" version = "0.51.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a5eabce267929af61619166232d5221aeec2d7af8712bc33cf54a78416ad711" checksum = "c886a0a9d2a94fd90cfa1d929629b79cfefb1546e2c7430c63a47f0664c0e4e2"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"block2 0.6.0", "block2 0.6.0",
@@ -6604,8 +6641,8 @@ dependencies = [
"webkit2gtk", "webkit2gtk",
"webkit2gtk-sys", "webkit2gtk-sys",
"webview2-com", "webview2-com",
"windows 0.60.0", "windows 0.61.1",
"windows-core 0.60.1", "windows-core 0.61.0",
"windows-version", "windows-version",
"x11-dl", "x11-dl",
] ]
+13 -10
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "easytier-game" name = "easytier-game"
version = "1.4.2" version = "1.4.4"
homepage = "https://github.com/EasyTier/EasyTier" homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasytierGame" repository = "https://github.com/EasyTier/EasytierGame"
description = "A simple network initiator based on Easytier" description = "A simple network initiator based on Easytier"
@@ -18,31 +18,34 @@ name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"] crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies] [build-dependencies]
tauri-build = { version = "2.0.6", features = [] } tauri-build = { version = "2.2.0", features = [] }
# prost-build = "0.13.2" # 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] [dependencies]
serde_json = "1.0.137" serde_json = "1.0.137"
serde = { version = "1.0.217", features = ["derive"] } serde = { version = "1.0.217", features = ["derive"] }
log = "0.4.26" log = "0.4.26"
tauri = { version = "2.3.0", features = [ "protocol-asset", tauri = { version = "2.5.0", features = [ "protocol-asset",
"tray-icon", "tray-icon",
"image-png", "image-png",
"image-ico" "image-ico"
] } ] }
tauri-plugin-log = "2.2.2" tauri-plugin-log = "2.3.1"
tauri-plugin-shell = "2.2.0" tauri-plugin-shell = "2.2.1"
reqwest = { version = "0.12.12", features = ["json"] } reqwest = { version = "0.12.12", features = ["json"] }
zip = "2.2.3" zip = "2.2.3"
sysinfo = '0.33.1' 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" whoami = "1.5.2"
tauri-plugin-fs = "2.2.0" tauri-plugin-fs = "2.2.1"
tauri-plugin-clipboard-manager = "2.2.1" tauri-plugin-clipboard-manager = "2.2.2"
rand = "0.9.0" rand = "0.9.0"
tokio = { version = "1.43.0", features = ["process"] } tokio = { version = "1.43.0", features = ["process"] }
tauri-plugin-dialog = "2.2.0" tauri-plugin-dialog = "2.2.1"
# prost = "0.13" # prost = "0.13"
# prost-types = "0.13" # prost-types = "0.13"
hashbrown = "0.15.2" 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] [target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-cli = "2.2.0" tauri-plugin-cli = "2.2.0"
tauri-plugin-single-instance = "2.2.2" tauri-plugin-single-instance = "2.2.3"
tauri-plugin-window-state = "2.2.1" tauri-plugin-window-state = "2.2.2"
+1
View File
@@ -1,4 +1,5 @@
fn main() { fn main() {
thunk::thunk();
let mut windows = tauri_build::WindowsAttributes::new(); let mut windows = tauri_build::WindowsAttributes::new();
windows = windows.app_manifest( windows = windows.app_manifest(
r#" r#"
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "easytier-game", "productName": "easytier-game",
"version": "1.4.2", "version": "1.4.4",
"identifier": "com.tauri.easytier-game", "identifier": "com.tauri.easytier-game",
"build": { "build": {
@@ -12,7 +12,7 @@
"app": { "app": {
"windows": [ "windows": [
{ {
"title": "easytier-game 1.4.2", "title": "easytier-game 1.4.4",
"label": "main", "label": "main",
"minWidth": 340, "minWidth": 340,
"width": 340, "width": 340,
+6 -1
View File
@@ -40,7 +40,8 @@ const store = defineStore("main", {
enablePreventSleep: false, //组织系统休眠 enablePreventSleep: false, //组织系统休眠
compression: "none", //加密算法 compression: "none", //加密算法
enableKcpProxy: true, //启用kcp代理 默认开启 enableKcpProxy: true, //启用kcp代理 默认开启
disableKcpInput: false //禁用kcp输入 disableKcpInput: false, //禁用kcp输入
bindDeviceEnable: false, //是否绑定设备
}, },
serverConfig: { serverConfig: {
enableWhiteList: true, // 是否启用白名单 enableWhiteList: true, // 是否启用白名单
@@ -51,6 +52,7 @@ const store = defineStore("main", {
port: "11010" // 服务器端口 port: "11010" // 服务器端口
}, },
cidrEnable: false, cidrEnable: false,
proxyForwardBySystem: false, // 是否通过系统内核转发子网代理数据包,禁用内置NAT
basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"], basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"],
theme: false, //主题 false light true dark theme: false, //主题 false light true dark
configStartEnable: false, //使用配置文件启动 configStartEnable: false, //使用配置文件启动
@@ -117,6 +119,8 @@ const store = defineStore("main", {
"config.enableKcpProxy", "config.enableKcpProxy",
"config.disableKcpInput", "config.disableKcpInput",
"config.bindDeviceEnable",
"serverConfig.autoStart", "serverConfig.autoStart",
// 'serverConfig.enableListener', // 'serverConfig.enableListener',
"serverConfig.enableWhiteList", "serverConfig.enableWhiteList",
@@ -125,6 +129,7 @@ const store = defineStore("main", {
"serverConfig.port", "serverConfig.port",
"cidrEnable", "cidrEnable",
"proxyForwardBySystem",
"basePeers", "basePeers",
"theme", "theme",
"configStartEnable", "configStartEnable",