Compare commits

...
1 Commits
11 changed files with 93 additions and 19 deletions
+1
View File
@@ -19,6 +19,7 @@ export const updateConfigJson = async (configJsonSeverUrl: Array<string> | strin
serverUrl, serverUrl,
enableCustomListener, enableCustomListener,
customListenerData, customListenerData,
bindDeviceEnable,
...otherConfig ...otherConfig
} = mainStore.config; } = mainStore.config;
let writeServerUrl: Array<string> | string = serverUrl; let writeServerUrl: Array<string> | string = serverUrl;
+1 -1
View File
@@ -3,7 +3,7 @@
"private": true, "private": true,
"author": "leizi97", "author": "leizi97",
"description": "A simple network initiator based on Easytier", "description": "A simple network initiator based on Easytier",
"version": "1.4.2", "version": "1.4.3",
"scripts": { "scripts": {
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0", "dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
"build": "nuxt generate --dotenv env/.env.prod", "build": "nuxt generate --dotenv env/.env.prod",
+41 -3
View File
@@ -127,7 +127,8 @@
<div class="flex items-center gap-[10px]"> <div class="flex items-center gap-[10px]">
<ElCheckbox <ElCheckbox
:disabled="mainStore.config.disbleListenner" :disabled="mainStore.config.disbleListenner"
v-model="mainStore.config.enableCustomListenerV6" :model-value="mainStore.config.enableCustomListenerV6"
@change="handleCustomListenerV6Change"
> >
自定义IPV6监听地址 自定义IPV6监听地址
</ElCheckbox> </ElCheckbox>
@@ -140,7 +141,7 @@
placeholder="请输入自定义IPV6监听地址" placeholder="请输入自定义IPV6监听地址"
/> />
</div> </div>
<ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听"> <ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听(内核版本2.2.3之后,ipv6监听被移除并合并到'自定义监听')">
<ElIcon><QuestionFilled /></ElIcon> <ElIcon><QuestionFilled /></ElIcon>
</ElTooltip> </ElTooltip>
<CoreVersionWarning version="2.1.0" /> <CoreVersionWarning version="2.1.0" />
@@ -180,6 +181,29 @@
(不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡也可以使用 设置跃点 功能除非你启用了下面的功能) (不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡也可以使用 设置跃点 功能除非你启用了下面的功能)
</ElText> </ElText>
</div> </div>
<div class="flex items-center gap-[5px]">
<div><ElCheckbox v-model="mainStore.config.bindDeviceEnable">绑定设备</ElCheckbox></div>
<!-- <div class="flex items-center gap-[5px]"> -->
<!-- <ElSelect
placeholder="选择设备"
v-model="mainStore.config.bindDevice"
filterable
no-data-text="暂无网卡设备数据请刷新"
>
<ElOption
v-for="guid in guids"
:key="guid[0]"
:label="guid[1]"
:value="guid[0]"
></ElOption>
</ElSelect> -->
<!-- <ElButton @click="getGuids">刷新</ElButton> -->
<ElTooltip content="将连接器的套接字绑定到物理设备以避免路由问题。比如子网代理网段与某节点的网段冲突,绑定物理设备后可以与该节点正常通信">
<ElIcon><QuestionFilled /></ElIcon>
</ElTooltip>
<!-- </div> -->
<CoreVersionWarning version="2.2.3" />
</div>
<div><ElCheckbox v-model="mainStore.config.noTun">不创建TUN设备(网卡)可以使用子网代理访问节点</ElCheckbox></div> <div><ElCheckbox v-model="mainStore.config.noTun">不创建TUN设备(网卡)可以使用子网代理访问节点</ElCheckbox></div>
<ElDivider /> <ElDivider />
@@ -269,6 +293,20 @@
listenerDialogData.visible = false; listenerDialogData.visible = false;
}; };
const handleCustomListenerV6Change = async (value: boolean) => {
if (value) {
const [error, _] = await ElConfirmDanger("内核版本2.2.3之后,ipv6监听被移除并合并到'自定义监听',请谨慎使用", "警告", {
confirmButtonText: "继续使用",
cancelButtonText: "取消"
});
if (!error) {
mainStore.config.enableCustomListenerV6 = value;
}
} else {
mainStore.config.enableCustomListenerV6 = value;
}
};
const mainStore = useMainStore(); const mainStore = useMainStore();
const data = ["trace", "debug", "info", "warn", "error", "off"]; const data = ["trace", "debug", "info", "warn", "error", "off"];
const guids = ref<string[][]>([]); const guids = ref<string[][]>([]);
@@ -297,7 +335,7 @@
}; };
// 为bind_device功能增加改方法 // 为bind_device功能增加改方法
const _getGuids = async () => { const getGuids = async () => {
const guidsValue = await invoke<string[][]>("get_network_adapter_guids"); const guidsValue = await invoke<string[][]>("get_network_adapter_guids");
guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : []; guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : [];
}; };
+13 -9
View File
@@ -1,12 +1,18 @@
<template> <template>
<div class="flex h-full flex-col gap-[10px]"> <div class="flex h-full flex-col gap-[10px]">
<ElRadioGroup <div class="flex items-center gap-[10px]">
:disabled="!data.isSwitchEnable" <ElRadioGroup
v-model="mainStore.cidrEnable" :disabled="!data.isSwitchEnable"
> v-model="mainStore.cidrEnable"
<ElRadioButton :value="true">开启</ElRadioButton> >
<ElRadioButton :value="false">关闭</ElRadioButton> <ElRadioButton :value="true">开启</ElRadioButton>
</ElRadioGroup> <ElRadioButton :value="false">关闭</ElRadioButton>
</ElRadioGroup>
<div class="flex items-center gap-[10px]">
<ElCheckbox v-model="mainStore.proxyForwardBySystem">通过系统内核转发子网代理数据包禁用内置NAT</ElCheckbox>
<CoreVersionWarning version="2.2.3" />
</div>
</div>
<div class="flex-1 overflow-auto"> <div class="flex-1 overflow-auto">
<ElInput <ElInput
placeholder="例如: 192.168.1.0/24 一行一个" placeholder="例如: 192.168.1.0/24 一行一个"
@@ -113,6 +119,4 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
unlistenStart && unlistenStart(); unlistenStart && unlistenStart();
}); });
</script> </script>
+27 -1
View File
@@ -749,7 +749,8 @@
const config = mainStore.config; const config = mainStore.config;
// console.error(config); // console.error(config);
const protocols = supportProtocols(); const protocols = supportProtocols();
const data = reactive({ //easytierGame有没有新版 const data = reactive({
//easytierGame有没有新版
logVisible: false, logVisible: false,
cidrVisible: false, cidrVisible: false,
advanceVisible: false, advanceVisible: false,
@@ -1115,6 +1116,24 @@
} }
}; };
const compatibleIpv6Listener = async () => {
// ipv6监听在后续版本合并到customListenner里了,这里做兼容处理
if (config.enableCustomListenerV6 && config.customListenerV6Data) {
const customListener = config.customListenerV6Data.trim();
if (customListener) {
const customListenerV4 = config.customListenerData
.trim()
.split("\n")
.map(el => el.trim())
.filter(el => el);
if (!customListenerV4.includes(customListener)) {
config.customListenerData += `\n${customListener}`;
}
}
}
config.enableCustomListenerV6 = false;
};
const initConnectAfterStart = async () => { const initConnectAfterStart = async () => {
if (config.connectAfterStart && data.coreVersion) { if (config.connectAfterStart && data.coreVersion) {
await reset(); await reset();
@@ -1212,6 +1231,7 @@
await compatibleInitAutoStart(); await compatibleInitAutoStart();
// await initAutoStart(); // await initAutoStart();
await initStartWinIpBroadcast(); await initStartWinIpBroadcast();
await compatibleIpv6Listener();
await getCoreVersion(); await getCoreVersion();
await listenObj.listenThreadId(); await listenObj.listenThreadId();
await listenObj.listenServerThreadId(); await listenObj.listenServerThreadId();
@@ -1374,6 +1394,12 @@
if (config.disableKcpInput) { if (config.disableKcpInput) {
args.push("--disable-kcp-input"); args.push("--disable-kcp-input");
} }
if (config.bindDeviceEnable) {
args.push("--bind-device", "true");
}
if (mainStore.proxyForwardBySystem) {
args.push("--proxy-forward-by-system");
}
return args; return args;
}; };
+1 -1
View File
@@ -1241,7 +1241,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]] [[package]]
name = "easytier-game" name = "easytier-game"
version = "1.4.2" version = "1.4.3"
dependencies = [ dependencies = [
"hashbrown 0.15.2", "hashbrown 0.15.2",
"log", "log",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "easytier-game" name = "easytier-game"
version = "1.4.2" version = "1.4.3"
homepage = "https://github.com/EasyTier/EasyTier" homepage = "https://github.com/EasyTier/EasyTier"
repository = "https://github.com/EasyTier/EasytierGame" repository = "https://github.com/EasyTier/EasytierGame"
description = "A simple network initiator based on Easytier" description = "A simple network initiator based on Easytier"
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "easytier-game", "productName": "easytier-game",
"version": "1.4.2", "version": "1.4.3",
"identifier": "com.tauri.easytier-game", "identifier": "com.tauri.easytier-game",
"build": { "build": {
@@ -12,7 +12,7 @@
"app": { "app": {
"windows": [ "windows": [
{ {
"title": "easytier-game 1.4.2", "title": "easytier-game 1.4.3",
"label": "main", "label": "main",
"minWidth": 340, "minWidth": 340,
"width": 340, "width": 340,
+6 -1
View File
@@ -40,7 +40,8 @@ const store = defineStore("main", {
enablePreventSleep: false, //组织系统休眠 enablePreventSleep: false, //组织系统休眠
compression: "none", //加密算法 compression: "none", //加密算法
enableKcpProxy: true, //启用kcp代理 默认开启 enableKcpProxy: true, //启用kcp代理 默认开启
disableKcpInput: false //禁用kcp输入 disableKcpInput: false, //禁用kcp输入
bindDeviceEnable: false, //是否绑定设备
}, },
serverConfig: { serverConfig: {
enableWhiteList: true, // 是否启用白名单 enableWhiteList: true, // 是否启用白名单
@@ -51,6 +52,7 @@ const store = defineStore("main", {
port: "11010" // 服务器端口 port: "11010" // 服务器端口
}, },
cidrEnable: false, cidrEnable: false,
proxyForwardBySystem: false, // 是否通过系统内核转发子网代理数据包,禁用内置NAT
basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"], basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"],
theme: false, //主题 false light true dark theme: false, //主题 false light true dark
configStartEnable: false, //使用配置文件启动 configStartEnable: false, //使用配置文件启动
@@ -117,6 +119,8 @@ const store = defineStore("main", {
"config.enableKcpProxy", "config.enableKcpProxy",
"config.disableKcpInput", "config.disableKcpInput",
"config.bindDeviceEnable",
"serverConfig.autoStart", "serverConfig.autoStart",
// 'serverConfig.enableListener', // 'serverConfig.enableListener',
"serverConfig.enableWhiteList", "serverConfig.enableWhiteList",
@@ -125,6 +129,7 @@ const store = defineStore("main", {
"serverConfig.port", "serverConfig.port",
"cidrEnable", "cidrEnable",
"proxyForwardBySystem",
"basePeers", "basePeers",
"theme", "theme",
"configStartEnable", "configStartEnable",