easy-peasy wg tg bot

wireguard-telegram-bot

It was supposed to be a cool logo here

Simple-Dimple Telegram Bot for Wireguard VPN config generation

Functionality

  • /menu — list available commands
  • /newkeys — create a new config file and qr code for new generated key pair
  • /pubkey — create a new config file template for the public key you provided
  • /help — print this message

Public Wireguard Telegram Bot

Just drop a message to @wrgrdtgbot and ask him for some new config for you and your friends
Install Wireguard client for your device and import generated file or scan qr code

bot screen 1 bot screen 2

bot screen 3 bot screen 4

Disclaimer: stability, availability and security are not guaranteed! Sorry not sorry 👉🏻👈🏻

Setup your own Wireguard Telegram Bot

  • Go to @BotFather, send him /newbot, choose a bot's name and username, and receive Telegram Bot API Token

  • Go to AWS, GCP, whatever ☁️ and setup your remote server in desired region

    • You need to open corresponding port (e.g. udp:51820)
  • Install go, wireguard and wireguard-tools on your server

    • Someday, we hope there will be a handy Dockerfile for it 🐳
  • Generate Wireguard key pair for your server, create appropriate config file (e.g. wg0.conf) and run Wireguard

    • You're all big boys, you'll handle it
  • git clone [email protected]:skoret/wireguard-telegram-bot.git

  • cd wireguard-telegram-bot && cp .env.example .env

  • Set env variables in .env file:

    Variable Content Notes
    TELEGRAM_APITOKEN your Telegram Bot API token from @BotFather keep it in secret!
    ADMIN_USERNAMES list of Telegram usernames, separated by commas, who are allowed to access this bot leave variable empty for public access
    DNS_IPS list of DNS ip addresses, separated by commas e.g. 8.8.8.8,8.8.4.4
    SERVER_ENDPOINT <your_machine's_external_ip:open_port>
    WIREGUARD_INTERFACE new Wireguard interface name e.g. wg0
    TEMPLATES_FOLDER path to configuration template files probably, you don't wanna change it
    DEV_MODE false for common uses
    true for mocked internal wireguard client
    dev mode suitable for manual bot ui tests
  • sudo go run cmd/bot/main.go

  • 🎉 🍻 🥳


We hope the bot will be helpful. The code is not of the best quality. Contributions are welcome!


Acknowledgements

Similar Resources

An easy-to-use discord bot template written in golang using discordgo

Discord Bot An easy-to-use discord bot template written in golang using discordgo. This template was written for learning golang. It will be updated a

Oct 30, 2021

Fancy, fully-featured, easy to use Telegram CAPTCHA bot written in Go

Fancy, fully-featured, easy to use Telegram CAPTCHA bot written in Go

Go Telegram Captcha Bot Fancy, fully-featured, easy to use, scalable Telegram CAPTCHA bot written in Go based on tucnak's telebot this robot only has

Jul 18, 2022

UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot Easy way to get QR and U-code using Utopia API in telegram bot Us

Dec 30, 2021

Twitchbot - Go Twitch Bot Api wrapper, with an easy to use interface.

twitchbot Go Twitch Bot Api wrapper, with an easy to use interface. Example package main import ( "twitch/twitchbot" ) func main() { bot := twitch

Jan 8, 2022

A Discord bot for managing ephemeral roles based upon voice channel member presence.

A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022

IRC, Slack, Telegram and RocketChat bot written in go

IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022

Simple yet customizable bot framework written in Go.

Simple yet customizable bot framework written in Go.

Introduction Sarah is a general-purpose bot framework named after the author's firstborn daughter. This comes with a unique feature called "stateful c

Dec 12, 2022

Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022

A golang implementation of a console-based trading bot for cryptocurrency exchanges

A golang implementation of a console-based trading bot for cryptocurrency exchanges

Golang Crypto Trading Bot A golang implementation of a console-based trading bot for cryptocurrency exchanges. Usage Download a release or directly bu

Dec 30, 2022
Comments
  • Implement client configuration creation and sending

    Implement client configuration creation and sending

    there are three way to send client config to user in our system:

    • .conf file
    • plain text
    • qr code

    there are two way to create new client config in our system:

    • with new generated key pair by ourselves
    • with placeholder for user's private key

    Client file format: [Interface] Address = PrivateKey = DNS =

    [Peer] PublicKey = AllowedIPs = 0.0.0.0/0 ?? todo: investigate Endpoint =

  • Implement bot commands basic logic

    Implement bot commands basic logic

    commands should be registered on bot startup mvp commands:

    • new client configuration [for 'public' wg vpn]
      • generate new key pair for me | result: user receives new conf file with new client's private key
      • for provided public key | result: user receives new conf file with placeholder for user's private key
      • see #7 and #8

    next evolution steps of project:

    • setup and run new personal wg-instance
      • for some donations?
    • teardown personal wg-instance
    • list personal instances
    • new client configuration [for specified personal instance]
      • generate new key pair
      • for provided public key
    • list client configurations
    • remove registered client configuration
    • inline queries support (?)
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

Dec 16, 2021
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Dec 30, 2021
Quote-bot - Un bot utilisant l'API Twitter pour tweeter une citation par jour sur la programmation et les mathématiques.

Description Ceci est un simple bot programmé en Golang qui tweet une citation sur la programmation tout les jours. Ce bot est host sur le compte Twitt

Jan 1, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

Aug 2, 2022
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
Slack-emoji-bot - This Slack bot will post the newly created custom Slack emojis to the channel of your choice

Slack Emoji Bot This Slack bot will post the newly created custom Slack emojis t

Oct 21, 2022
Sex-bot - The sex bot and its uncreative responses
Sex-bot - The sex bot and its uncreative responses

Sex Bot The sex bot, made with golang! The sex bot can't hear the word "sexo" he

Nov 11, 2022
Feline-bot - Feline Bot for Discord using Golang

Feline Bot for Discord Development This bot is implemented using Golang. Feature

Feb 10, 2022
An easy-to-use discord bot written in go

Discord Bot An easy-to-use discord bot template written in golang using discordgo. This template was written for learning golang. It will be updated a

Jan 23, 2022