mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2025-05-19 10:27:56 +00:00
更新element-plus和nuxt3包体,删除增强工具-自定义防火墙策略按钮,修复一键关闭防火墙无效的bug
This commit is contained in:
+3
-3
@@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
"@element-plus/nuxt": "^1.1.1",
|
"@element-plus/nuxt": "1.1.1",
|
||||||
"@nuxtjs/tailwindcss": "6.13.2",
|
"@nuxtjs/tailwindcss": "6.13.2",
|
||||||
"@pinia/nuxt": "0.11.0",
|
"@pinia/nuxt": "0.11.0",
|
||||||
"@tauri-apps/api": "2.5.0",
|
"@tauri-apps/api": "2.5.0",
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
"@vitejs/plugin-vue-jsx": "4.1.2",
|
"@vitejs/plugin-vue-jsx": "4.1.2",
|
||||||
"@vueuse/core": "12.7.0",
|
"@vueuse/core": "12.7.0",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
"element-plus": "2.9.7",
|
"element-plus": "2.9.10",
|
||||||
"less": "4.2.1",
|
"less": "4.2.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nuxt": "3.16.2",
|
"nuxt": "3.17.2",
|
||||||
"pinia": "3.0.2",
|
"pinia": "3.0.2",
|
||||||
"pinia-plugin-persistedstate": "^4.2.0",
|
"pinia-plugin-persistedstate": "^4.2.0",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
|
|||||||
+26
-14
@@ -25,7 +25,7 @@
|
|||||||
<ElLink
|
<ElLink
|
||||||
class="mr-[10px] !text-[15px]"
|
class="mr-[10px] !text-[15px]"
|
||||||
type="info"
|
type="info"
|
||||||
:underline="false"
|
underline="never"
|
||||||
@click="open('https://github.com/dechamps/WinIPBroadcast/releases/tag/winipbroadcast-1.6')"
|
@click="open('https://github.com/dechamps/WinIPBroadcast/releases/tag/winipbroadcast-1.6')"
|
||||||
>
|
>
|
||||||
WinIPBroadcast
|
WinIPBroadcast
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<ElLink
|
<ElLink
|
||||||
class="!text-[15px]"
|
class="!text-[15px]"
|
||||||
type="info"
|
type="info"
|
||||||
:underline="false"
|
underline="never"
|
||||||
@click="open('https://r1ch.net/projects/forcebindip')"
|
@click="open('https://r1ch.net/projects/forcebindip')"
|
||||||
>
|
>
|
||||||
ForceBindIP
|
ForceBindIP
|
||||||
@@ -198,16 +198,10 @@
|
|||||||
<ElButton
|
<ElButton
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
|
@click.stop="handleCloseAllFireWall"
|
||||||
>
|
>
|
||||||
一键关闭防火墙
|
一键关闭防火墙
|
||||||
</ElButton>
|
</ElButton>
|
||||||
<ElButton
|
|
||||||
@click="handleCustomFireWall"
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
自定义防火墙策略
|
|
||||||
</ElButton>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-[10px]">
|
<div class="mb-[10px]">
|
||||||
<ElText class="!mx-[10px]">域防火墙</ElText>
|
<ElText class="!mx-[10px]">域防火墙</ElText>
|
||||||
@@ -251,10 +245,17 @@
|
|||||||
<ElButton
|
<ElButton
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="data.isPing"
|
:disabled="data.isPing"
|
||||||
@click="handleTestPing"
|
@click="handleTestPing('v4')"
|
||||||
>
|
>
|
||||||
Ping一下
|
Ping一下
|
||||||
</ElButton>
|
</ElButton>
|
||||||
|
<!-- <ElButton
|
||||||
|
size="small"
|
||||||
|
:disabled="data.isPing"
|
||||||
|
@click="handleTestPing('v6')"
|
||||||
|
>
|
||||||
|
Ping一下(v6)
|
||||||
|
</ElButton> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-[5px] flex-1 overflow-auto">
|
<div class="mt-[5px] flex-1 overflow-auto">
|
||||||
<ElInput
|
<ElInput
|
||||||
@@ -305,8 +306,18 @@
|
|||||||
forceBindStart: false
|
forceBindStart: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleCustomFireWall = async () => {
|
|
||||||
await open("wf.msc");
|
const handleCloseAllFireWall = async () => {
|
||||||
|
try {
|
||||||
|
const output = await Command.create("netsh", ["advfirewall", "set", "allprofiles", "state", "off"], {
|
||||||
|
encoding: "gb2312"
|
||||||
|
}).execute();
|
||||||
|
ElMessage.success("关闭成功");
|
||||||
|
await initFirewall();
|
||||||
|
} catch (err) {
|
||||||
|
ElMessage.error(`关闭失败${err}`);
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleTabsChange = async (tabPaneName: TabPaneName) => {
|
const handleTabsChange = async (tabPaneName: TabPaneName) => {
|
||||||
@@ -341,14 +352,15 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleTestPing = async () => {
|
const handleTestPing = async (type: 'v4' | 'v6' = 'v4') => {
|
||||||
// const is = isValidIP(data.pingIp);
|
// const is = isValidIP(data.pingIp);
|
||||||
if (data.pingIp) {
|
if (data.pingIp) {
|
||||||
data.pingLog = "";
|
data.pingLog = "";
|
||||||
data.isPing = true;
|
data.isPing = true;
|
||||||
|
const args = type === 'v4' ? ["-n", "1", data.pingIp] : ["-6", '-n', "1", data.pingIp]
|
||||||
try {
|
try {
|
||||||
for (let i = 0; i < data.pingNum; i++) {
|
for (let i = 0; i < data.pingNum; i++) {
|
||||||
const output = await Command.create("ping", ["-n", "1", data.pingIp], {
|
const output = await Command.create("ping", args, {
|
||||||
encoding: "gb2312"
|
encoding: "gb2312"
|
||||||
}).execute();
|
}).execute();
|
||||||
if (output.stdout) {
|
if (output.stdout) {
|
||||||
|
|||||||
Generated
+2171
-510
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user