mirror of
https://github.com/fatedier/frp.git
synced 2025-06-17 00:38:22 +00:00
Add xtcp in dashboard for frps
This commit is contained in:
parent
c6f9d8d403
commit
5305a43305
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>frps dashboard</title>
|
||||
<script type="module" crossorigin src="./index-82-40HIG.js"></script>
|
||||
<script type="module" crossorigin src="./index-1T_Vz_yg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./index-rzPDshRD.css">
|
||||
</head>
|
||||
|
||||
|
1
web/frps/components.d.ts
vendored
1
web/frps/components.d.ts
vendored
@ -33,6 +33,7 @@ declare module 'vue' {
|
||||
ProxiesTCP: typeof import('./src/components/ProxiesTCP.vue')['default']
|
||||
ProxiesTCPMux: typeof import('./src/components/ProxiesTCPMux.vue')['default']
|
||||
ProxiesUDP: typeof import('./src/components/ProxiesUDP.vue')['default']
|
||||
ProxiesXTCP: typeof import('./src/components/ProxiesXTCP.vue')['default']
|
||||
ProxyView: typeof import('./src/components/ProxyView.vue')['default']
|
||||
ProxyViewExpand: typeof import('./src/components/ProxyViewExpand.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
|
@ -42,6 +42,7 @@
|
||||
<el-menu-item index="/proxies/tcpmux">TCPMUX</el-menu-item>
|
||||
<el-menu-item index="/proxies/stcp">STCP</el-menu-item>
|
||||
<el-menu-item index="/proxies/sudp">SUDP</el-menu-item>
|
||||
<el-menu-item index="/proxies/xtcp">XTCP</el-menu-item>
|
||||
</el-sub-menu>
|
||||
<el-menu-item index="">Help</el-menu-item>
|
||||
</el-menu>
|
||||
|
27
web/frps/src/components/ProxiesXTCP.vue
Normal file
27
web/frps/src/components/ProxiesXTCP.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<ProxyView :proxies="proxies" proxyType="xtcp" @refresh="fetchData" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { TCPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<TCPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/proxy/xtcp', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
proxies.value = []
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(new TCPProxy(proxyStats))
|
||||
}
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style></style>
|
@ -7,6 +7,7 @@ import ProxiesHTTPS from '../components/ProxiesHTTPS.vue'
|
||||
import ProxiesTCPMux from '../components/ProxiesTCPMux.vue'
|
||||
import ProxiesSTCP from '../components/ProxiesSTCP.vue'
|
||||
import ProxiesSUDP from '../components/ProxiesSUDP.vue'
|
||||
import ProxiesXTCP from '../components/ProxiesXTCP.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
@ -51,6 +52,11 @@ const router = createRouter({
|
||||
name: 'ProxiesSUDP',
|
||||
component: ProxiesSUDP,
|
||||
},
|
||||
{
|
||||
path: '/proxies/xtcp',
|
||||
name: 'ProxiesXTCP',
|
||||
component: ProxiesXTCP,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user