mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-09-08 02:12:10 +00: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,
|
|
});
|
|
}
|
|
});
|
|
|
|
};
|