mirror of
https://github.com/fatedier/frp.git
synced 2025-06-17 00:38:22 +00:00
42 lines
1023 B
Vue
42 lines
1023 B
Vue
<template>
|
|
<ProxyView :proxies="proxies" proxyType="https" />
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import { HTTPSProxy } from '../utils/proxy.js'
|
|
import ProxyView from './ProxyView.vue'
|
|
|
|
let proxies = ref<HTTPSProxy[]>([])
|
|
|
|
const fetchData = () => {
|
|
let vhostHTTPSPort: number
|
|
let subdomainHost: string
|
|
fetch('../api/serverinfo', { credentials: 'include' })
|
|
.then((res) => {
|
|
return res.json()
|
|
})
|
|
.then((json) => {
|
|
vhostHTTPSPort = json.vhostHTTPSPort
|
|
subdomainHost = json.subdomainHost
|
|
if (vhostHTTPSPort == null || vhostHTTPSPort == 0) {
|
|
return
|
|
}
|
|
fetch('../api/proxy/https', { credentials: 'include' })
|
|
.then((res) => {
|
|
return res.json()
|
|
})
|
|
.then((json) => {
|
|
for (let proxyStats of json.proxies) {
|
|
proxies.value.push(
|
|
new HTTPSProxy(proxyStats, vhostHTTPSPort, subdomainHost)
|
|
)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
fetchData()
|
|
</script>
|
|
|
|
<style></style>
|