Add reverse proxy setting page for controlling cloudflared

This commit is contained in:
Louis Lam
2022-03-30 01:49:45 +08:00
parent a6b52b7ba6
commit f1f4b3b377
6 changed files with 194 additions and 9 deletions

View File

@@ -42,6 +42,13 @@ export default {
statusPageList: [],
connectionErrorMsg: "Cannot connect to the socket server. Reconnecting...",
showReverseProxyGuide: true,
cloudflared: {
cloudflareTunnelToken: "",
installed: null,
running: false,
message: "",
errorMessage: "",
}
};
},
@@ -231,6 +238,12 @@ export default {
this.socket.firstConnect = false;
});
// cloudflared
socket.on("cloudflared_installed", (res) => this.cloudflared.installed = res);
socket.on("cloudflared_running", (res) => this.cloudflared.running = res);
socket.on("cloudflared_message", (res) => this.cloudflared.message = res);
socket.on("cloudflared_errorMessage", (res) => this.cloudflared.errorMessage = res);
socket.on("cloudflared_token", (res) => this.cloudflared.cloudflareTunnelToken = res);
},
storage() {