ProxiesSudp.vue 562 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <ProxyView :proxies="proxies" proxyType="sudp" />
  3. </template>
  4. <script setup lang="ts">
  5. import { ref } from 'vue'
  6. import { SUDPProxy } from '../utils/proxy.js'
  7. import ProxyView from './ProxyView.vue'
  8. let proxies = ref<SUDPProxy[]>([])
  9. const fetchData = () => {
  10. fetch('../api/proxy/sudp', { credentials: 'include' })
  11. .then((res) => {
  12. return res.json()
  13. })
  14. .then((json) => {
  15. for (let proxyStats of json.proxies) {
  16. proxies.value.push(new SUDPProxy(proxyStats))
  17. }
  18. })
  19. }
  20. fetchData()
  21. </script>
  22. <style></style>