Skip to content

Commit

Permalink
✨ feat(OtherTools): add web vpn convert website and open other sites
Browse files Browse the repository at this point in the history
  • Loading branch information
CakeAL committed Nov 5, 2024
1 parent 2f732b8 commit e0dd61d
Show file tree
Hide file tree
Showing 9 changed files with 241 additions and 65 deletions.
87 changes: 87 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ mac_address = "1.1.7"
# tauri plugin
window-vibrancy = "0.5.2"
tauri-plugin-dialog = "2"
tauri-plugin-shell = "2"
# others
anyhow = "1"
rand = "0.8.5"
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"core:window:allow-close",
"core:window:allow-start-dragging",
"updater:default",
"dialog:default"
"dialog:default",
"shell:default"
]
}
4 changes: 3 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use tauri_plugin_updater::UpdaterExt;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let mut builder = tauri::Builder::new().plugin(tauri_plugin_dialog::init());
let mut builder = tauri::Builder::new()
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_shell::init());
#[cfg(not(any(target_os = "android", target_os = "linux")))]
{
builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"endpoints": [
"https://github.com/CakeAL/ustb-wifi-tools/releases/latest/download/latest.json"
]
},
"shell": {
"open": false
}
}
}
90 changes: 71 additions & 19 deletions src/pages/About.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { open } from "@tauri-apps/plugin-shell";
import { ref } from "vue";
const show = ref(false);
Expand All @@ -7,20 +8,24 @@ const show1 = ref(false);

