mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d4a44740a | ||
|
|
f0633761a0 | ||
|
|
4bedec63ca | ||
|
|
ab67ba94a3 |
+2
-4
@@ -10,7 +10,5 @@ dist
|
||||
.idea
|
||||
.vscode
|
||||
release
|
||||
src-tauri/easytier-cli.exe
|
||||
src-tauri/easytier-core.exe
|
||||
src-tauri/Packet.dll
|
||||
src-tauri/wintun.dll
|
||||
|
||||
src-tauri/easytier/logs
|
||||
+41
-12
@@ -1,16 +1,45 @@
|
||||
import { BaseDirectory, writeTextFile } from "@tauri-apps/plugin-fs";
|
||||
import useMainStore from "@/stores/index";
|
||||
import { ElMessage } from "element-plus";
|
||||
export const updateConfigJson = async () => {
|
||||
|
||||
import { uniq, intersection, isNil } from "lodash-es";
|
||||
export const updateConfigJson = async (configJsonSeverUrl: Array<string> | string | null | undefined) => {
|
||||
const mainStore = useMainStore();
|
||||
const path = import.meta.env.VITE_CONFIG_FILE_NAME;
|
||||
try {
|
||||
const { proxyNetworks, autoStart, relayAllPeerrpc, coonectAfterStart, multiThread, enablExitNode, useSmoltcp, saveErrorLog, logLevel, ...otherConfig } =
|
||||
mainStore.config;
|
||||
await writeTextFile(path, JSON.stringify(otherConfig, null, 4), { baseDir: BaseDirectory.Resource });
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
ElMessage.error(`更新config.json失败`);
|
||||
}
|
||||
}
|
||||
const path = import.meta.env.VITE_CONFIG_FILE_NAME;
|
||||
if (isNil(configJsonSeverUrl)) {
|
||||
configJsonSeverUrl = [];
|
||||
}
|
||||
const isArray = Array.isArray(configJsonSeverUrl);
|
||||
const isString = typeof configJsonSeverUrl === "string";
|
||||
try {
|
||||
const {
|
||||
proxyNetworks,
|
||||
autoStart,
|
||||
relayAllPeerrpc,
|
||||
connectAfterStart,
|
||||
multiThread,
|
||||
enablExitNode,
|
||||
useSmoltcp,
|
||||
saveErrorLog,
|
||||
logLevel,
|
||||
serverUrl,
|
||||
...otherConfig
|
||||
} = mainStore.config;
|
||||
let writeServerUrl: Array<string> | string = serverUrl;
|
||||
if (isArray) {
|
||||
writeServerUrl = intersection(
|
||||
uniq([serverUrl, ...configJsonSeverUrl]).filter(boolean => boolean),
|
||||
mainStore.basePeers
|
||||
);
|
||||
}
|
||||
if (isString && configJsonSeverUrl) {
|
||||
writeServerUrl = intersection(
|
||||
uniq([serverUrl, ...(configJsonSeverUrl as string).split(",")]).filter(boolean => boolean),
|
||||
mainStore.basePeers
|
||||
).join(",");
|
||||
}
|
||||
await writeTextFile(path, JSON.stringify({ serverUrl: writeServerUrl, ...otherConfig }, null, 4), { baseDir: BaseDirectory.Resource });
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
ElMessage.error(`更新config.json失败`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// const infoDialog = new WebviewWindow("log", {
|
||||
// title: "日志",
|
||||
// resizable: false,
|
||||
// width: 600,
|
||||
// height: 400,
|
||||
// parent: appWindow,
|
||||
// url: "/log"
|
||||
// });
|
||||
+5
-1
@@ -4,6 +4,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import pkg from "@/package.json";
|
||||
import { setTheme } from "~/composables/theme";
|
||||
import useMainStore from "@/stores/index";
|
||||
import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path";
|
||||
|
||||
const DEFAULT_TRAY_NAME = "main";
|
||||
|
||||
@@ -113,7 +114,10 @@ export async function MenuItemTheme() {
|
||||
|
||||
export async function setTrayRunState(tray: TrayIcon | null, isRunning: boolean = false) {
|
||||
if (!tray) return;
|
||||
await tray.setIcon(isRunning ? "easytier/icons/icon-inactive.ico" : "easytier/icons/icon.ico");
|
||||
const resourceDir = await getResourceDir();
|
||||
const path = await join(resourceDir, isRunning ? "easytier/icons/icon-inactive.ico" : "easytier/icons/icon.ico");
|
||||
// "easytier/icons/icon-inactive.ico", { baseDir: BaseDirectory.Resource }
|
||||
await tray.setIcon(path);
|
||||
}
|
||||
|
||||
export async function setTrayTooltip(tray: TrayIcon | null, tooltip?: string | null) {
|
||||
|
||||
+2
-1
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.1.8",
|
||||
"version": "1.2.1",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod"
|
||||
@@ -21,6 +21,7 @@
|
||||
"@tauri-apps/plugin-fs": "~2",
|
||||
"@tauri-apps/plugin-http": "^2.0.1",
|
||||
"@tauri-apps/plugin-shell": "~2",
|
||||
"@tauri-apps/plugin-window-state": "~2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.0",
|
||||
"@vueuse/core": "^11.2.0",
|
||||
|
||||
+41
-10
@@ -1,19 +1,12 @@
|
||||
<template>
|
||||
<div class="h-full overflow-auto flex flex-col items-start px-[25px]">
|
||||
<div><ElCheckbox v-model="mainStore.config.disableIpv6">不使用IPv6</ElCheckbox></div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.devName">自定义网卡名</ElCheckbox>
|
||||
<ElInput
|
||||
maxlength="10"
|
||||
v-model="mainStore.config.devNameValue"
|
||||
placeholder="请输入网卡名"
|
||||
/>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disbleListenner">不监听任何端口,只连接到对等节点</ElCheckbox></div>
|
||||
<div class="flex items-center gap-[15px] flex-nowrap">
|
||||
<ElCheckbox v-model="mainStore.config.saveErrorLog">输出日志到本地</ElCheckbox>
|
||||
<div class="w-[140px]">
|
||||
<ElSelect
|
||||
size="small"
|
||||
v-model="mainStore.config.logLevel"
|
||||
placeholder="请选择日志等级"
|
||||
class="ml-[5px]"
|
||||
@@ -33,7 +26,7 @@
|
||||
打开日志目录
|
||||
</ElButton>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.coonectAfterStart">软件启动后,自动"启动联机"(搭配开机自启,无感联机)</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.connectAfterStart">软件启动后,自动"启动联机"(搭配开机自启,无感联机)</ElCheckbox></div>
|
||||
<div class="flex items-center gap-[15px] flex-nowrap">
|
||||
<ElCheckbox v-model="mainStore.createConfigInEasytier">自动生成界面配置文件easytier/config.json</ElCheckbox>
|
||||
<ElButton
|
||||
@@ -44,12 +37,49 @@
|
||||
</ElButton>
|
||||
</div>
|
||||
|
||||
<ElDivider />
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.devName">自定义网卡名</ElCheckbox>
|
||||
<ElInput
|
||||
size="small"
|
||||
maxlength="10"
|
||||
v-model="mainStore.config.devNameValue"
|
||||
placeholder="请输入网卡名"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.config.enableNetCardMetric">自定义easytier网卡跃点</ElCheckbox>
|
||||
<ElInputNumber
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:value-on-clear="1"
|
||||
:max="9999"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
size="small"
|
||||
v-model="mainStore.config.netCardMetricValue"
|
||||
placeholder="请选择跃点数"
|
||||
/>
|
||||
<ElTooltip content="设置easytier网卡的跃点,提升网卡优先级,跃点越小,网卡优先级越高">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
</div>
|
||||
<div>
|
||||
<ElText
|
||||
size="small"
|
||||
type="warning"
|
||||
>
|
||||
(不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡,也可以使用 “设置跃点” 功能,除非你启用了下面的功能)
|
||||
</ElText>
|
||||
</div>
|
||||
<div><ElCheckbox v-model="mainStore.config.noTun">不创建TUN设备(网卡),可以使用子网代理访问节点</ElCheckbox></div>
|
||||
|
||||
<ElDivider />
|
||||
<div><ElCheckbox v-model="mainStore.config.enablExitNode">允许此节点成为出口节点</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disableEncryption">禁用对等节点通信的加密,默认为false,必须与对等节点相同</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.multiThread">使用多线程运行时,默认为单线程</ElCheckbox></div>
|
||||
<ElDivider />
|
||||
<div><ElCheckbox v-model="mainStore.config.noTun">不创建TUN设备,可以使用子网代理访问节点</ElCheckbox></div>
|
||||
|
||||
<div><ElCheckbox v-model="mainStore.config.useSmoltcp">为子网代理启用smoltcp堆栈</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.latencyfirst">延迟优先模式,将尝试使用最低延迟路径转发流量,默认使用最短路径</ElCheckbox></div>
|
||||
<div><ElCheckbox v-model="mainStore.config.disableUdpHolePunching">禁用UDP打洞功能</ElCheckbox></div>
|
||||
@@ -60,6 +90,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import useMainStore from "@/stores/index";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { resourceDir as getResourceDir, join } from "@tauri-apps/api/path";
|
||||
import { Command } from "@tauri-apps/plugin-shell";
|
||||
|
||||
+114
-47
@@ -59,6 +59,7 @@
|
||||
<ElSelect
|
||||
allow-create
|
||||
filterable
|
||||
placeholder="请选择服务器地址"
|
||||
default-first-option
|
||||
v-model="config.serverUrl"
|
||||
@change="handleServerUrlChange"
|
||||
@@ -88,14 +89,18 @@
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
<div class="flex items-center justify-between">
|
||||
<span style="float: left">{{ item }}</span>
|
||||
<ElButton
|
||||
@click.stop="handleDeleteServerUrl(item)"
|
||||
round
|
||||
:icon="Delete"
|
||||
type="danger"
|
||||
></ElButton>
|
||||
<div class="flex items-center gap-[20px] overflow-hidden flex-nowrap max-w-[calc(100vw-62px)]">
|
||||
<ElTooltip :content="item">
|
||||
<p class="truncate">{{ item }}</p>
|
||||
</ElTooltip>
|
||||
<div class="flex-shrink-0 ml-auto">
|
||||
<ElButton
|
||||
@click.stop="handleDeleteServerUrl(item)"
|
||||
round
|
||||
:icon="Delete"
|
||||
type="danger"
|
||||
></ElButton>
|
||||
</div>
|
||||
</div>
|
||||
</ElOption>
|
||||
</ElSelect>
|
||||
@@ -255,13 +260,15 @@
|
||||
>
|
||||
强制中转
|
||||
</ElCheckbox>
|
||||
<ElCheckbox
|
||||
@change="handleAutoStart"
|
||||
:model-value="config.autoStart"
|
||||
size="small"
|
||||
>
|
||||
开机自启
|
||||
</ElCheckbox>
|
||||
<ElTooltip placement="top-start" content="自启后隐藏于托盘,不显示界面">
|
||||
<ElCheckbox
|
||||
@change="handleAutoStartByTask"
|
||||
:model-value="config.autoStart"
|
||||
size="small"
|
||||
>
|
||||
开机自启
|
||||
</ElCheckbox>
|
||||
</ElTooltip>
|
||||
<div>
|
||||
<ElButton
|
||||
@click="handleShowCidrDialog"
|
||||
@@ -407,6 +414,7 @@
|
||||
import { readDir, exists, mkdir, BaseDirectory, readTextFile } from "@tauri-apps/plugin-fs";
|
||||
import { updateConfigJson } from "~/composables/configJson";
|
||||
import { writeText, readText } from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { sortedUniq, uniq } from "lodash-es";
|
||||
import { bounce } from "~/utils";
|
||||
|
||||
let is_close = false;
|
||||
@@ -420,7 +428,7 @@
|
||||
const mainStore = useMainStore();
|
||||
const config = mainStore.config;
|
||||
// console.log(config);
|
||||
const protocols = ["tcp", "udp", "ws", "wss", "wg"];
|
||||
const protocols = ["tcp", "udp", "ws", "wss", "wg", "quic"];
|
||||
const data = reactive({
|
||||
logVisible: false,
|
||||
cidrVisible: false,
|
||||
@@ -436,7 +444,8 @@
|
||||
isSuccessGetIp: false,
|
||||
startLoading: false,
|
||||
isStart: false,
|
||||
connectionSuccess: false
|
||||
connectionSuccess: false,
|
||||
configJsonSeverUrl: "" // 本地保存一次,用于回填config.json
|
||||
});
|
||||
|
||||
const configStart = reactive<{ list: Array<{ path: string; name: string }>; [key: string]: any }>({
|
||||
@@ -474,11 +483,25 @@
|
||||
}
|
||||
newBasePeers.splice(idx, 1);
|
||||
}
|
||||
mainStore.basePeers = [...new Set([...newBasePeers])];
|
||||
mainStore.basePeers = uniq([...newBasePeers]);
|
||||
if (mainStore.basePeers.length > 0) {
|
||||
mainStore.config.serverUrl = mainStore.basePeers[0];
|
||||
}
|
||||
};
|
||||
|
||||
const handleServerUrlChange = () => {
|
||||
mainStore.basePeers = [...new Set([config.serverUrl, ...mainStore.basePeers])];
|
||||
let inputProtocols: string | null = null;
|
||||
for (const p of protocols) {
|
||||
if (config.serverUrl.toLowerCase().startsWith(`${p}://`)) {
|
||||
inputProtocols = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (inputProtocols) {
|
||||
mainStore.config.protocol = [inputProtocols];
|
||||
mainStore.config.serverUrl = mainStore.config.serverUrl.slice(inputProtocols.length + 3);
|
||||
}
|
||||
mainStore.basePeers = uniq([mainStore.config.serverUrl, ...mainStore.basePeers]);
|
||||
};
|
||||
|
||||
const listenObj: { [key: string]: any } = {
|
||||
@@ -490,9 +513,11 @@
|
||||
// const appWindow = getCurrentWindow();
|
||||
const unListen = await listen("command-output", async event => {
|
||||
data.isStart = true;
|
||||
// console.log(event.payload);
|
||||
if (event.payload) {
|
||||
data.startLoading = false;
|
||||
let ipv4 = /dhcp ip changed. old: None, new: Some\((\d+\.\d+\.\d+\.\d+).*\)/g.exec(event.payload as string)?.[1];
|
||||
let devName = /tun device ready. dev: (.*)/g.exec(event.payload as string)?.[1];
|
||||
if (config.dhcp || mainStore.configStartEnable) {
|
||||
if (ipv4) {
|
||||
config.ipv4 = ipv4;
|
||||
@@ -507,6 +532,26 @@
|
||||
await setTrayTooltip(tray, `IP: ${config.ipv4}`);
|
||||
}
|
||||
}
|
||||
if (
|
||||
devName &&
|
||||
mainStore.config.enableNetCardMetric &&
|
||||
mainStore.config.netCardMetricValue &&
|
||||
mainStore.config.netCardMetricValue >= 1 &&
|
||||
mainStore.config.netCardMetricValue <= 9999
|
||||
) {
|
||||
try {
|
||||
const output = await Command.create(
|
||||
"netsh",
|
||||
["interface", "ipv4", "set", "interface", devName, "metric=", `${mainStore.config.netCardMetricValue}`],
|
||||
{
|
||||
encoding: "gb2312"
|
||||
}
|
||||
).execute();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
ElMessage.error("跃点设置失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
const logArr = data.log.split("\n");
|
||||
const start = logArr.length > 1000 ? logArr.length - 1000 : 0;
|
||||
@@ -525,7 +570,7 @@
|
||||
},
|
||||
async listenConfigStart() {
|
||||
const unListen = await listen("config", event => {
|
||||
// console.log("config", event.payload);
|
||||
console.log("config", event.payload);
|
||||
const ipv4 = config.ipv4;
|
||||
mainStore.$patch(event.payload as any);
|
||||
config.ipv4 = ipv4;
|
||||
@@ -589,6 +634,7 @@
|
||||
const getReleaseList = async () => {
|
||||
const list = await invoke("fetch_easytier_list");
|
||||
data.releaseList = list as never[];
|
||||
console.log(data.releaseList);
|
||||
};
|
||||
|
||||
const handleAutoStart = async () => {
|
||||
@@ -635,22 +681,29 @@
|
||||
|
||||
const compatibleInitAutoStart = async () => {
|
||||
try {
|
||||
// const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
// if (is_enable_by_task) {
|
||||
// await tauriAutoStart.enable();
|
||||
// await invoke("spawn_autostart", { enabled: false });
|
||||
// }
|
||||
const is_enable = await tauriAutoStart.isEnabled();
|
||||
config.autoStart = is_enable;
|
||||
if (is_enable) {
|
||||
await invoke("spawn_autostart", { enabled: true });
|
||||
await tauriAutoStart.disable();
|
||||
}
|
||||
let is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
if (is_enable_by_task) {
|
||||
// 每次打开Exe重新加载一次开机自启,因为可能路径变了
|
||||
await invoke("spawn_autostart", { enabled: false });
|
||||
await invoke("spawn_autostart", { enabled: true });
|
||||
}
|
||||
is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
config.autoStart = is_enable_by_task;
|
||||
} catch (err) {
|
||||
// await invoke("spawn_autostart", { enabled: false });
|
||||
await tauriAutoStart.disable();
|
||||
config.autoStart = false;
|
||||
console.log(err);
|
||||
await invoke("spawn_autostart", { enabled: false });
|
||||
const is_enable_by_task = (await invoke("autostart_is_enabled")) as boolean;
|
||||
config.autoStart = is_enable_by_task;
|
||||
}
|
||||
};
|
||||
|
||||
const initConnectAfterStart = async () => {
|
||||
if (config.coonectAfterStart && data.coreVersion) {
|
||||
if (config.connectAfterStart && data.coreVersion) {
|
||||
await reset();
|
||||
await handleConnection();
|
||||
}
|
||||
@@ -667,31 +720,43 @@
|
||||
const regex2 = /(,?)\s*\/\/.*(?=\n|$|\r\n)/gm;
|
||||
const resultStr = guiJsonStr.replace(regex, "").replace(regex2, "$1");
|
||||
const guiJson = JSON.parse(resultStr);
|
||||
let saveServerUrl = "";
|
||||
if (guiJson.serverUrl) {
|
||||
if (Array.isArray(guiJson.serverUrl)) {
|
||||
mainStore.basePeers = uniq([...guiJson.serverUrl, ...mainStore.basePeers]);
|
||||
}
|
||||
if (typeof guiJson.serverUrl === "string") {
|
||||
mainStore.basePeers = uniq([...guiJson.serverUrl.split(","), ...mainStore.basePeers]);
|
||||
}
|
||||
saveServerUrl = mainStore.basePeers[0] || "";
|
||||
} else {
|
||||
saveServerUrl = mainStore.basePeers.length > 0 ? mainStore.basePeers[0] || "" : "";
|
||||
}
|
||||
data.configJsonSeverUrl = guiJson.serverUrl;
|
||||
mainStore.$patch({
|
||||
config: {
|
||||
...guiJson,
|
||||
...mainStore.config,
|
||||
...guiJson
|
||||
serverUrl: saveServerUrl
|
||||
}
|
||||
});
|
||||
if (guiJson.serverUrl) {
|
||||
mainStore.basePeers = [...new Set([guiJson.serverUrl, ...mainStore.basePeers])];
|
||||
if (mainStore.createConfigInEasytier) {
|
||||
await updateConfigJson(data.configJsonSeverUrl);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
ElMessage.error(`config.json格式错误`);
|
||||
}
|
||||
}
|
||||
}
|
||||
const b = bounce(600);
|
||||
mainStore.$subscribe(
|
||||
(...a) => {
|
||||
if (mainStore.createConfigInEasytier) {
|
||||
b(async () => {
|
||||
await updateConfigJson();
|
||||
});
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
mainStore.$subscribe((...a) => {
|
||||
if (mainStore.createConfigInEasytier) {
|
||||
b(async () => {
|
||||
await updateConfigJson(data.configJsonSeverUrl);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
let logsTimer: NodeJS.Timeout | null = null;
|
||||
@@ -873,7 +938,7 @@
|
||||
const {
|
||||
proxyNetworks,
|
||||
autoStart,
|
||||
coonectAfterStart,
|
||||
connectAfterStart,
|
||||
multiThread,
|
||||
hostname,
|
||||
enablExitNode,
|
||||
@@ -912,7 +977,7 @@
|
||||
});
|
||||
ElMessage.success("导入成功");
|
||||
importConfigData.visible = false;
|
||||
mainStore.basePeers = [...new Set([config.serverUrl, ...mainStore.basePeers])];
|
||||
mainStore.basePeers = uniq([config.serverUrl, ...mainStore.basePeers]);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
if (err !== "cancel") {
|
||||
@@ -929,7 +994,9 @@
|
||||
mainStore.configPath = "";
|
||||
try {
|
||||
await mkdir(path, { baseDir: BaseDirectory.Resource });
|
||||
} catch (err) {}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -952,7 +1019,7 @@
|
||||
"member",
|
||||
{
|
||||
title: "成员列表",
|
||||
width: 470,
|
||||
width: 875,
|
||||
height: 380,
|
||||
url: "#/member"
|
||||
},
|
||||
|
||||
+76
-20
@@ -6,26 +6,66 @@
|
||||
stripe
|
||||
border
|
||||
:data="data.member"
|
||||
v-else>
|
||||
v-else
|
||||
>
|
||||
<ElTableColumn
|
||||
v-for="prop in showTableHeader"
|
||||
sortable
|
||||
:prop="prop[0]"
|
||||
:label="prop[1]"
|
||||
:key="prop[0]">
|
||||
width="140"
|
||||
label="主机名"
|
||||
prop="hostname"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="90"
|
||||
prop="cost"
|
||||
label="路由"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span v-if="prop[0] == 'loss_rate'">
|
||||
{{ row[prop[0]] && row[prop[0]] != "-" ? Number(row[prop[0]] * 100).toFixed(2) + "%" : row[prop[0]] }}
|
||||
</span>
|
||||
<span v-else-if="prop[0] != 'cost'">{{ row[prop[0]] }}</span>
|
||||
<ElTag
|
||||
v-else
|
||||
effect="dark"
|
||||
:type="row[prop[0]] == 'p2p' ? 'success' : 'info'">
|
||||
{{ row[prop[0]] }}
|
||||
:type="row.cost == 'p2p' ? 'success' : 'info'"
|
||||
>
|
||||
{{ row.cost }}
|
||||
</ElTag>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="120"
|
||||
prop="ipv4"
|
||||
label="虚拟网IP"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="lat_ms"
|
||||
width="130"
|
||||
label="延迟/ms"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="120"
|
||||
prop="loss_rate"
|
||||
label="丢包率"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ row.loss_rate && row.loss_rate != "-" ? Number(row.loss_rate * 100).toFixed(2) + "%" : row.loss_rate }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
width="120"
|
||||
label="nat_type"
|
||||
prop="NAT类型"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ natMaps[row.nat_type.toLowerCase() as natKyes] || row.nat_type || "-" }}
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn
|
||||
sortable
|
||||
prop="version"
|
||||
label="版本"
|
||||
></ElTableColumn>
|
||||
</ElTable>
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,24 +74,40 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { reactive, onMounted, onBeforeUnmount } from "vue";
|
||||
import { parsePeerInfo } from "@/utils";
|
||||
|
||||
const natMaps = {
|
||||
unknown: "未知",
|
||||
nopat: "nat0",
|
||||
fullcone: "nat1",
|
||||
restricted: "nat2",
|
||||
addressrestricted: "nat2",
|
||||
portrestricted: "nat3",
|
||||
symmetric: "nat4"
|
||||
};
|
||||
type natKyes = keyof typeof natMaps;
|
||||
// NAT1: Full Cone NAT,全锥形NAT,这是最宽松的网络环境,你想做什么,基本没啥限制IP和端口都不受限。
|
||||
// NAT2: Address-Restricted Cone NAT,受限锥型NAT,相比NAT1,NAT2 增加了地址限制,也就是IP受限,而端口不受限。
|
||||
// NAT3: Port-Restricted Cone NAT,端口受限锥型,相比NAT2,NAT3 又增加了端口限制,也就是说IP、端口都受限。
|
||||
// NAT4: Symmetric NAT,对称型NAT,对称型NAT具有端口受限锥型的受限特性,内部地址每一次请求一个特定的外部地址,
|
||||
// 都可能会绑定到一个新的端口号。也就是请求不同的外部地址映射的端口号是可能不同的。这种类型基本上就告别 P2P 了。
|
||||
const data = reactive<{ member: any[] }>({
|
||||
member: [],
|
||||
member: []
|
||||
});
|
||||
|
||||
const showTableHeader = [
|
||||
const _showTableHeader = [
|
||||
["hostname", "主机名"],
|
||||
["lat_ms", "延迟/ms"],
|
||||
["ipv4", "虚拟网IP"],
|
||||
["cost", "路由"],
|
||||
["ipv4", "虚拟网IP"],
|
||||
["lat_ms", "延迟/ms"],
|
||||
["loss_rate", "丢包率"],
|
||||
["nat_type", "NAT类型"],
|
||||
["version", "版本"],
|
||||
["version", "版本"]
|
||||
];
|
||||
|
||||
const listenOutput = async () => {
|
||||
const member = await invoke("get_members_by_cli");
|
||||
const peerInfo = parsePeerInfo(member as string);
|
||||
peerInfo.forEach((value) => {
|
||||
const member = await invoke<string>("get_members_by_cli");
|
||||
const peerInfo = parsePeerInfo(member);
|
||||
peerInfo.forEach(value => {
|
||||
if (value.cost === "Local") {
|
||||
value.cost = "本机";
|
||||
}
|
||||
|
||||
Generated
+11
@@ -7,6 +7,10 @@ settings:
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@tauri-apps/plugin-window-state':
|
||||
specifier: ~2
|
||||
version: 2.0.0
|
||||
devDependencies:
|
||||
'@element-plus/icons-vue':
|
||||
specifier: ^2.3.1
|
||||
@@ -1047,6 +1051,9 @@ packages:
|
||||
'@tauri-apps/plugin-shell@2.0.1':
|
||||
resolution: {integrity: sha512-akU1b77sw3qHiynrK0s930y8zKmcdrSD60htjH+mFZqv5WaakZA/XxHR3/sF1nNv9Mgmt/Shls37HwnOr00aSw==}
|
||||
|
||||
'@tauri-apps/plugin-window-state@2.0.0':
|
||||
resolution: {integrity: sha512-O82iRlrh1BLgBI8CTc+NMTPxQhQo8II5admKq9mLvH45Us5i4Zcr74At6eM46nOflFd7R8bZsVNGy+PxOEqUmQ==}
|
||||
|
||||
'@trysound/sax@0.2.0':
|
||||
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@@ -4759,6 +4766,10 @@ snapshots:
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.1.1
|
||||
|
||||
'@tauri-apps/plugin-window-state@2.0.0':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.1.1
|
||||
|
||||
'@trysound/sax@0.2.0': {}
|
||||
|
||||
'@types/estree@1.0.6': {}
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
/gen/schemas
|
||||
/easytier/logs
|
||||
/easytier/logs
|
||||
/easytier/logs/*.*
|
||||
Generated
+17
-1
@@ -1176,7 +1176,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
||||
|
||||
[[package]]
|
||||
name = "easytier-game"
|
||||
version = "1.1.8"
|
||||
version = "1.2.1"
|
||||
dependencies = [
|
||||
"log",
|
||||
"planif",
|
||||
@@ -1192,6 +1192,7 @@ dependencies = [
|
||||
"tauri-plugin-log",
|
||||
"tauri-plugin-shell",
|
||||
"tauri-plugin-single-instance",
|
||||
"tauri-plugin-window-state",
|
||||
"whoami",
|
||||
"windows 0.58.0",
|
||||
"zip",
|
||||
@@ -4543,6 +4544,21 @@ dependencies = [
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683c8764751fbbcebf3a594bcee24cf84c62773fa0080d1b40fc80698472421e"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 1.0.64",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.2.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.1.8"
|
||||
version = "1.2.1"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
@@ -50,3 +50,4 @@ features = ["Win32_System_TaskScheduler"]
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-autostart = "2.0.1"
|
||||
tauri-plugin-single-instance = "2.0.1"
|
||||
tauri-plugin-window-state = "2"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"cmd": "easytier/tool/WinIPBroadcast",
|
||||
"cmd": "$RESOURCE/easytier/tool/WinIPBroadcast",
|
||||
"name": "WinIPBroadcast"
|
||||
}
|
||||
]
|
||||
@@ -53,12 +53,12 @@
|
||||
"args": [
|
||||
"run"
|
||||
],
|
||||
"cmd": "easytier/tool/WinIPBroadcast",
|
||||
"cmd": "$RESOURCE/easytier/tool/WinIPBroadcast",
|
||||
"name": "WinIPBroadcast"
|
||||
},
|
||||
{
|
||||
"args": true,
|
||||
"cmd": "easytier/tool/nssm",
|
||||
"cmd": "$RESOURCE/easytier/tool/nssm",
|
||||
"name": "nssm"
|
||||
},
|
||||
{
|
||||
@@ -88,6 +88,10 @@
|
||||
"fs:allow-resource-write-recursive",
|
||||
"clipboard-manager:allow-clear",
|
||||
"clipboard-manager:allow-read-text",
|
||||
"clipboard-manager:allow-write-text"
|
||||
"clipboard-manager:allow-write-text",
|
||||
|
||||
"window-state:default",
|
||||
"window-state:allow-save-window-state",
|
||||
"window-state:allow-restore-state"
|
||||
]
|
||||
}
|
||||
@@ -4,7 +4,9 @@
|
||||
"tcp",
|
||||
"udp"
|
||||
], // 协议类型
|
||||
"serverUrl": "public.easytier.top:11010", // easytier服务地址
|
||||
|
||||
// easytier服务地址 - 可填写多个 方式1,逗号分隔,"xxxx.cn,yyyy.com" 方式2,数组 ["xxxx.cn","yyyy.com"] (默认选中第一个)
|
||||
"serverUrl": "public.easytier.top:11010",
|
||||
"networkName": "", // 网络名
|
||||
"networkPassword": "", // 网络密码
|
||||
"hostname": "configTest", // 主机名
|
||||
@@ -18,5 +20,7 @@
|
||||
"disbleP2p": false, // 禁用p2p, 强制中转
|
||||
"dhcp": false, // 动态分配IP
|
||||
"devName": false, // 是否启用自定义网卡名
|
||||
"devNameValue": "" // 网卡名(启用devName之后才生效)
|
||||
"devNameValue": "", // 网卡名(启用devName之后才生效)
|
||||
"enableNetCardMetric": false, // 自定义easytier每次生成的网卡跃点
|
||||
"netCardMetricValue": 1 // 网卡跃点数量(1-9999)
|
||||
}
|
||||
+58
-27
@@ -60,7 +60,8 @@ pub async fn fetch_releases() -> Result<Vec<Release>, Error> {
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
fn get_core_version() -> String {
|
||||
match Command::new("easytier/easytier-core.exe")
|
||||
let core_path = get_tool_exe_path(String::from("\\easytier\\easytier-core.exe"));
|
||||
match Command::new(&core_path)
|
||||
.arg("--version")
|
||||
.creation_flags(0x08000000)
|
||||
.output()
|
||||
@@ -73,19 +74,27 @@ fn get_core_version() -> String {
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
fn get_cli_version() -> String {
|
||||
match Command::new("easytier/easytier-cli.exe")
|
||||
.arg("--version")
|
||||
.creation_flags(0x08000000)
|
||||
.output()
|
||||
{
|
||||
Ok(output) => {
|
||||
let output_str = String::from_utf8_lossy(&output.stdout);
|
||||
return output_str.trim().to_string();
|
||||
}
|
||||
Err(_e) => return "".to_string(),
|
||||
}
|
||||
// #[tauri::command(rename_all = "snake_case")]
|
||||
// #[warn(dead_code)]
|
||||
// fn get_cli_version() -> String {
|
||||
// let cli_path = get_tool_exe_path(String::from("\\easytier\\easytier-cli.exe"));
|
||||
// match Command::new(&cli_path)
|
||||
// .arg("--version")
|
||||
// .creation_flags(0x08000000)
|
||||
// .output()
|
||||
// {
|
||||
// Ok(output) => {
|
||||
// let output_str = String::from_utf8_lossy(&output.stdout);
|
||||
// return output_str.trim().to_string();
|
||||
// }
|
||||
// Err(_e) => return "".to_string(),
|
||||
// }
|
||||
// }
|
||||
|
||||
fn get_tool_exe_path(path: String) -> String {
|
||||
let cur_vec = get_exe_directory();
|
||||
let tool_path = cur_vec[1].to_string() + &path.to_string();
|
||||
return tool_path;
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
@@ -122,7 +131,8 @@ struct MyResponse {
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
fn get_members_by_cli() -> String {
|
||||
match Command::new("easytier/easytier-cli.exe")
|
||||
let cli_path = get_tool_exe_path(String::from("\\easytier\\easytier-cli.exe"));
|
||||
match Command::new(&cli_path)
|
||||
.arg("peer")
|
||||
.arg("list")
|
||||
.creation_flags(0x08000000)
|
||||
@@ -142,14 +152,17 @@ async fn download_easytier_zip(download_url: String, file_name: String) {
|
||||
let response = reqwest::get(target)
|
||||
.await
|
||||
.expect("error to download easytier url");
|
||||
let file_path = format!("./easytier/{}", file_name);
|
||||
let easytier_path = get_tool_exe_path(String::from("\\easytier"));
|
||||
let file_path = format!("{}\\{}", easytier_path, file_name);
|
||||
println!("download easytier to {}", file_path);
|
||||
|
||||
let easytier_dir = path::Path::new("./easytier");
|
||||
let easytier_dir = path::Path::new(&easytier_path);
|
||||
if !easytier_dir.exists() {
|
||||
fs::create_dir_all(&easytier_dir).unwrap();
|
||||
}
|
||||
|
||||
let path = path::Path::new(&file_path);
|
||||
println!("download easytier to {}", path.display());
|
||||
|
||||
let mut file = match File::create(&path) {
|
||||
Err(why) => panic!("couldn't create {}", why),
|
||||
@@ -197,8 +210,8 @@ fn unzip(fname: &path::Path) {
|
||||
// fs::create_dir_all(p).unwrap();
|
||||
// }
|
||||
// }
|
||||
|
||||
let easytier_dir = path::Path::new("./easytier");
|
||||
let easytier_path = get_tool_exe_path(String::from("\\easytier"));
|
||||
let easytier_dir = path::Path::new(&easytier_path);
|
||||
// if !easytier_dir.exists() {
|
||||
// fs::create_dir_all(&easytier_dir).unwrap();
|
||||
// }
|
||||
@@ -225,8 +238,9 @@ fn run_command(
|
||||
let stop_signal2 = Arc::clone(&stop_signal);
|
||||
let args2 = args.clone();
|
||||
thread::spawn(move || {
|
||||
let core_path = get_tool_exe_path(String::from("\\easytier\\easytier-core.exe"));
|
||||
// trace, debug, info, warn, error, off
|
||||
let mut child = Command::new("easytier/easytier-core.exe")
|
||||
let mut child = Command::new(&core_path)
|
||||
.args(args)
|
||||
.creation_flags(0x08000000)
|
||||
.stdout(Stdio::piped())
|
||||
@@ -355,7 +369,7 @@ fn get_exe_directory() -> Vec<String> {
|
||||
let mut ret_vec: Vec<String> = Vec::new();
|
||||
match std::env::current_exe() {
|
||||
Ok(exe_path) => {
|
||||
println!("Path of this executable is: {}", exe_path.display());
|
||||
// println!("Path of this executable is: {}", exe_path.display());
|
||||
ret_vec.push(exe_path.display().to_string());
|
||||
ret_vec.push(exe_path.parent().unwrap().display().to_string());
|
||||
return ret_vec;
|
||||
@@ -436,6 +450,8 @@ fn autostart_is_enabled() -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
pub const AUTOSTART_ARG: &str = "--autostart";
|
||||
pub const TASKAUTOSTART_ARG: &str = "--task-auto-start";
|
||||
fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
if !enabled {
|
||||
unsafe {
|
||||
@@ -486,7 +502,7 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
sb.create_logon()
|
||||
.author("heixiansen")?
|
||||
.trigger("trigger", enabled)?
|
||||
.action(Action::new("auto start", exe, "", ""))?
|
||||
.action(Action::new("auto start", exe, "", &TASKAUTOSTART_ARG))?
|
||||
.in_folder("easytierGame")?
|
||||
.principal(settings)?
|
||||
.delay(Duration {
|
||||
@@ -499,14 +515,20 @@ fn autostart(enabled: bool) -> std::result::Result<(), Box<dyn std::error::Error
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub const AUTOSTART_ARG: &str = "--autostart";
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// 获取命令行参数
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
|
||||
let stop_signal = Arc::new(AtomicBool::new(false)); // 创建一个原子布尔值,用于控制命令的停止
|
||||
let stop_signal_clone = Arc::clone(&stop_signal); // 创建一个原子布尔值的克隆,用于传递给命令
|
||||
let context = tauri::generate_context!();
|
||||
tauri::Builder::default()
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::new()
|
||||
.with_state_flags(tauri_plugin_window_state::StateFlags::SIZE)
|
||||
.build(),
|
||||
)
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_autostart::init(
|
||||
@@ -518,9 +540,11 @@ pub fn run() {
|
||||
let _ = app
|
||||
.get_webview_window("main")
|
||||
.expect("no main window")
|
||||
.set_focus();
|
||||
.set_focus()
|
||||
.expect("failed to set focus");
|
||||
}))
|
||||
.setup(|app| {
|
||||
.setup(move |app| {
|
||||
let args = args.clone();
|
||||
if cfg!(debug_assertions) {
|
||||
app.handle().plugin(
|
||||
tauri_plugin_log::Builder::default()
|
||||
@@ -547,6 +571,14 @@ pub fn run() {
|
||||
))?)
|
||||
.icon_as_template(false)
|
||||
.build(app)?;
|
||||
|
||||
// 开机自启隐藏到托盘或者显示主窗口
|
||||
if !args.contains(&String::from(TASKAUTOSTART_ARG)) {
|
||||
let main_window = app.get_webview_window("main").unwrap();
|
||||
main_window.show().expect("failed to show window");
|
||||
main_window.set_focus().expect("failed to set focus");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.manage(stop_signal_clone)
|
||||
@@ -556,7 +588,6 @@ pub fn run() {
|
||||
get_core_version,
|
||||
fetch_easytier_list,
|
||||
download_easytier_zip,
|
||||
get_cli_version,
|
||||
get_members_by_cli,
|
||||
search_pid_by_pname,
|
||||
get_exe_directory,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.1.8",
|
||||
"version": "1.2.1",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -13,7 +13,8 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.1.8",
|
||||
"title": "easytier-game 1.2.1",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
"height": 305,
|
||||
@@ -24,6 +25,7 @@
|
||||
"fullscreen": false,
|
||||
"decorations": true,
|
||||
"center": true,
|
||||
"visible": false,
|
||||
"maximizable": false,
|
||||
"transparent": false
|
||||
}
|
||||
|
||||
+45
-9
@@ -11,7 +11,7 @@ export default defineStore("main", {
|
||||
ipv4: "",
|
||||
proxyNetworks: "", // 子网代理
|
||||
autoStart: false, // 是否自动启动
|
||||
coonectAfterStart: false, //软件打开后,是否自动连接
|
||||
connectAfterStart: false, //软件打开后,是否自动连接
|
||||
disableIpv6: false, // 是否禁用IPv6
|
||||
disbleListenner: false, // 是否禁用监听
|
||||
disableEncryption: false, // 是否禁用加密
|
||||
@@ -27,7 +27,9 @@ export default defineStore("main", {
|
||||
saveErrorLog: true, // 是否保存错误日志
|
||||
logLevel: "error", //日志等级
|
||||
devName: false, //自定义网卡名
|
||||
devNameValue: "" //自定义网卡名
|
||||
devNameValue: "", //自定义网卡名
|
||||
enableNetCardMetric: false, //启用网卡自定义跃点
|
||||
netCardMetricValue: 1 //自定义网卡跃点值
|
||||
},
|
||||
cidrEnable: false,
|
||||
basePeers: ["public.easytier.top:11010"],
|
||||
@@ -38,15 +40,49 @@ export default defineStore("main", {
|
||||
createConfigInEasytier: false, //在easytier目录生成config.json文件吗
|
||||
|
||||
winipBcPid: 0,
|
||||
winipBcStart: false,
|
||||
|
||||
winipBcStart: false
|
||||
};
|
||||
},
|
||||
persist: {
|
||||
// 除了这些,其他都要存下来
|
||||
omit: [
|
||||
"winipBcPid",
|
||||
"winipBcStart"
|
||||
]
|
||||
// 防止持久化保存 用户使用config.json输入的无用的字段
|
||||
pick: [
|
||||
"config.protocol",
|
||||
"config.serverUrl",
|
||||
"config.networkName",
|
||||
"config.networkPassword",
|
||||
"config.hostname",
|
||||
"config.ipv4",
|
||||
"config.proxyNetworks",
|
||||
"config.autoStart",
|
||||
"config.connectAfterStart",
|
||||
"config.disableIpv6",
|
||||
"config.disbleListenner",
|
||||
"config.disableEncryption",
|
||||
"config.multiThread",
|
||||
"config.enablExitNode",
|
||||
"config.noTun",
|
||||
"config.latencyfirst",
|
||||
"config.useSmoltcp",
|
||||
"config.disableUdpHolePunching",
|
||||
"config.relayAllPeerrpc",
|
||||
"config.disbleP2p",
|
||||
"config.dhcp",
|
||||
"config.saveErrorLog",
|
||||
"config.logLevel",
|
||||
"config.devName",
|
||||
"config.devNameValue",
|
||||
"config.enableNetCardMetric",
|
||||
"config.netCardMetricValue",
|
||||
|
||||
"cidrEnable",
|
||||
"basePeers",
|
||||
"theme",
|
||||
"configStartEnable",
|
||||
"configPath",
|
||||
"winIpBcAutoStart",
|
||||
"createConfigInEasytier"
|
||||
],
|
||||
// // 除了这些,其他都要存下来
|
||||
// omit: ["winipBcPid", "winipBcStart"]
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user