mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
修复ipv6监听不兼容导致的无法启动联机的问题#7,更新内核为最新,增加绑定设备和子网代理页面增加禁用nat相关选项
This commit is contained in:
@@ -19,6 +19,7 @@ export const updateConfigJson = async (configJsonSeverUrl: Array<string> | strin
|
||||
serverUrl,
|
||||
enableCustomListener,
|
||||
customListenerData,
|
||||
bindDeviceEnable,
|
||||
...otherConfig
|
||||
} = mainStore.config;
|
||||
let writeServerUrl: Array<string> | string = serverUrl;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"author": "leizi97",
|
||||
"description": "A simple network initiator based on Easytier",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.3",
|
||||
"scripts": {
|
||||
"dev": "nuxt dev --dotenv env/.env.dev --host 0.0.0.0",
|
||||
"build": "nuxt generate --dotenv env/.env.prod",
|
||||
|
||||
+41
-3
@@ -127,7 +127,8 @@
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox
|
||||
:disabled="mainStore.config.disbleListenner"
|
||||
v-model="mainStore.config.enableCustomListenerV6"
|
||||
:model-value="mainStore.config.enableCustomListenerV6"
|
||||
@change="handleCustomListenerV6Change"
|
||||
>
|
||||
自定义IPV6监听地址
|
||||
</ElCheckbox>
|
||||
@@ -140,7 +141,7 @@
|
||||
placeholder="请输入自定义IPV6监听地址"
|
||||
/>
|
||||
</div>
|
||||
<ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听">
|
||||
<ElTooltip content="例如:tcp://[::]:11010,如果未设置,将在随机UDP端口上监听(内核版本2.2.3之后,ipv6监听被移除并合并到'自定义监听')">
|
||||
<ElIcon><QuestionFilled /></ElIcon>
|
||||
</ElTooltip>
|
||||
<CoreVersionWarning version="2.1.0" />
|
||||
@@ -180,6 +181,29 @@
|
||||
(不使用自定义网卡名,那么联机时默认会生成一个名为 "et_xxx" 的网卡,也可以使用 “设置跃点” 功能,除非你启用了下面的功能)
|
||||
</ElText>
|
||||
</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>
|
||||
|
||||
<ElDivider />
|
||||
@@ -269,6 +293,20 @@
|
||||
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 data = ["trace", "debug", "info", "warn", "error", "off"];
|
||||
const guids = ref<string[][]>([]);
|
||||
@@ -297,7 +335,7 @@
|
||||
};
|
||||
|
||||
// 为bind_device功能增加改方法
|
||||
const _getGuids = async () => {
|
||||
const getGuids = async () => {
|
||||
const guidsValue = await invoke<string[][]>("get_network_adapter_guids");
|
||||
guids.value = guidsValue && guidsValue.length > 0 ? guidsValue : [];
|
||||
};
|
||||
|
||||
+6
-2
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="flex h-full flex-col gap-[10px]">
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElRadioGroup
|
||||
:disabled="!data.isSwitchEnable"
|
||||
v-model="mainStore.cidrEnable"
|
||||
@@ -7,6 +8,11 @@
|
||||
<ElRadioButton :value="true">开启</ElRadioButton>
|
||||
<ElRadioButton :value="false">关闭</ElRadioButton>
|
||||
</ElRadioGroup>
|
||||
<div class="flex items-center gap-[10px]">
|
||||
<ElCheckbox v-model="mainStore.proxyForwardBySystem">通过系统内核转发子网代理数据包,禁用内置NAT</ElCheckbox>
|
||||
<CoreVersionWarning version="2.2.3" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 overflow-auto">
|
||||
<ElInput
|
||||
placeholder="例如: 192.168.1.0/24 一行一个"
|
||||
@@ -113,6 +119,4 @@
|
||||
onBeforeUnmount(() => {
|
||||
unlistenStart && unlistenStart();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
+27
-1
@@ -749,7 +749,8 @@
|
||||
const config = mainStore.config;
|
||||
// console.error(config);
|
||||
const protocols = supportProtocols();
|
||||
const data = reactive({ //easytierGame有没有新版
|
||||
const data = reactive({
|
||||
//easytierGame有没有新版
|
||||
logVisible: false,
|
||||
cidrVisible: 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 () => {
|
||||
if (config.connectAfterStart && data.coreVersion) {
|
||||
await reset();
|
||||
@@ -1212,6 +1231,7 @@
|
||||
await compatibleInitAutoStart();
|
||||
// await initAutoStart();
|
||||
await initStartWinIpBroadcast();
|
||||
await compatibleIpv6Listener();
|
||||
await getCoreVersion();
|
||||
await listenObj.listenThreadId();
|
||||
await listenObj.listenServerThreadId();
|
||||
@@ -1374,6 +1394,12 @@
|
||||
if (config.disableKcpInput) {
|
||||
args.push("--disable-kcp-input");
|
||||
}
|
||||
if (config.bindDeviceEnable) {
|
||||
args.push("--bind-device", "true");
|
||||
}
|
||||
if (mainStore.proxyForwardBySystem) {
|
||||
args.push("--proxy-forward-by-system");
|
||||
}
|
||||
return args;
|
||||
};
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -1241,7 +1241,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
|
||||
|
||||
[[package]]
|
||||
name = "easytier-game"
|
||||
version = "1.4.2"
|
||||
version = "1.4.3"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.2",
|
||||
"log",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "easytier-game"
|
||||
version = "1.4.2"
|
||||
version = "1.4.3"
|
||||
homepage = "https://github.com/EasyTier/EasyTier"
|
||||
repository = "https://github.com/EasyTier/EasytierGame"
|
||||
description = "A simple network initiator based on Easytier"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "easytier-game",
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.3",
|
||||
"identifier": "com.tauri.easytier-game",
|
||||
|
||||
"build": {
|
||||
@@ -12,7 +12,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "easytier-game 1.4.2",
|
||||
"title": "easytier-game 1.4.3",
|
||||
"label": "main",
|
||||
"minWidth": 340,
|
||||
"width": 340,
|
||||
|
||||
+6
-1
@@ -40,7 +40,8 @@ const store = defineStore("main", {
|
||||
enablePreventSleep: false, //组织系统休眠
|
||||
compression: "none", //加密算法
|
||||
enableKcpProxy: true, //启用kcp代理 默认开启
|
||||
disableKcpInput: false //禁用kcp输入
|
||||
disableKcpInput: false, //禁用kcp输入
|
||||
bindDeviceEnable: false, //是否绑定设备
|
||||
},
|
||||
serverConfig: {
|
||||
enableWhiteList: true, // 是否启用白名单
|
||||
@@ -51,6 +52,7 @@ const store = defineStore("main", {
|
||||
port: "11010" // 服务器端口
|
||||
},
|
||||
cidrEnable: false,
|
||||
proxyForwardBySystem: false, // 是否通过系统内核转发子网代理数据包,禁用内置NAT
|
||||
basePeers: ["public.easytier.top:11010", "public.easytier.net:11010"],
|
||||
theme: false, //主题 false light true dark
|
||||
configStartEnable: false, //使用配置文件启动
|
||||
@@ -117,6 +119,8 @@ const store = defineStore("main", {
|
||||
"config.enableKcpProxy",
|
||||
"config.disableKcpInput",
|
||||
|
||||
"config.bindDeviceEnable",
|
||||
|
||||
"serverConfig.autoStart",
|
||||
// 'serverConfig.enableListener',
|
||||
"serverConfig.enableWhiteList",
|
||||
@@ -125,6 +129,7 @@ const store = defineStore("main", {
|
||||
"serverConfig.port",
|
||||
|
||||
"cidrEnable",
|
||||
"proxyForwardBySystem",
|
||||
"basePeers",
|
||||
"theme",
|
||||
"configStartEnable",
|
||||
|
||||
Reference in New Issue
Block a user