2017-03-27 02:15:31 +08:00
|
|
|
<template>
|
2023-02-16 02:45:48 +08:00
|
|
|
<ProxyView :proxies="proxies" proxyType="udp" />
|
2017-03-27 02:15:31 +08:00
|
|
|
</template>
|
|
|
|
|
2023-02-16 02:45:48 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { UDPProxy } from '../utils/proxy.js'
|
|
|
|
import ProxyView from './ProxyView.vue'
|
|
|
|
|
|
|
|
let proxies = ref<UDPProxy[]>([])
|
|
|
|
|
|
|
|
const fetchData = () => {
|
|
|
|
fetch('../api/proxy/udp', { credentials: 'include' })
|
|
|
|
.then((res) => {
|
|
|
|
return res.json()
|
|
|
|
})
|
|
|
|
.then((json) => {
|
|
|
|
for (let proxyStats of json.proxies) {
|
|
|
|
proxies.value.push(new UDPProxy(proxyStats))
|
2017-03-27 02:15:31 +08:00
|
|
|
}
|
2023-02-16 02:45:48 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchData()
|
2017-03-27 02:15:31 +08:00
|
|
|
</script>
|
|
|
|
|
2023-02-16 02:45:48 +08:00
|
|
|
<style></style>
|