Giter VIP home page Giter VIP logo

wireguard-telegram-bot's Introduction

wireguard-telegram-bot

Простой Telegram-бот для генерации конфигурации VPN WireGuard

Функциональность

  • /menu — список доступных команд
  • /newkeys — создайте новый конфигурационный файл и qr-код для новой сгенерированной пары ключей
  • /pubkey — создайте новый шаблон конфигурационного файла для предоставленного вами открытого ключа
  • /help — распечатайте это сообщение

Публичный телеграмм-бот Wireguard

Install Клиент WireGuard для вашего устройства и импортируйте сгенерированный файл или отсканируйте qr-код

Настройте своего собственного телеграмм-бота WireGuard

  • 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

  • 🎉 🍻 🥳

wireguard-telegram-bot's People

Contributors

skoret avatar cru1zzz3 avatar easyfor314 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.