Skip to content

ifgris/ZeroTierTelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroTierTelegramBot

ZeroTierTelegramBot is a telegram bot which helps you manage your ZeroTier Network, runs on Python 3+. The API requests base on ZeroTier Central API v1.

Bot Features

  • Show networks info
  • Show network members info
  • Set member name (Admin only)
  • Authorize new member (Admin only)
  • Unauthorize member (Admin only)
  • Delete member (Admin only)
  • Set sub admin (Invite your friends to group chat, set as admin and manage the network with you)

Getting Started

  1. Create your own ZeroTier Web API Token:

    Create an API Access Token at: https://my.zerotier.com/account

  2. Create your own Telegram Bot:

    Create a telegram bot by sending commands to @BotFather, feel free to send the commands descriptions below to @BotFather:

    help - Show commands list.
    show_network - Show your zerotier networks.
    set_member_name - Set your member's name by using this command.
    auth_member - Authorize a member.
    unauth_member - Unauthorize a member.
    delete_member - Delete a member.
    

    When creating a bot, you need to specify:

    • /setjoingroups -- enable
    • /setprivacy -- disable
  3. Clone repository:

    $ git clone https://github.com/koonchung/ZeroTierTelegramBot.git
    
  4. Install requirements:

    $ pip3 install -r requirements.txt
    
  5. Edit config.yaml

    # Fill with your telegram bot token
    # Create your bot by sending commands to @BotFather in Telegram
    bot_token: "your_bot_token"
    
    # Fill with your zerotier token
    # Get your own API Access Token at: https://my.zerotier.com/account
    zerotier_token: "your_zerotier_web_api_token"
    
    # Fill with telegram id which you want to set as admin
    admin_id:
       - your_telegram_id
    
    # Fill with refresh seconds, used to check new members
    refresh_seconds: 60
  6. Run Bot

    $ cd ZeroTierTelegramBot
    $ python3 zerotiertelegrambot
    

    Invite your bot to a group chat, send /start@your_bot in group chat, and you can start to manage your ZeroTier Networks.

Screenshots

  1. start&help

    start&help

  2. show_network

    show_network

  3. network_info

    network_info

  4. accept&setname

    accept&setname

  5. auth&setname

    auth&setname

  6. new_member

    new_member

About

A Telegram bot, used to manage your ZeroTier Network.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages