更新说明
This commit is contained in:
@@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
第一步:下载 upx 安装文件:[NAT 内网穿透.upx](https://github.com/lblblong/nat-utools/releases/download/v1.2.0/NAT-1.2.0.upx)
|
不知道为什么打包后安装会读取不到 preload 里设置的属性,所以不能直接下载 upx 安装了,以下提供源码安装方法(很简单)。
|
||||||
|
|
||||||
第二步:按住 `alt + 空格` 打开 utools 输入框,把 upx 文件拖拽进去安装即可
|
第一步:下载压缩包源文件:
|
||||||
|
|
||||||
|
第二步:解压压缩包,按住 `alt + 空格` 打开 utools 输入框,把压缩包中的 plugin.json 文件拖拽进去,然后选择 "安装插件" 即可
|
||||||
|
|
||||||
然后在 utools 输入框输入关键词即可打开内网穿透面板:nw,内网穿透
|
然后在 utools 输入框输入关键词即可打开内网穿透面板:nw,内网穿透
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nat-utools",
|
"name": "nat-utools",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": ".",
|
"homepage": ".",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -4,9 +4,15 @@ import axios from 'axios'
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
localtunnel: typeof localtunnel
|
localtunnel: typeof localtunnel
|
||||||
axios: typeof axios
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
axios.interceptors.request.use(
|
||||||
|
function (config) {
|
||||||
|
// 解决 localtrunnel 返回 401 问题
|
||||||
|
config.headers['Bypass-Tunnel-Reminder'] = 'true'
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
window.localtunnel = localtunnel
|
window.localtunnel = localtunnel
|
||||||
window.axios = axios
|
|
||||||
|
|||||||
@@ -10,19 +10,9 @@ import { Nat, NatState } from '../model/nat'
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
localtunnel: typeof localtunnel
|
localtunnel: typeof localtunnel
|
||||||
axios: any
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
window.axios.interceptors.request.use(
|
|
||||||
function (config) {
|
|
||||||
// 解决 localtrunnel 返回 401 问题
|
|
||||||
config.headers['Bypass-Tunnel-Reminder'] = 'true'
|
|
||||||
return config
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
function getStorageID() {
|
function getStorageID() {
|
||||||
return utools.getLocalId() + '_servers'
|
return utools.getLocalId() + '_servers'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user