Merge pull request #1313 from JeLuF/cloudflared

Share ED via Cloudflare's ArgoTunnel
This commit is contained in:
cmdr2
2023-06-05 16:20:40 +05:30
committed by GitHub
8 changed files with 171 additions and 8 deletions

View File

@ -186,6 +186,7 @@
const EVENT_TASK_START = "taskStart"
const EVENT_TASK_END = "taskEnd"
const EVENT_TASK_ERROR = "task_error"
const EVENT_PING = "ping"
const EVENT_UNEXPECTED_RESPONSE = "unexpectedResponse"
const EVENTS_TYPES = [
EVENT_IDLE,
@ -196,6 +197,7 @@
EVENT_TASK_START,
EVENT_TASK_END,
EVENT_TASK_ERROR,
EVENT_PING,
EVENT_UNEXPECTED_RESPONSE,
]
@ -240,6 +242,7 @@
setServerStatus("error", "offline")
return false
}
// Set status
switch (serverState.status) {
case ServerStates.init:
@ -261,6 +264,7 @@
break
}
serverState.time = Date.now()
await eventSource.fireEvent(EVENT_PING, serverState)
return true
} catch (e) {
console.error(e)