Skip to content

Commit

Permalink
[*] 添加隧道BUG修复版
Browse files Browse the repository at this point in the history
  • Loading branch information
Daiyangcheng committed Feb 17, 2024
1 parent ed4ada4 commit a002a62
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 26 deletions.
8 changes: 7 additions & 1 deletion src/components/MainSideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const menuOptions = [
{
label: '新春活动',
key: 'yearly',
show: true,
show: false,
icon: renderIcon(PlanetOutline),
children: [
{
Expand Down Expand Up @@ -128,6 +128,12 @@ const menuOptions = [
// key: "XMNWC-Bore",
// icon: renderIcon(Flash),
// },
// {
// path: '/lan',
// label: '联机大厅',
// key: 'Lan',
// icon: renderIcon(AttachMoneyFilled)
// },
{
path: '/donate',
label: '赞助',
Expand Down
11 changes: 10 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,16 @@ const routes = [
title: '节点状态'
},
component: () => import('../views/Status.vue')
}
},
// {
// path: '/lan',
// name: 'Lan',
// meta: {
// keepAlive: true,
// title: '联机大厅'
// },
// component: () => import('../views/LanLobby.vue')
// }
]
}
]
Expand Down
42 changes: 18 additions & 24 deletions src/views/AddProxies.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ n-input {
<script setup>
import { ref } from 'vue'
import store from '../utils/stores/store.js'
import { get } from '../utils/request.js'
import { get, post } from '../utils/request.js'
import { sendErrorMessage } from '../utils/message'
import { SendErrorDialog, SendSuccessDialog } from '../utils/dialog.js'
Expand Down Expand Up @@ -236,29 +236,23 @@ function addproxy() {
SendErrorDialog('参数检查未通过,请检查信息格式是否正确')
return
}
const rs = get(
'https://api.locyanfrp.cn/Proxies/add?username=' +
store.getters.get_username +
'&name=' +
ProxyInfo.value.proxy_name +
'&key=' +
store.getters.get_frp_token +
'&ip=' +
ProxyInfo.value.local_ip +
'&type=' +
ProxyInfo.value.proxy_type +
'&lp=' +
ProxyInfo.value.local_port +
'&rp=' +
ProxyInfo.value.remote_port +
'&ue=0&uz=0&id=' +
ProxyInfo.value.node +
'&token=' +
store.getters.get_token +
'&url=' +
ProxyInfo.value.domain +
'&sk=' +
ProxyInfo.value.sk
const TunnelCreateInfo = {
"username": store.getters.get_username,
"name": ProxyInfo.value.proxy_name,
"key": store.getters.get_frp_token,
"ip": ProxyInfo.value.local_ip,
"type": ProxyInfo.value.proxy_type,
"lp": ProxyInfo.value.local_port,
"rp": ProxyInfo.value.remote_port,
"ue": "0",
"uz": "0",
"id": ProxyInfo.value.node,
"token": store.getters.get_token,
"url": ProxyInfo.value.domain,
"sk": ProxyInfo.value.sk
};
const rs = post(
'https://api-v2.locyanfrp.cn/api/v2/proxies/add', TunnelCreateInfo
)
rs.then((res) => {
if (res.status === true) {
Expand Down
8 changes: 8 additions & 0 deletions src/views/LanLobby.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<n-h1 prefix="bar" style="margin-top: 30px">
<i class="twa twa-page-facing-up"></i>
<n-text type="primary">联机大厅</n-text>
</n-h1>
</template>
<script setup>
</script>

0 comments on commit a002a62

Please sign in to comment.