ZeroTier's Telegram node management robot, can manage devices, monitor and notification node online and offline, new device access.
The project uses Vercel's Serverless function as the backend, Firebase's Realtime Database as the database, and UptimeRobot as the timed task, and interacts through the Telegram Bot API.
Safety first, so the configuration is more cumbersome. Firebase's Realtime database requires rules to be set. But it’s not necessary, it’s just that you may be maliciously attacked.
Because the interface path is fixed, if the project is open source, it may be called maliciously. So the interface of Telegram Webhook has IP verify. The interface used for UptimeRobot call has Token verify.
Similarly, Telegram Bot has also taken protective measures. Without filling in the Telegram ID, anyone can use the bot, but there is no notification function. Only when the Telegram ID is filled in, the notification function is available. Because bots need to know the Chat ID to send messages, and group use is not currently supported.
- Fork Repo
- Import deployment in Vercel
Open ZeroTier Account Center click New Token
generate
Open ZeroTier Network copy NETWORK ID
Open Telegram BotFather new bot
Used to store data
- Open Firebase Console new project
- New
Realtime Database
, copy database address - Set rules, use random string instead of
X_SECRET
{
"rules":{
"X_SECRET":{
".read":true,
".write":true
}
}
}
- Splice
databaseURL+X_SECRET
, example:https://vervel-default-rtdb.firebaseio.com/x2ox
Used for authentication and notification.
Can be obtained through Bot's /info
command or other methods
used to cooperate with UptimeRobot to check status regularly. It's a random string.
- Bind a custom domain name for the project, it must be a single domain name (Telegram requires a non-wildcard certificate).
- Set by
curl -F "url=https://<DOMAIN>/api/zerotier" https://api.telegram.org/bot<YOURTOKEN>/setWebhook
Open UptimeRobot Add monitoring, DOMAIN
is your configured domain name,
TIMER_TOKEN
is a random string in the environment variable, the final address is https://<DOMAIN>/api/timer?token=<TIMER_TOKEN>
- Add FRP API
- Vercel supply Open Source project sponsorship
- JetBrains supply Open Source Licenses
- ZeroTier
- Firebase
- UptimeRobot