<template>
<div class="container">
<n-h2 prefix="bar" type="success" style="margin-top: 15px;">
<n-text type="success">
关于作者以及 Tips
</n-text>
<n-h2 prefix="bar" type="success" style="margin-top: 15px">
<n-text type="success"> 关于作者以及 Tips </n-text>
</n-h2>
<n-card hoverable class="my-card">
<n-space vertical>
<p>更方便的获取 USTB 校园网每日使用情况,查询流量,解绑 MAC 地址等。</p>
<p>通过调用校园网的 API,并且数据都在本地进行存储。</p>
<p>
通过调用校园网的
API,并且数据都在本地进行存储。
</p>
<p>
源代码可以在 https://github.com/CakeAL/ustb-wifi-tools/
源代码可以在
<a
@click="open('https://github.com/CakeAL/ustb-wifi-tools/')"
style="
text-decoration: underline;
text-underline-offset: 5px;
cursor: pointer;
"
>github.com/CakeAL/ustb-wifi-tools/</a
>
查看,欢迎Star,Folk并提交PR
</p>
<p>对此软件有任何问题可以在 Github 项目提交 issues 。</p>
Expand All @@ -37,7 +42,7 @@ const show1 = ref(false);
/>
</n-collapse-transition>
<h4>关于作者:一个来自USTB计院物联网工程的老东西。</h4>
<p>这是我的Github:https://github.com/CakeAL/ </p>
<p>这是我的Github:https://github.com/CakeAL/</p>
<p>这是我的bilibili: https://space.bilibili.com/13161874</p>
<h4>下面是学校给你的TIPS</h4>
<p>校园网老是要重新登陆:</p>
Expand All @@ -51,23 +56,70 @@ const show1 = ref(false);
src="/A250E7A1CDCE4161894E703B177AC0C6_频繁掉线.jpg"
/>
</n-collapse-transition>
<p>USTB-V6接入说明:http://cipp.ustb.edu.cn/app.IAManage/index.jsp?m=iamanage&c=Notice&a=noticeInfo&id=22</p>
<p>一个原来能看校园网出口出入流量的网站,现在已经打不开了:http://traffic.ustb.edu.cn/</p>
<p
style="
text-decoration: underline;
text-underline-offset: 5px;
cursor: pointer;
"
@click="
open(
'http://cipp.ustb.edu.cn/app.IAManage/index.jsp?m=iamanage&c=Notice&a=noticeInfo&id=22'
)
"
>
USTB-V6接入说明
</p>
<p>
一个原来能看校园网出口出入流量的网站,现在已经打不开了:http://traffic.ustb.edu.cn/
</p>
<h4>校园网 Radius 超时可能解决方法:</h4>
<p>0. 点击本应用登录页的登录校园网功能,或尝试手动打开http://login.ustb.edu.cn/登录</p>
<p>1. 不要使用注销页直接登陆,首先忽略此网络(忘记),然后重开Wi-Fi,再进行登陆,会跳出登录页(虽然ip和注销页是一样的)</p>
<p>
0.
点击本应用登录页的登录校园网功能,或尝试手动打开http://login.ustb.edu.cn/登录
</p>
<p>
1.
不要使用注销页直接登陆,首先忽略此网络(忘记),然后重开Wi-Fi,再进行登陆,会跳出登录页(虽然ip和注销页是一样的)
</p>
<p>2. 关掉代理,再重新进行上述操作。</p>
<p>3. 重启电脑。</p>
<p>注销页和登录页网址:http://202.204.48.66/ 或者 http://login.ustb.edu.cn/ (你知道么,学号是可以点击的)</p>
<p>
注销页和登录页网址:<a
@click="open('http://202.204.48.66/')"
style="
text-decoration: underline;
text-underline-offset: 5px;
cursor: pointer;
"
>http://202.204.48.66/</a
>
或者<a
@click="open('http://login.ustb.edu.cn/')"
style="
text-decoration: underline;
text-underline-offset: 5px;
cursor: pointer;
"
>http://login.ustb.edu.cn/</a
>
(你知道么,学号是可以点击的)
</p>
<h4>给校园网省流方法(偏向使用 ipv6 的方法):</h4>
<p>1. 设置 ipv6 DNS服务器,保证 ipv6-test 能全部通过。一般浏览器都是默认优先 ipv6 的</p>
<p>
1. 设置 ipv6 DNS服务器,保证 ipv6-test
能全部通过。一般浏览器都是默认优先 ipv6 的
</p>
<p>2. Steam:使用 Dogfight360 提供的工具,对 Steam 进行 ipv6 代理。</p>
<p>3. 软件镜像源,使用带 ipv6 的镜像源,比如清华源(一般会自动选择 ipv6) mirros6 </p>
<p>
3. 软件镜像源,使用带 ipv6 的镜像源,比如清华源(一般会自动选择 ipv6)
mirros6
</p>
<p>4. 通过 pt 站下载大型软件(比如 Photoshop 等)</p>
<p>5. 自建/使用 ipv6 代理服务器</p>
<br/>
<br />
<p>当前 version = "0.8.6"</p>
</n-space>
</n-space>
</n-card>
</div>
</template>
Expand Down
28 changes: 19 additions & 9 deletions src/pages/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { invoke } from "@tauri-apps/api/core";
import { ref, onMounted, CSSProperties } from "vue";
import { useMessage, useLoadingBar } from "naive-ui";
import { ColorPaletteOutline } from "@vicons/ionicons5";
import { open } from "@tauri-apps/plugin-shell";
import { dataDir } from "@tauri-apps/api/path";
const loadingBar = useLoadingBar();
const pop_message = useMessage();
Expand Down Expand Up @@ -149,6 +151,13 @@ const set_background_blur = async () => {
blur: blur.value,
}).catch((err) => pop_message.error(err));
};
const open_config = async () => {
let path = await dataDir() + "/ustb-wifi-tools" ;
console.log(path);
await open(path);
};
</script>

<template>
Expand Down Expand Up @@ -197,16 +206,17 @@ const set_background_blur = async () => {
<div v-else>
<h3>您已登录,如果其他页面不能获取到信息,请关闭软件重新打开。</h3>
</div>
<!-- <h3>当前有效JSESSIONID:{{ sessionid }}</h3>
<h4>
⬆️这个东西是当前打开应用期间的访问你的校园网数据的一个凭证,如果你发给其他人,那么一段时间内别人也可以看你的数据,这很危险,孩子。
</h4> -->
<n-button strong secondary type="info" @click="logout"> 登出 </n-button>
<h4>如果想自己更改配置文件:</h4>
<p>
Windows: C:\Users\%UserName%\AppData\Roaming\ustb-wifi-tools\config.json
</p>
<p>macOS: ~/Library/Application Support/ustb-wifi-tools/config.json</p>
<h4>
如果想自己更改配置文件:<n-button
strong
secondary
type="info"
@click="open_config"
>
打开配置文件夹
</n-button>
</h4>
<n-popover trigger="hover">
<template #trigger>
<n-button
Expand Down
Loading

0 comments on commit e0dd61d

Please sign in to comment.