2021-05-11 13:37:14 +08:00
|
|
|
<template>
|
2024-02-01 10:54:57 +08:00
|
|
|
<ProxyView :proxies="proxies" proxyType="sudp" @refresh="fetchData"/>
|
2021-05-11 13:37:14 +08:00
|
|
|
</template>
|
|
|
|
|
2023-02-16 02:45:48 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { SUDPProxy } from '../utils/proxy.js'
|
|
|
|
import ProxyView from './ProxyView.vue'
|
|
|
|
|
|
|
|
let proxies = ref<SUDPProxy[]>([])
|
|
|
|
|
|
|
|
const fetchData = () => {
|
|
|
|
fetch('../api/proxy/sudp', { credentials: 'include' })
|
|
|
|
.then((res) => {
|
|
|
|
return res.json()
|
|
|
|
})
|
|
|
|
.then((json) => {
|
2024-02-01 10:54:57 +08:00
|
|
|
proxies.value = []
|
2023-02-16 02:45:48 +08:00
|
|
|
for (let proxyStats of json.proxies) {
|
|
|
|
proxies.value.push(new SUDPProxy(proxyStats))
|
2021-05-11 13:37:14 +08:00
|
|
|
}
|
2023-02-16 02:45:48 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
fetchData()
|
2021-05-11 13:37:14 +08:00
|
|
|
</script>
|
|
|
|
|
2023-02-16 02:45:48 +08:00
|
|
|
<style></style>
|