mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-11 08:04:17 -08:00
20 lines
391 B
JavaScript
20 lines
391 B
JavaScript
const { checkLogin } = require("../util-server");
|
|
|
|
const prefix = "cloudflared_";
|
|
|
|
module.exports.cloudflaredSocketHandler = (socket) => {
|
|
|
|
socket.on(prefix + "start", async (callback) => {
|
|
try {
|
|
checkLogin(socket);
|
|
|
|
} catch (error) {
|
|
callback({
|
|
ok: false,
|
|
msg: error.message,
|
|
});
|
|
}
|
|
});
|
|
|
|
};
|