mirror of https://github.com/fatedier/frp.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
603 B
Vue
28 lines
603 B
Vue
<template>
|
|
<ProxyView :proxies="proxies" proxyType="tcp" @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/tcp', { 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>
|