mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2026-09-20 03:21:59 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
777ec9b982 | ||
|
|
167002691c | ||
|
|
434014f690 | ||
|
|
0d0901de94 | ||
|
|
18f6c54a4f | ||
|
|
ad0f252dfd | ||
|
|
6bf4d54361 | ||
|
|
8f2c800380 | ||
|
|
8b2ce406d8 | ||
|
|
10dde939cb | ||
|
|
84460409ed | ||
|
|
60faa01769 | ||
|
|
26f3f6fb36 | ||
|
|
494087820a | ||
|
|
87f4d98518 | ||
|
|
30a2c3430b | ||
|
|
aab8175ce3 | ||
|
|
136ce06c33 | ||
|
|
bdeda8bebd | ||
|
|
3ee09f7d60 |
@@ -37,6 +37,10 @@ export const updateConfigJson = async (configJsonSeverUrl?: ConfigServerUrlType)
|
||||
acceptDNS,
|
||||
enablePortForward,
|
||||
portForwardData,
|
||||
tcpWhitelist,
|
||||
udpWhitelist,
|
||||
tcpWhitelistEnable,
|
||||
udpWhitelistEnable,
|
||||
...otherConfig
|
||||
} = mainStore.config;
|
||||
let writeServerUrl: Array<string> | string = serverUrl;
|
||||
|
||||
+44
-44
@@ -6,55 +6,55 @@ import { BaseDirectory } from "@tauri-apps/api/path";
|
||||
import { exists } from "@tauri-apps/plugin-fs";
|
||||
|
||||
const getWinIpBroadcastPid = async () => {
|
||||
const mainStore = useMainStore();
|
||||
const pid = await invoke("search_pid_by_pname", { target_process_name: "WinIPBroadcast" });
|
||||
mainStore.winipBcPid = (pid as number) || 0;
|
||||
mainStore.$patch({
|
||||
winipBcStart: !!(mainStore.winipBcPid && mainStore.winipBcPid > 0)
|
||||
});
|
||||
// const mainStore = useMainStore();
|
||||
// const pid = await invoke("search_pid_by_pname", { target_process_name: "WinIPBroadcast" });
|
||||
// mainStore.winipBcPid = (pid as number) || 0;
|
||||
// mainStore.$patch({
|
||||
// winipBcStart: !!(mainStore.winipBcPid && mainStore.winipBcPid > 0)
|
||||
// });
|
||||
};
|
||||
|
||||
export const handleWinipBcStart = async () => {
|
||||
const mainStore = useMainStore();
|
||||
if (!mainStore.winipBcStart) {
|
||||
try {
|
||||
await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
const isExists = await exists("easytier/tool/WinIPBroadcast.exe", { baseDir: BaseDirectory.Resource });
|
||||
if (!isExists) {
|
||||
ElMessage.error(`WinipBc不存在`);
|
||||
console.error(`WinipBc不存在`);
|
||||
return;
|
||||
}
|
||||
const child = await Command.create("WinIPBroadcast", ["run"]).spawn();
|
||||
mainStore.winipBcPid = child.pid || 0;
|
||||
await getWinIpBroadcastPid();
|
||||
if (mainStore.winipBcPid) {
|
||||
mainStore.$patch({
|
||||
winIpBcAutoStart: true
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(`WinipBc失败`);
|
||||
}
|
||||
} catch (err) {
|
||||
ElMessage.error(`WinipBc失败`);
|
||||
console.error(err);
|
||||
}
|
||||
} else {
|
||||
await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
await getWinIpBroadcastPid();
|
||||
if (mainStore.winipBcPid <= 0) {
|
||||
mainStore.$patch({
|
||||
winIpBcAutoStart: false
|
||||
});
|
||||
}
|
||||
}
|
||||
// const mainStore = useMainStore();
|
||||
// if (!mainStore.winipBcStart) {
|
||||
// try {
|
||||
// await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
// const isExists = await exists("easytier/tool/WinIPBroadcast.exe", { baseDir: BaseDirectory.Resource });
|
||||
// if (!isExists) {
|
||||
// ElMessage.error(`WinipBc不存在`);
|
||||
// console.error(`WinipBc不存在`);
|
||||
// return;
|
||||
// }
|
||||
// const child = await Command.create("WinIPBroadcast", ["run"]).spawn();
|
||||
// mainStore.winipBcPid = child.pid || 0;
|
||||
// await getWinIpBroadcastPid();
|
||||
// if (mainStore.winipBcPid) {
|
||||
// mainStore.$patch({
|
||||
// winIpBcAutoStart: true
|
||||
// });
|
||||
// } else {
|
||||
// ElMessage.error(`WinipBc失败`);
|
||||
// }
|
||||
// } catch (err) {
|
||||
// ElMessage.error(`WinipBc失败`);
|
||||
// console.error(err);
|
||||
// }
|
||||
// } else {
|
||||
// await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
// await getWinIpBroadcastPid();
|
||||
// if (mainStore.winipBcPid <= 0) {
|
||||
// mainStore.$patch({
|
||||
// winIpBcAutoStart: false
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
export const initStartWinIpBroadcast = async () => {
|
||||
const mainStore = useMainStore();
|
||||
await getWinIpBroadcastPid();
|
||||
// const mainStore = useMainStore();
|
||||
// await getWinIpBroadcastPid();
|
||||
// console.error(mainStore.winipBcStart, mainStore.winIpBcAutoStart)
|
||||
if (mainStore.winIpBcAutoStart && !mainStore.winipBcStart) {
|
||||
await handleWinipBcStart();
|
||||
}
|
||||
// if (mainStore.winIpBcAutoStart && !mainStore.winipBcStart) {
|
||||
// await handleWinipBcStart();
|
||||
// }
|
||||
};
|
||||
|
||||
@@ -23,5 +23,14 @@ export const getServerArgs = () => {
|
||||
if (mainStore.serverConfig.privateMode) {
|
||||
args.push("--private-mode", "true");
|
||||
}
|
||||
const networkName = mainStore.serverConfig.privateNetworkName.trim();
|
||||
if (networkName) {
|
||||
args.push("--network-name", networkName);
|
||||
}
|
||||
const networkSecret = mainStore.serverConfig.privateNetworkPassword.trim();
|
||||
if (networkSecret) {
|
||||
args.push("--network-secret", networkSecret);
|
||||
}
|
||||
|
||||
return args;
|
||||
};
|
||||
|
||||
+15
-4
@@ -22,7 +22,7 @@ async function toggleVisibility() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function useTray(init: boolean = false, beforExit: Function, handleConnection: Function) {
|
||||
export async function useTray(init: boolean = false, beforExit: Function, handleConnection: Function, handleReconnect: Function) {
|
||||
let tray;
|
||||
try {
|
||||
tray = await TrayIcon.getById(DEFAULT_TRAY_NAME);
|
||||
@@ -31,7 +31,7 @@ export async function useTray(init: boolean = false, beforExit: Function, handle
|
||||
tooltip: `EasyTierGame\n${pkg.version}`,
|
||||
title: `EasyTierGame\n${pkg.version}`,
|
||||
id: DEFAULT_TRAY_NAME,
|
||||
menu: await Menu.new({ id: "main", items: await generateMenuItem(beforExit, handleConnection) }),
|
||||
menu: await Menu.new({ id: "main", items: await generateMenuItem(beforExit, handleConnection, handleReconnect) }),
|
||||
action: async e => {
|
||||
toggleVisibility();
|
||||
}
|
||||
@@ -45,16 +45,17 @@ export async function useTray(init: boolean = false, beforExit: Function, handle
|
||||
if (init) {
|
||||
tray.setTooltip(`EasyTierGame\n${pkg.version}`);
|
||||
tray.setShowMenuOnLeftClick(false);
|
||||
tray.setMenu(await Menu.new({ id: "main", items: await generateMenuItem(beforExit, handleConnection) }));
|
||||
tray.setMenu(await Menu.new({ id: "main", items: await generateMenuItem(beforExit, handleConnection, handleReconnect) }));
|
||||
}
|
||||
|
||||
return tray;
|
||||
}
|
||||
|
||||
export async function generateMenuItem(beforExit: Function, handleConnection: Function) {
|
||||
export async function generateMenuItem(beforExit: Function, handleConnection: Function, handleReconnect: Function) {
|
||||
return [
|
||||
await MenuItemShow("显示 / 隐藏"),
|
||||
await MenuItemExchangeConnection("联机 / 断开", handleConnection),
|
||||
await MenuItemReconnect("重新联机", handleReconnect),
|
||||
await MenuItemTheme(),
|
||||
await PredefinedMenuItem.new({ item: "Separator" }),
|
||||
await MenuItemPublicPeers(),
|
||||
@@ -63,6 +64,16 @@ export async function generateMenuItem(beforExit: Function, handleConnection: Fu
|
||||
];
|
||||
}
|
||||
|
||||
export async function MenuItemReconnect(text: string, handleReconnect: Function) {
|
||||
return await MenuItem.new({
|
||||
id: "reconnect",
|
||||
text,
|
||||
action: async () => {
|
||||
await handleReconnect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export async function MenuItemExit(text: string, beforExit: Function) {
|
||||
return await MenuItem.new({
|
||||
id: "quit",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { getCurrentWindow, PhysicalPosition, type WindowOptions, Window, currentMonitor } from "@tauri-apps/api/window";
|
||||
import { getCurrentWindow, PhysicalPosition, type WindowOptions, Window, currentMonitor, PhysicalSize } from "@tauri-apps/api/window";
|
||||
import { WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import type { WebviewLabel, WebviewOptions } from "@tauri-apps/api/webview";
|
||||
import useMainStore from "@/stores/index";
|
||||
@@ -44,18 +44,21 @@ export default async (
|
||||
defaultOpts.parent = appWindow;
|
||||
// console.error(logicalPosition);
|
||||
if (defaultOpts.x == 0 && defaultOpts.y == 0) {
|
||||
const appSize = await appWindow.outerSize();
|
||||
const logicalAppSize = {
|
||||
width: 340,
|
||||
height: 305
|
||||
}
|
||||
const factor = await appWindow.scaleFactor();
|
||||
const appPosition = await appWindow.outerPosition();
|
||||
const logicalPosition = new PhysicalPosition(appPosition.x + appSize.width, appPosition.y).toLogical(factor);
|
||||
const logicalPosition = new PhysicalPosition(appPosition.x + Math.ceil((logicalAppSize.width + 5) * factor), appPosition.y).toLogical(factor);
|
||||
defaultOpts.x = logicalPosition.x;
|
||||
defaultOpts.y = logicalPosition.y;
|
||||
}
|
||||
}
|
||||
dialog = new WebviewWindow(label, { ...defaultOpts, ...options });
|
||||
await dealCloseListener(dialog, label, beforeCloseFunc);
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
} else {
|
||||
const visible = await dialog.isVisible();
|
||||
if (visible) {
|
||||
@@ -63,8 +66,8 @@ export default async (
|
||||
} else {
|
||||
const appWindow = getCurrentWindow();
|
||||
await dealCloseListener(dialog, label, beforeCloseFunc);
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
await dialog.show();
|
||||
afterCreatedFunc && (await afterCreatedFunc(dialog, appWindow));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
//屏蔽右键菜单
|
||||
document.addEventListener("contextmenu", (e: MouseEvent) => {
|
||||
const el = (e.target as HTMLElement);
|
||||
if (import.meta.env.PROD && !el.classList.contains("el-input__inner") && !el.classList.contains("el-textarea__inner")) { // 所有输入框不禁用右键
|
||||
if (import.meta.env.PROD && !el.classList.contains("el-input__inner") && !el.classList.contains("el-textarea__inner")
|
||||
&& !el.classList.contains("allow-contextmenu")) { // 所有输入框不禁用右键
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
+22
-19
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.4.6",
|
||||
"version": "1.4.8",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod",
|
||||
@@ -12,30 +12,33 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@element-plus/nuxt": "1.1.2",
|
||||
"@element-plus/nuxt": "1.1.4",
|
||||
"@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.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",
|
||||
"@pinia/nuxt": "0.11.1",
|
||||
"@tauri-apps/api": "2.7.0",
|
||||
"@tauri-apps/cli": "2.7.1",
|
||||
"@tauri-apps/plugin-cli": "2.4.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.3.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.1",
|
||||
"@tauri-apps/plugin-fs": "2.4.1",
|
||||
"@tauri-apps/plugin-log": "2.6.0",
|
||||
"@tauri-apps/plugin-shell": "2.3.0",
|
||||
"@tauri-apps/plugin-window-state": "2.4.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vitejs/plugin-vue-jsx": "4.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "5.0.1",
|
||||
"@vueuse/core": "12.7.0",
|
||||
"archiver": "^7.0.1",
|
||||
"element-plus": "2.9.11",
|
||||
"element-plus": "2.10.7",
|
||||
"less": "4.2.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "3.17.4",
|
||||
"pinia": "3.0.2",
|
||||
"pinia-plugin-persistedstate": "4.3.0",
|
||||
"nuxt": "3.18.1",
|
||||
"pinia": "3.0.3",
|
||||
"pinia-plugin-persistedstate": "4.4.1",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "3.5.2",
|
||||
"prettier-plugin-tailwindcss": "0.6.11"
|
||||
"prettier": "3.6.2",
|
||||
"prettier-plugin-tailwindcss": "0.6.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-ip": "^5.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
+58
-4
@@ -44,19 +44,43 @@
|
||||
</ElTooltip>
|
||||
</div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.enableKcpProxy">启用KCP代理</ElCheckbox>
|
||||
<ElTooltip content="将TCP流量转为KCP流量,降低传输延迟,提升传输速度">
|
||||
<ElCheckbox
|
||||
@change="handleKcpProxyChange"
|
||||
v-model="mainStore.config.enableKcpProxy"
|
||||
>
|
||||
启用KCP代理
|
||||
</ElCheckbox>
|
||||
<ElTooltip content="(不可与QUIC代理同时开启)将TCP流量转为KCP流量,降低传输延迟,提升传输速度">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.2.0" />
|
||||
</div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.disableKcpInput">禁用KCP输入</ElCheckbox>
|
||||
<ElTooltip content="禁用KCP入站流量,其他开启KCP代理的节点无法连接到本节点">
|
||||
<ElTooltip content="不允许其他节点使用 KCP 代理 TCP 流到此节点。开启 KCP 代理的节点访问此节点时,依然使用原始 TCP 连接">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.2.0" />
|
||||
</div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox
|
||||
@change="handleQuicProxyChange"
|
||||
v-model="mainStore.config.enableQuicProxy"
|
||||
>
|
||||
启用QUIC代理
|
||||
</ElCheckbox>
|
||||
<ElTooltip content="(不可与KCP代理同时开启)使用 QUIC 代理 TCP 流,提高在 UDP 丢包网络上的延迟和吞吐量">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.3.2" />
|
||||
</div>
|
||||
<div class="flex flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.disableQuicInput">禁用QUIC输入</ElCheckbox>
|
||||
<ElTooltip content="不允许其他节点使用 QUIC 代理 TCP 流到此节点。开启 QUIC 代理的节点访问此节点时,依然使用原始 TCP 连接">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.3.2" />
|
||||
</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]">
|
||||
@@ -74,6 +98,16 @@
|
||||
<CoreVersionWarning version="2.3.1" />
|
||||
</div>
|
||||
<ElDivider />
|
||||
<div class="flex w-full flex-nowrap items-center gap-[5px] mb-[3px]">
|
||||
<ElCheckbox v-model="mainStore.config.tcpWhitelistEnable">TCP端口白名单</ElCheckbox>
|
||||
<ElInput class="flex-1" v-model="mainStore.config.tcpWhitelist" placeholder="支持单个端口(80)和范围(8000-9000)" />
|
||||
<CoreVersionWarning version="2.4.2" />
|
||||
</div>
|
||||
<div class="flex w-full flex-nowrap items-center gap-[5px]">
|
||||
<ElCheckbox v-model="mainStore.config.udpWhitelistEnable">UDP端口白名单</ElCheckbox>
|
||||
<ElInput class="flex-1" v-model="mainStore.config.udpWhitelist" placeholder="支持单个端口(53)和范围(5000-6000)" />
|
||||
<CoreVersionWarning version="2.4.2" />
|
||||
</div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.disbleListenner">不监听任何端口,只连接到对等节点</ElCheckbox>
|
||||
<ElTooltip content="无法联机时,可以尝试开启这个选项">
|
||||
@@ -153,7 +187,9 @@
|
||||
配置
|
||||
</ElButton>
|
||||
</ElTooltip>
|
||||
<ElTooltip content="将本地端口转发到虚拟网络中的远程端口.如:udp://0.0.0.0:12345/10.126.126.1:23456,表示将本地UDP端口12345转发到虚拟网络中的10.126.126.1:23456.可以指定多个">
|
||||
<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.3.0" />
|
||||
@@ -386,6 +422,24 @@
|
||||
}
|
||||
};
|
||||
|
||||
const handleKcpProxyChange = () => {
|
||||
if (mainStore.config.enableKcpProxy) {
|
||||
if (mainStore.config.enableQuicProxy) {
|
||||
ElMessage.warning("KCP代理和QUIC代理不能同时开启");
|
||||
}
|
||||
mainStore.config.enableQuicProxy = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleQuicProxyChange = () => {
|
||||
if (mainStore.config.enableQuicProxy) {
|
||||
if (mainStore.config.enableKcpProxy) {
|
||||
ElMessage.warning("KCP代理和QUIC代理不能同时开启");
|
||||
}
|
||||
mainStore.config.enableKcpProxy = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 为bind_device功能增加改方法
|
||||
const getGuids = async () => {
|
||||
const guidsValue = await invoke<string[][]>("get_network_adapter_guids");
|
||||
|
||||
+227
-80
@@ -206,23 +206,40 @@
|
||||
label="局域网IP"
|
||||
>
|
||||
<template #label>
|
||||
<div class="flex h-[20px] items-center gap-[3px]">
|
||||
虚拟网IP
|
||||
<div class="flex h-[22px] items-center gap-[3px]">
|
||||
<div class="mr-[8px]">IP</div>
|
||||
<ElSwitch
|
||||
v-model="mainStore.config.dhcp"
|
||||
inline-prompt
|
||||
inactive-text="固定V4"
|
||||
active-text="动态V4"
|
||||
size="small"
|
||||
></ElSwitch>
|
||||
<ElTooltip>
|
||||
<template #content>
|
||||
<div>选填V6地址,可与IPv4一起使用以进行双栈操作</div>
|
||||
<div>----------------------------------------</div>
|
||||
<div>当前V6地址: {{ mainStore.config.ipv6 || "-" }}</div>
|
||||
</template>
|
||||
<ElButton
|
||||
text
|
||||
size="small"
|
||||
class="cursor-pointer"
|
||||
@click="handleDealIpv6"
|
||||
:type="mainStore.config.ipv6 ? 'success' : 'info'"
|
||||
>
|
||||
V6
|
||||
</ElButton>
|
||||
</ElTooltip>
|
||||
<ElDivider direction="vertical" />
|
||||
<ElButton
|
||||
@click.stop="handleCopyIp"
|
||||
type="primary"
|
||||
text
|
||||
size="small"
|
||||
title="复制IP"
|
||||
title="复制V4"
|
||||
:icon="CopyDocument"
|
||||
></ElButton>
|
||||
<ElSwitch
|
||||
v-model="mainStore.config.dhcp"
|
||||
inline-prompt
|
||||
inactive-text="固定IP"
|
||||
active-text="动态获取"
|
||||
size="small"
|
||||
></ElSwitch>
|
||||
<!-- <ElTooltip content="对应命令行参数 --ipv4">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip> -->
|
||||
@@ -272,21 +289,6 @@
|
||||
{{ !data.isStart ? "启动联机" : "停止联机" }}
|
||||
<template #dropdown>
|
||||
<ElDropdownMenu>
|
||||
<ElDropdownItem
|
||||
command="import_config"
|
||||
:icon="Link"
|
||||
>
|
||||
导入联机配置
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
command="share_config"
|
||||
:icon="Share"
|
||||
>
|
||||
分享联机配置
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem disabled>
|
||||
<ElDivider class="!m-0 !h-[2px]" />
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
:icon="SetUp"
|
||||
command="create_server"
|
||||
@@ -328,6 +330,27 @@
|
||||
>
|
||||
本地游戏列表
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem disabled>
|
||||
<ElDivider class="!m-0 !h-[2px]" />
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
command="import_config"
|
||||
:icon="Link"
|
||||
>
|
||||
导入联机配置
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
command="share_config"
|
||||
:icon="Share"
|
||||
>
|
||||
分享联机配置
|
||||
</ElDropdownItem>
|
||||
<ElDropdownItem
|
||||
command="reconnect"
|
||||
:icon="RefreshRight"
|
||||
>
|
||||
重新联机
|
||||
</ElDropdownItem>
|
||||
</ElDropdownMenu>
|
||||
</template>
|
||||
</ElDropdown>
|
||||
@@ -692,6 +715,35 @@
|
||||
</div>
|
||||
</template>
|
||||
</ElDialog>
|
||||
<ElDialog
|
||||
width="95%"
|
||||
top="30px"
|
||||
append-to-body
|
||||
:z-index="10"
|
||||
class="!mb-0"
|
||||
title="IPV6地址填写"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
v-model="ipv6InputDialog.visible"
|
||||
>
|
||||
<ElInput
|
||||
v-model="mainStore.config.ipv6"
|
||||
clearable
|
||||
placeholder="请输入IPV6地址"
|
||||
></ElInput>
|
||||
<template #footer>
|
||||
<div class="text-right">
|
||||
<ElButton
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleValidateIpv6"
|
||||
>
|
||||
确定
|
||||
</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
@@ -720,7 +772,7 @@
|
||||
import { initStartWinIpBroadcast } from "~/composables/netcard";
|
||||
import useMainStore from "@/stores/index";
|
||||
import { ElMessage, ElMessageBox, ElTooltip } from "element-plus";
|
||||
import { getCurrentWindow, type Window } from "@tauri-apps/api/window";
|
||||
import { getCurrentWindow, PhysicalSize, type Window } from "@tauri-apps/api/window";
|
||||
import { getAllWebviewWindows, WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import etWindows, { dataSubscribe } from "@/composables/windows";
|
||||
import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path";
|
||||
@@ -731,6 +783,7 @@
|
||||
import { addQQGroup, supportProtocols, preventSleep, stopPreventSleep, ATJ, copyText, isValidWindowsFileName } from "~/utils";
|
||||
import { ElConfirmDanger, ElConfirmPrimary } from "~/utils/element";
|
||||
import { getServerArgs } from "@/composables/server";
|
||||
import { isIPv6 } from "is-ip";
|
||||
|
||||
let is_close = false;
|
||||
const publicPeersLink = import.meta.env.VITE_PUBLIC_PEERS_URL;
|
||||
@@ -746,6 +799,9 @@
|
||||
async () => {
|
||||
await handleConnection();
|
||||
return data.isStart;
|
||||
},
|
||||
async () => {
|
||||
await handleReconnect();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -814,12 +870,54 @@
|
||||
}
|
||||
};
|
||||
|
||||
const ipv6InputDialog = reactive<{ visible: boolean; [key: string]: any }>({
|
||||
visible: false
|
||||
});
|
||||
|
||||
const handleDealIpv6 = async () => {
|
||||
ipv6InputDialog.visible = true;
|
||||
};
|
||||
|
||||
const handleValidateIpv6 = () => {
|
||||
mainStore.config.ipv6 = mainStore.config.ipv6?.trim() || "";
|
||||
if (mainStore.config.ipv6 && !isIPv6(mainStore.config.ipv6)) {
|
||||
ElMessage.error("请输入正确的IPV6地址");
|
||||
return;
|
||||
}
|
||||
ipv6InputDialog.visible = false;
|
||||
};
|
||||
|
||||
const handleCopyIp = async () => {
|
||||
if (!mainStore.config.ipv4?.trim()) return;
|
||||
if (data.isStart || !mainStore.config.dhcp) {
|
||||
await copyText(mainStore.config.ipv4);
|
||||
const v6 = mainStore.config.ipv6?.trim();
|
||||
const v4 = mainStore.config.ipv4?.trim();
|
||||
if (v6) {
|
||||
const [err] = await ElConfirmPrimary("检测到您填写了IPV6地址,是否复制IPV6地址?", "提示", {
|
||||
confirmButtonText: "复制IPV6",
|
||||
cancelButtonText: "复制IPV4"
|
||||
});
|
||||
if (!err) {
|
||||
await copyText(v6);
|
||||
} else {
|
||||
if (!v4) {
|
||||
ElMessage.error("没有IPV4地址,无法复制");
|
||||
return;
|
||||
}
|
||||
if (data.isStart || !mainStore.config.dhcp) {
|
||||
await copyText(v4);
|
||||
} else {
|
||||
await copyText(v4, "复制成功,联机后IP可能会变化");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
await copyText(mainStore.config.ipv4, "复制成功,联机后IP可能会变化");
|
||||
if (!v4) {
|
||||
ElMessage.error("没有IPV4地址,无法复制");
|
||||
return;
|
||||
}
|
||||
if (data.isStart || !mainStore.config.dhcp) {
|
||||
await copyText(v4);
|
||||
} else {
|
||||
await copyText(v4, "复制成功,联机后IP可能会变化");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1085,8 +1183,8 @@
|
||||
const list = await invoke<string[][][]>("fetch_easytier_list");
|
||||
data.releaseList = [
|
||||
...list.flat().filter(el => {
|
||||
// console.log(el, el[0], el[2]);
|
||||
return el && el[0] && el[2] && !el[2].includes("gui");
|
||||
// console.log(el, el[0], el[2], el[3]); // el[3] 是prerelease bool值
|
||||
return el && el[0] && el[2] && !el[2].includes("gui") && (el[3] != "true" || !el[3]);
|
||||
})
|
||||
] as any;
|
||||
coreManagementData.loading = false;
|
||||
@@ -1119,25 +1217,23 @@
|
||||
}
|
||||
};
|
||||
|
||||
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 compatibleIpv6Listener = async () => {
|
||||
// // ipv6监听在后续版本合并到customListenner里了,这里做兼容处理,去掉IPV6监听
|
||||
// const customListenerV4 = mainStore.config.customListenerData
|
||||
// .trim()
|
||||
// .split("\n")
|
||||
// .map(el => el.trim())
|
||||
// .filter(el => el);
|
||||
// const udpv6 = customListenerV4.indexOf("udp://[::]:11010")
|
||||
// const tcpv6 = customListenerV4.indexOf("tcp://[::]:11010")
|
||||
// if (udpv6 != -1) {
|
||||
// customListenerV4.splice(udpv6, 1);
|
||||
// }
|
||||
// if (tcpv6 != -1) {
|
||||
// customListenerV4.splice(tcpv6, 1);
|
||||
// }
|
||||
// mainStore.config.customListenerData = customListenerV4.join("\n");
|
||||
// };
|
||||
|
||||
const initConnectAfterStart = async () => {
|
||||
if (mainStore.config.connectAfterStart && data.coreVersion) {
|
||||
@@ -1174,6 +1270,10 @@
|
||||
saveServerUrl = mainStore.basePeers.length > 0 ? mainStore.basePeers[0] || "" : "";
|
||||
}
|
||||
data.configJsonSeverUrl = guiJson.serverUrl;
|
||||
if (guiJson.enableKcpProxy && guiJson.enableQuicProxy) {
|
||||
// 如果同时开启kcp代理和quic代理,则禁用quic代理
|
||||
guiJson.enableQuicProxy = false;
|
||||
}
|
||||
mainStore.$patch({
|
||||
config: {
|
||||
...mainStore.config,
|
||||
@@ -1224,6 +1324,18 @@
|
||||
await appWindow.show();
|
||||
await appWindow.setFocus();
|
||||
}
|
||||
const appWindow = getCurrentWindow();
|
||||
const logicalAppSize = {
|
||||
width: 340,
|
||||
height: 305
|
||||
};
|
||||
const scaleFactor = await appWindow.scaleFactor();
|
||||
const size = new PhysicalSize(Math.ceil(logicalAppSize.width * scaleFactor), Math.ceil(logicalAppSize.height * scaleFactor));
|
||||
appWindow.setSize(size);
|
||||
appWindow.onScaleChanged(({ payload: { scaleFactor } }) => {
|
||||
console.log("scaleFactor", scaleFactor);
|
||||
appWindow.setSize(new PhysicalSize(Math.ceil(logicalAppSize.width * scaleFactor), Math.ceil(logicalAppSize.height * scaleFactor)));
|
||||
});
|
||||
};
|
||||
|
||||
let logsTimer: NodeJS.Timeout | null = null;
|
||||
@@ -1234,8 +1346,7 @@
|
||||
await initGuiJson();
|
||||
await compatibleInitAutoStart();
|
||||
// await initAutoStart();
|
||||
await initStartWinIpBroadcast();
|
||||
await compatibleIpv6Listener();
|
||||
// await initStartWinIpBroadcast(); // 对于三层tun而言,winipbroadcast没有作用,先禁用
|
||||
await getCoreVersion();
|
||||
await listenObj.listenThreadId();
|
||||
await listenObj.listenServerThreadId();
|
||||
@@ -1348,9 +1459,7 @@
|
||||
args.push("-l", ...customListener);
|
||||
}
|
||||
}
|
||||
if (!mainStore.config.disbleListenner && mainStore.config.enableCustomListenerV6 && mainStore.config.customListenerV6Data) {
|
||||
args.push("--ipv6-listener", mainStore.config.customListenerV6Data);
|
||||
}
|
||||
|
||||
if (!mainStore.config.disbleListenner && !mainStore.config.enableCustomListener && mainStore.config.port) {
|
||||
args.push("-l", mainStore.config.port);
|
||||
}
|
||||
@@ -1400,10 +1509,16 @@
|
||||
args.push("--compression", mainStore.config.compression);
|
||||
}
|
||||
if (mainStore.config.enableKcpProxy) {
|
||||
args.push("--enable-kcp-proxy");
|
||||
args.push("--enable-kcp-proxy", "true");
|
||||
}
|
||||
if (mainStore.config.disableKcpInput) {
|
||||
args.push("--disable-kcp-input");
|
||||
args.push("--disable-kcp-input", "true");
|
||||
}
|
||||
if (mainStore.config.enableQuicProxy) {
|
||||
args.push("--enable-quic-proxy", "true");
|
||||
}
|
||||
if (mainStore.config.disableQuicInput) {
|
||||
args.push("--disable-quic-input", "true");
|
||||
}
|
||||
if (mainStore.config.bindDeviceEnable) {
|
||||
args.push("--bind-device", "true");
|
||||
@@ -1423,9 +1538,20 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
if(mainStore.config.privateMode) {
|
||||
if (mainStore.config.privateMode) {
|
||||
args.push("--private-mode", "true");
|
||||
}
|
||||
if (mainStore.config.ipv6 && !mainStore.config.disableIpv6) {
|
||||
args.push("--ipv6", mainStore.config.ipv6.trim());
|
||||
}
|
||||
const tcpWhitelist = mainStore.config.tcpWhitelist.trim();
|
||||
if (mainStore.config.tcpWhitelistEnable && tcpWhitelist) {
|
||||
args.push("--tcp-whitelist", tcpWhitelist);
|
||||
}
|
||||
const udpWhitelist = mainStore.config.udpWhitelist.trim();
|
||||
if (mainStore.config.udpWhitelistEnable && udpWhitelist) {
|
||||
args.push("--udp-whitelist", udpWhitelist);
|
||||
}
|
||||
return args;
|
||||
};
|
||||
|
||||
@@ -1520,8 +1646,6 @@
|
||||
port,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
enableCustomListenerV6,
|
||||
customListenerV6Data,
|
||||
devName,
|
||||
devNameValue,
|
||||
enableNetCardMetric,
|
||||
@@ -1535,6 +1659,8 @@
|
||||
enablePreventSleep,
|
||||
enableKcpProxy,
|
||||
disableKcpInput,
|
||||
enableQuicProxy,
|
||||
disableQuicInput,
|
||||
privateMode
|
||||
} = mainStore.config;
|
||||
const WT = btoa(
|
||||
@@ -1554,8 +1680,6 @@
|
||||
port,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
enableCustomListenerV6,
|
||||
customListenerV6Data,
|
||||
devName,
|
||||
devNameValue,
|
||||
enableNetCardMetric,
|
||||
@@ -1569,6 +1693,8 @@
|
||||
enablePreventSleep,
|
||||
enableKcpProxy,
|
||||
disableKcpInput,
|
||||
enableQuicProxy,
|
||||
disableQuicInput,
|
||||
privateMode
|
||||
}
|
||||
})
|
||||
@@ -1688,6 +1814,25 @@
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (command === "reconnect") {
|
||||
handleReconnect();
|
||||
}
|
||||
};
|
||||
|
||||
const handleReconnect = async () => {
|
||||
if (data.isStart) {
|
||||
ElMessage.info({
|
||||
message: "正在重新联机...",
|
||||
duration: 2200
|
||||
});
|
||||
await handleConnection();
|
||||
setTimeout(() => {
|
||||
handleConnection();
|
||||
}, 2000);
|
||||
} else {
|
||||
handleConnection();
|
||||
}
|
||||
};
|
||||
|
||||
const handleDeleteAdminConfig = async () => {
|
||||
@@ -1926,24 +2071,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();
|
||||
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,
|
||||
visible: false,
|
||||
url: "#/storage-listener"
|
||||
},
|
||||
|
||||
dialog => {
|
||||
dialog.hide();
|
||||
}
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
+120
-8
@@ -1,27 +1,139 @@
|
||||
<template>
|
||||
<ElInput
|
||||
<!-- <ElInput
|
||||
type="textarea"
|
||||
:rows="17"
|
||||
v-model="data.log"
|
||||
v-model="data.originLog"
|
||||
resize="none"
|
||||
readonly
|
||||
placeholder="等待日志中,请先'启动联机'..."
|
||||
/>
|
||||
/> -->
|
||||
<div
|
||||
ref="logRef"
|
||||
@scroll="handleScroll"
|
||||
class="overflow-auto"
|
||||
>
|
||||
<div v-if="!data.log || data.log.length <= 0" class="p-[5px]">
|
||||
<ElText type="info">等待日志中,请先'启动联机'...</ElText>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
v-for="item in data.log"
|
||||
:key="item.id"
|
||||
class="p-[5px]"
|
||||
>
|
||||
<div class="group/item flex items-center justify-start leading-[26px]">
|
||||
<ElText
|
||||
:closable="false"
|
||||
:type="item.type"
|
||||
>
|
||||
{{ item.text }}
|
||||
<ElTooltip
|
||||
placement="right"
|
||||
content="复制"
|
||||
>
|
||||
<ElButton
|
||||
class="ml-[3px] !hidden w-fit group-hover/item:!inline-flex"
|
||||
@click.stop="handleCopyLog(item.text)"
|
||||
type="success"
|
||||
size="small"
|
||||
circle
|
||||
plain
|
||||
:icon="CopyDocument"
|
||||
></ElButton>
|
||||
</ElTooltip>
|
||||
</ElText>
|
||||
</div>
|
||||
</div>
|
||||
<ElAffix
|
||||
v-if="data.originLog"
|
||||
class="w-full"
|
||||
position="bottom"
|
||||
:offset="10"
|
||||
>
|
||||
<div class="bg-(var(--el-color-primary)) mr-[10px] flex items-center justify-end">
|
||||
<ElTooltip
|
||||
content="复制全部"
|
||||
placement="top"
|
||||
>
|
||||
<ElButton
|
||||
@click.stop="handleCopyLog(data.originLog)"
|
||||
type="info"
|
||||
size="large"
|
||||
circle
|
||||
:icon="CopyDocument"
|
||||
></ElButton>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
</ElAffix>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { CopyDocument } from "@element-plus/icons-vue";
|
||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { reactive, onMounted, onBeforeUnmount } from "vue";
|
||||
const data = reactive({
|
||||
log: ""
|
||||
import { reactive, onMounted, onBeforeUnmount, useTemplateRef, nextTick } from "vue";
|
||||
import { copyText } from "~/utils";
|
||||
type LogItem = { id: string; text: string; type: "danger" | "info" | "warning" | "primary" };
|
||||
const data = reactive<{ log: LogItem[]; originLog: string; autoScrollToBottom: boolean }>({
|
||||
log: [],
|
||||
originLog: "", // 原始日志
|
||||
autoScrollToBottom: true // 是否允许自动滚动到底部
|
||||
});
|
||||
|
||||
const logEl = useTemplateRef<HTMLDivElement>("logRef");
|
||||
|
||||
const scrollToBottom = () => {
|
||||
if (data.autoScrollToBottom) {
|
||||
logEl.value?.scrollTo({
|
||||
top: logEl.value?.scrollHeight,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleScroll = () => {
|
||||
if (logEl.value) {
|
||||
const autoScrollToBottom = logEl.value.scrollTop + logEl.value.clientHeight >= logEl.value.scrollHeight;
|
||||
data.autoScrollToBottom = autoScrollToBottom;
|
||||
}
|
||||
};
|
||||
|
||||
const listenStart = async () => {
|
||||
const unListen = await listen<string>("logs", event => {
|
||||
data.log = event.payload || "";
|
||||
const unListen = await listen<string>("logs", async event => {
|
||||
const payload = event.payload || "";
|
||||
if (data.originLog === payload) return;
|
||||
data.originLog = payload;
|
||||
data.log = payload
|
||||
.split("\n")
|
||||
.filter(text => text.trim())
|
||||
.map((text, idx) => {
|
||||
const toLowerCaseText = text.toLocaleLowerCase();
|
||||
return {
|
||||
id: `${text}-${idx}`,
|
||||
text,
|
||||
type:
|
||||
toLowerCaseText.includes("error") ||
|
||||
toLowerCaseText.includes("fail") ||
|
||||
toLowerCaseText.includes("failed") ||
|
||||
toLowerCaseText.includes("exception") ||
|
||||
toLowerCaseText.includes("err")
|
||||
? "danger"
|
||||
: toLowerCaseText.includes("warn")
|
||||
? "warning"
|
||||
: toLowerCaseText.includes("new peer connection")
|
||||
? "primary"
|
||||
: "info"
|
||||
};
|
||||
});
|
||||
await nextTick();
|
||||
scrollToBottom();
|
||||
});
|
||||
return unListen;
|
||||
};
|
||||
|
||||
const handleCopyLog = async (text: string) => {
|
||||
await copyText(text, "复制记录成功");
|
||||
};
|
||||
|
||||
let unlistenStart: UnlistenFn | null = null;
|
||||
onMounted(async () => {
|
||||
unlistenStart = await listenStart();
|
||||
|
||||
+86
-8
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex flex-col gap-[10px] h-full">
|
||||
<div class="flex h-full flex-col gap-[10px]">
|
||||
<ElForm
|
||||
size="small"
|
||||
label-position="top"
|
||||
@@ -8,7 +8,7 @@
|
||||
<ElFormItem
|
||||
label="白名单"
|
||||
prop="ServerWhiteList"
|
||||
class="full-label full-content overflow-hidden !flex flex-col h-full !mb-[0]"
|
||||
class="full-label full-content !mb-[0] !flex h-full flex-col overflow-hidden"
|
||||
>
|
||||
<template #label>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
@@ -31,7 +31,12 @@
|
||||
placement="top"
|
||||
content="启用后,不允许使用了与本网络不同的房间名和密码的节点通过本节点进行握手或中转"
|
||||
>
|
||||
<ElCheckbox v-model="mainStore.serverConfig.privateMode">私有模式</ElCheckbox>
|
||||
<ElCheckbox
|
||||
@click.stop="handlePrivateModeClick"
|
||||
:model-value="mainStore.serverConfig.privateMode"
|
||||
>
|
||||
私有模式
|
||||
</ElCheckbox>
|
||||
</ElTooltip>
|
||||
<ElTooltip
|
||||
placement="top"
|
||||
@@ -42,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="h-full w-full flex flex-col overflow-hidden">
|
||||
<div class="flex h-full w-full flex-col overflow-hidden">
|
||||
<div class="flex-1 overflow-auto">
|
||||
<ElInput
|
||||
:disabled="!mainStore.serverConfig.enableWhiteList"
|
||||
@@ -76,6 +81,58 @@
|
||||
</ElButton>
|
||||
</div>
|
||||
|
||||
<ElDialog
|
||||
v-model="privateModeDialogData.visible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
title="私有模式"
|
||||
:show-close="false"
|
||||
width="300px"
|
||||
>
|
||||
<ElAlert
|
||||
type="primary"
|
||||
:closable="false"
|
||||
>
|
||||
建议为服务器设置一个房间名和密码
|
||||
</ElAlert>
|
||||
<div class="h-[15px]"></div>
|
||||
<ElForm
|
||||
:model="mainStore.serverConfig"
|
||||
label-position="top"
|
||||
>
|
||||
<ElFormItem
|
||||
label="房间名"
|
||||
prop="privateNetworkName"
|
||||
>
|
||||
<ElInput
|
||||
clearable
|
||||
placeholder="请输入房间名 (默认为default)"
|
||||
v-model="mainStore.serverConfig.privateNetworkName"
|
||||
></ElInput>
|
||||
</ElFormItem>
|
||||
<ElFormItem
|
||||
label="密码"
|
||||
prop="privateNetworkPassword"
|
||||
>
|
||||
<ElInput
|
||||
clearable
|
||||
type="password"
|
||||
show-password
|
||||
placeholder="请输入密码 (可选)"
|
||||
v-model="mainStore.serverConfig.privateNetworkPassword"
|
||||
></ElInput>
|
||||
</ElFormItem>
|
||||
</ElForm>
|
||||
<template #footer>
|
||||
<ElButton
|
||||
type="primary"
|
||||
@click="handlePrivateModeDialogConfirm"
|
||||
>
|
||||
继续启用
|
||||
</ElButton>
|
||||
</template>
|
||||
</ElDialog>
|
||||
|
||||
<ElInput
|
||||
placeholder="服务器日志"
|
||||
:model-value="data.log"
|
||||
@@ -87,13 +144,14 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import useMainStore from "@/stores/index";
|
||||
import { reactive, onMounted, onBeforeUnmount } from "vue";
|
||||
import { reactive, onMounted, onBeforeUnmount, useTemplateRef, nextTick } from "vue";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { getServerArgs } from "@/composables/server";
|
||||
import { dataSubscribe } from "@/composables/windows";
|
||||
import { ElMessage, type FormInstance } from "element-plus";
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
const appWindow = getCurrentWindow();
|
||||
const mainStore = useMainStore();
|
||||
const data = reactive({
|
||||
log: "",
|
||||
@@ -125,10 +183,30 @@
|
||||
|
||||
const hanldeClickStart = async () => {
|
||||
data.loading = true;
|
||||
const args = getServerArgs();
|
||||
const args = getServerArgs();
|
||||
await appWindow.emitTo("main", "startStopServer", { args });
|
||||
};
|
||||
|
||||
dataSubscribe();
|
||||
// const privateModeDialogFormEl = useTemplateRef<FormInstance>("privateModeDialogFormRef");
|
||||
|
||||
const privateModeDialogData = reactive({
|
||||
visible: false
|
||||
});
|
||||
|
||||
|
||||
const handlePrivateModeClick = async () => {
|
||||
if (mainStore.serverConfig.privateMode) {
|
||||
mainStore.serverConfig.privateMode = false;
|
||||
return;
|
||||
}
|
||||
privateModeDialogData.visible = true;
|
||||
};
|
||||
|
||||
const handlePrivateModeDialogConfirm = async () => {
|
||||
privateModeDialogData.visible = false;
|
||||
mainStore.serverConfig.privateMode = true;
|
||||
|
||||
};
|
||||
|
||||
dataSubscribe();
|
||||
</script>
|
||||
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
name="netcard"
|
||||
class="flex h-full flex-col"
|
||||
>
|
||||
<div>
|
||||
<!-- <div>
|
||||
<div>
|
||||
<ElTooltip
|
||||
content="找不到游戏房间时,就开启它后再尝试搜索房间(默认开启)
|
||||
@@ -39,13 +39,13 @@
|
||||
active-text="已开启"
|
||||
inactive-text="已关闭"
|
||||
></ElSwitch>
|
||||
</div>
|
||||
</div> -->
|
||||
<div>
|
||||
<ElTooltip
|
||||
content="使用ForceBindIP启动应用 (强制绑定IP或者网卡),如果还没有启动联机,请先启动联机,联机成功后,点击刷新获取easytier生成的网卡"
|
||||
>
|
||||
<ElText>
|
||||
方案2
|
||||
方案1
|
||||
<ElIcon class="ml-[3px]"><QuestionFilled /></ElIcon>
|
||||
</ElText>
|
||||
</ElTooltip>
|
||||
@@ -131,7 +131,7 @@
|
||||
<div>
|
||||
<ElTooltip content="设置网卡的跃点,提升网卡优先级,尝试将您联机使用的网卡跃点设置为最小,请先查询网卡信息">
|
||||
<ElText>
|
||||
方案3
|
||||
方案2
|
||||
<ElIcon class="ml-[3px]"><QuestionFilled /></ElIcon>
|
||||
</ElText>
|
||||
</ElTooltip>
|
||||
@@ -502,7 +502,7 @@
|
||||
|
||||
onMounted(() => {
|
||||
data.pingIp = mainStore.config.ipv4;
|
||||
initStartWinIpBroadcast();
|
||||
// initStartWinIpBroadcast();
|
||||
getGuids();
|
||||
});
|
||||
|
||||
|
||||
Generated
+2667
-2669
File diff suppressed because it is too large
Load Diff
Generated
+1215
-1368
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.4.6"
|
||||
version = "1.4.8"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
@@ -18,7 +18,7 @@ name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
tauri-build = { version = "2.3.1", features = [] }
|
||||
# prost-build = "0.13.2"
|
||||
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
@@ -28,34 +28,34 @@ thunk-rs = { git = "https://github.com/easytier/thunk.git", default-features = f
|
||||
serde_json = "1.0.137"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
log = "0.4.26"
|
||||
tauri = { version = "2.5.1", features = [ "protocol-asset",
|
||||
tauri = { version = "2.7.0", features = [ "protocol-asset",
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
"image-ico"
|
||||
] }
|
||||
|
||||
tauri-plugin-log = "2.3.1"
|
||||
tauri-plugin-shell = "2.2.1"
|
||||
tauri-plugin-log = "2.6.0"
|
||||
tauri-plugin-shell = "2.3.0"
|
||||
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" }
|
||||
whoami = "1.5.2"
|
||||
tauri-plugin-fs = "2.3.0"
|
||||
tauri-plugin-clipboard-manager = "2.2.2"
|
||||
tauri-plugin-fs = "2.4.1"
|
||||
tauri-plugin-clipboard-manager = "2.3.0"
|
||||
rand = "0.9.0"
|
||||
tokio = { version = "1.45.1", features = ["process"] }
|
||||
tauri-plugin-dialog = "2.2.2"
|
||||
tauri-plugin-dialog = "2.3.1"
|
||||
# prost = "0.13"
|
||||
# prost-types = "0.13"
|
||||
hashbrown = "0.15.2"
|
||||
# futures-util = "0.3"
|
||||
|
||||
[dependencies.windows]
|
||||
version = "0.58.0"
|
||||
version = "0.61.3"
|
||||
features = ["Win32_System_TaskScheduler", "Win32_System_Com", "Win32_System_Power", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock"]
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-cli = "2.2.0"
|
||||
tauri-plugin-single-instance = "2.2.4"
|
||||
tauri-plugin-window-state = "2.2.2"
|
||||
tauri-plugin-cli = "2.4.0"
|
||||
tauri-plugin-single-instance = "2.3.2"
|
||||
tauri-plugin-window-state = "2.4.0"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"core:tray:allow-get-by-id",
|
||||
"core:tray:allow-set-icon",
|
||||
"core:tray:allow-new",
|
||||
"core:window:allow-set-size",
|
||||
{
|
||||
"identifier": "shell:allow-spawn",
|
||||
"allow": [
|
||||
|
||||
@@ -9,16 +9,13 @@
|
||||
"enableCustomListener": true,
|
||||
"customListenerData": [
|
||||
"tcp://0.0.0.0:11010",
|
||||
"udp://0.0.0.0:11010",
|
||||
"tcp://[::]:11010"
|
||||
"udp://0.0.0.0:11010"
|
||||
],
|
||||
"networkName": "", //房间名
|
||||
"networkPassword": "", //房间密码
|
||||
"hostname": "", //主机名
|
||||
"ipv4": "", // 虚拟IP地址
|
||||
"disableIpv6": false, // 禁用ipv6
|
||||
"enableCustomListenerV6": true, // 启用ipv6监听
|
||||
"customListenerV6Data": "udp://[::]:11010", // ipv6监听地址
|
||||
"disbleListenner": false, // 禁用监听
|
||||
"disableEncryption": false, // 禁用加密
|
||||
"enablExitNode": false, // 启用出口节点
|
||||
@@ -35,7 +32,9 @@
|
||||
"netCardMetricValue": 1, // 网卡跃点
|
||||
"enablePreventSleep": false, // 启用防止睡眠
|
||||
"compression": "none", // 压缩算法
|
||||
"enableKcpProxy": true, // 启用kcp代理
|
||||
"enableKcpProxy": true, // 启用kcp代理,就不能启用quic代理
|
||||
"disableKcpInput": false, // 禁用kcp输入
|
||||
"enableQuicProxy": false, // 启用quic代理,就不能启用kcp代理
|
||||
"disableQuicInput": false, // 禁用quic输入
|
||||
"privateMode": false // 启用私有模式
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
+34
-25
@@ -13,7 +13,8 @@ use sysinfo::System;
|
||||
use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent};
|
||||
use tauri::Emitter;
|
||||
use tauri::Manager;
|
||||
use windows::core::{Interface, BSTR, VARIANT};
|
||||
use windows::Win32::System::Variant::VARIANT;
|
||||
use windows::core::{Interface, BSTR};
|
||||
use windows::Win32::Foundation::VARIANT_BOOL;
|
||||
use windows::Win32::NetworkManagement::IpHelper::{
|
||||
GetAdaptersAddresses, GAA_FLAG_INCLUDE_PREFIX, IP_ADAPTER_ADDRESSES_LH,
|
||||
@@ -322,7 +323,11 @@ async fn get_route_by_cli() -> String {
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
async fn download_easytier_zip(app_handle: tauri::AppHandle ,download_url: String, file_name: String) {
|
||||
async fn download_easytier_zip(
|
||||
app_handle: tauri::AppHandle,
|
||||
download_url: String,
|
||||
file_name: String,
|
||||
) {
|
||||
let cache_dir_path = get_tool_exe_path("\\easytier\\cache");
|
||||
let cache_file_name = format!("{}\\{}", cache_dir_path, file_name);
|
||||
let cache_file_name_path = path::Path::new(&cache_file_name);
|
||||
@@ -355,14 +360,18 @@ async fn download_easytier_zip(app_handle: tauri::AppHandle ,download_url: Strin
|
||||
while let Some(item) = response.chunk().await.unwrap() {
|
||||
match file.write_all(&item) {
|
||||
Ok(_) => {
|
||||
app_handle.emit("download_core_progress", [item.len() as u64, context_size]).expect("error to emit download_core_progress");
|
||||
},Err(why) => {
|
||||
app_handle
|
||||
.emit("download_core_progress", [item.len() as u64, context_size])
|
||||
.expect("error to emit download_core_progress");
|
||||
}
|
||||
Err(why) => {
|
||||
log::error!("error to write file: {}", why);
|
||||
app_handle.emit("download_core_progress_error", why.to_string()).expect("error to emit download_core_progress_error");
|
||||
return
|
||||
app_handle
|
||||
.emit("download_core_progress_error", why.to_string())
|
||||
.expect("error to emit download_core_progress_error");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
println!("下载完成");
|
||||
unzip(path);
|
||||
@@ -512,18 +521,19 @@ fn stop_command(child_id: u32) {
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
async fn fetch_easytier_list() -> Vec<Vec<[String; 3]>> {
|
||||
async fn fetch_easytier_list() -> Vec<Vec<[String; 4]>> {
|
||||
// 获取release列表
|
||||
if let Ok(release) = fetch_releases().await {
|
||||
let mut release_list = Vec::new();
|
||||
let mut release_list: Vec<Vec<[String; 4]>> = Vec::new();
|
||||
for re in release {
|
||||
let mut assets_list = Vec::new();
|
||||
let mut assets_list: Vec<[String; 4]> = Vec::new();
|
||||
for asset in re.assets {
|
||||
if asset.name.contains("windows-x86_64") {
|
||||
assets_list.push([
|
||||
re.tag_name.clone(),
|
||||
asset.name.clone(),
|
||||
asset.browser_download_url.clone(),
|
||||
re.prerelease.to_string(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -661,11 +671,11 @@ fn ensure_task_folder_and_cleanup(
|
||||
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);
|
||||
@@ -738,23 +748,23 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
&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)?;
|
||||
@@ -763,14 +773,13 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
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 settings = task_definition.Settings()?;
|
||||
settings.SetEnabled(VARIANT_BOOL::from(true))?;
|
||||
@@ -778,12 +787,12 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
settings.SetStartWhenAvailable(VARIANT_BOOL::from(true))?;
|
||||
// settings.SetHidden(VARIANT_BOOL::from(true))?; // 注释掉让任务可见
|
||||
settings.SetExecutionTimeLimit(&BSTR::from("PT0S"))?;
|
||||
settings.SetDisallowStartIfOnBatteries(VARIANT_BOOL(0))?; // 允许在电池供电时启动
|
||||
|
||||
|
||||
|
||||
// 获取文件夹并注册任务
|
||||
let task_folder = ensure_task_folder_and_cleanup(&task_service, &folder_path, &task_name)?;
|
||||
|
||||
let task_folder =
|
||||
ensure_task_folder_and_cleanup(&task_service, &folder_path, &task_name)?;
|
||||
|
||||
let _auto_task = task_folder.RegisterTaskDefinition(
|
||||
&task_name,
|
||||
&task_definition,
|
||||
@@ -791,9 +800,9 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
&VARIANT::default(),
|
||||
&VARIANT::default(),
|
||||
TASK_LOGON_INTERACTIVE_TOKEN,
|
||||
&VARIANT::default()
|
||||
&VARIANT::default(),
|
||||
)?;
|
||||
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.4.6",
|
||||
"version": "1.4.8",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -12,14 +12,14 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.4.6",
|
||||
"title": "easytier-game 1.4.8",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
"height": 305,
|
||||
"minHeight": 305,
|
||||
"maxHeight": 305,
|
||||
"maxWidth": 360,
|
||||
"maxHeight": 405,
|
||||
"maxWidth": 460,
|
||||
"resizable": true,
|
||||
"fullscreen": false,
|
||||
"decorations": true,
|
||||
|
||||
+20
-5
@@ -12,15 +12,18 @@ const store = defineStore("main", {
|
||||
networkPassword: "",
|
||||
hostname: "",
|
||||
ipv4: "",
|
||||
ipv6:"",
|
||||
tcpWhitelistEnable: false, // tcp端口白名单
|
||||
udpWhitelistEnable: false, // udp端口白名单
|
||||
tcpWhitelist: "", // tcp端口白名单
|
||||
udpWhitelist: "", // udp端口白名单
|
||||
proxyNetworks: "", // 子网代理
|
||||
autoStart: false, // 是否自动启动
|
||||
connectAfterStart: false, //软件打开后,是否自动连接
|
||||
disableIpv6: false, // 是否禁用IPv6
|
||||
port: "11010", // 监听端口号
|
||||
enableCustomListener: true, // 是否自定义监听
|
||||
enableCustomListenerV6: true, // 是否自定义IPV6监听
|
||||
customListenerV6Data: "udp://[::]:11010", //自定义ipv6监
|
||||
customListenerData: "tcp://0.0.0.0:11010\nudp://0.0.0.0:11010\ntcp://[::]:11010", // 自定义监听地址
|
||||
customListenerData: "tcp://0.0.0.0:11010\nudp://0.0.0.0:11010", // 自定义监听地址
|
||||
disbleListenner: false, // 是否禁用监听
|
||||
disableEncryption: false, // 是否禁用加密
|
||||
multiThread: false, //使用多线程
|
||||
@@ -44,6 +47,8 @@ const store = defineStore("main", {
|
||||
compression: "none", //加密算法
|
||||
enableKcpProxy: true, //启用kcp代理 默认开启
|
||||
disableKcpInput: false, //禁用kcp输入
|
||||
enableQuicProxy: false, //启用quic代理 默认开启
|
||||
disableQuicInput: false, //禁用quic输入
|
||||
bindDeviceEnable: false, //是否绑定设备
|
||||
acceptDNS: false, //魔法dns
|
||||
privateMode: false, //是否启用私有模式
|
||||
@@ -59,6 +64,8 @@ const store = defineStore("main", {
|
||||
autoStart: false, //随软件自启
|
||||
port: "11010", // 服务器端口
|
||||
privateMode: false, //是否启用私有模式
|
||||
privateNetworkName: "", // 私有模式房间名
|
||||
privateNetworkPassword: "", // 私有模式密码
|
||||
},
|
||||
cidrEnable: false,
|
||||
proxyForwardBySystem: false, // 是否通过系统内核转发子网代理数据包,禁用内置NAT
|
||||
@@ -92,6 +99,7 @@ const store = defineStore("main", {
|
||||
"config.networkPassword",
|
||||
"config.hostname",
|
||||
"config.ipv4",
|
||||
"config.ipv6",
|
||||
"config.proxyNetworks",
|
||||
"config.autoStart",
|
||||
"config.connectAfterStart",
|
||||
@@ -113,6 +121,10 @@ const store = defineStore("main", {
|
||||
"config.enableNetCardMetric",
|
||||
"config.netCardMetricValue",
|
||||
"config.port",
|
||||
"config.tcpWhitelist",
|
||||
"config.udpWhitelist",
|
||||
"config.tcpWhitelistEnable",
|
||||
"config.udpWhitelistEnable",
|
||||
|
||||
"config.enablePortForward",
|
||||
"config.portForwardData",
|
||||
@@ -120,8 +132,6 @@ const store = defineStore("main", {
|
||||
"config.disbleListenner",
|
||||
"config.enableCustomListener",
|
||||
"config.customListenerData",
|
||||
"config.enableCustomListenerV6",
|
||||
"config.customListenerV6Data",
|
||||
|
||||
"config.enableCustomProtocol",
|
||||
"config.customProtocol",
|
||||
@@ -130,6 +140,9 @@ const store = defineStore("main", {
|
||||
|
||||
"config.enableKcpProxy",
|
||||
"config.disableKcpInput",
|
||||
"config.enableQuicProxy",
|
||||
"config.disableQuicInput",
|
||||
|
||||
|
||||
"config.bindDeviceEnable",
|
||||
|
||||
@@ -144,6 +157,8 @@ const store = defineStore("main", {
|
||||
"serverConfig.serverWhiteList",
|
||||
"serverConfig.port",
|
||||
"serverConfig.privateMode",
|
||||
"serverConfig.privateNetworkName",
|
||||
"serverConfig.privateNetworkPassword",
|
||||
|
||||
"cidrEnable",
|
||||
"proxyForwardBySystem",
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ export const ATJ = (promise: Promise<any>, errorExt: string | undefined = undefi
|
||||
});
|
||||
};
|
||||
|
||||
const _supportProtocols = ["tcp", "udp", "ws", "wss", "quic"];
|
||||
const _supportProtocols = ["tcp", "udp", "ws", "wss"];
|
||||
|
||||
export const supportProtocols = () => {
|
||||
return _supportProtocols.slice();
|
||||
|
||||
Reference in New Issue
Block a user