Coder Social home page Coder Social logo

pheezz / wireguard-bot Goto Github PK

View Code? Open in Web Editor NEW
71.0 5.0 18.0 250 KB

telegram bot for manage Wireguard server, working on mothly subscription

License: MIT License

Python 85.78% Shell 14.22%
aiogram management postgresql telegram-bot vpn vpn-server wireguard

wireguard-bot's Introduction

Hi 👋 My name is Daniil

Python developer

I am currently dedicated to mastering the art of writing clean code. My programming journey began with creating Telegram bots for various purposes. Currently, I'm immersed in backend development using FastAPI.

  • 🌍 I'm based in Kaliningrad
  • ✉️ You can contact me at t.me/pheezz
  • 🧠 I'm learning FastAPI, Web-Dev
  • 🤝 I'm open to collaborating on Web backend or aiogram projects

Skills and Tools:

Visual Studio Code Git Python PostgreSQL FastAPI

Connect with me:

website    website    website


⚡Badges

My GitHub Stats

pheezz's GitHub stats

Top Repositories








❤️Support Me

wireguard-bot's People

Contributors

pheezz avatar sarmatkasaev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wireguard-bot's Issues

No admin access

У нас проблема, если я дам правильный ID, я не смогу зайти в администрацию.

rewrites ip wg to 10.0.0.1

During installation I set a completely different ip, but then it’s still rewritten to 10.0.0.1

help me fix this

 не работает база данных

Добрый день, у вас отличный бот, выражаю огромную благодарность за проделанную работу!

у меня при установке бота возникла пара проблем, я уверен что проблема на моей стороне но все же может быть Вы можете мне помочь

  1. при формировании базы данных я получаю вот такую ошибку postgres could not change directory to ....

  2. если опустить выше перечисленную ошибку я так и не смог разобраться как через бота подтвердить оплату

PresharedKey

При заполнении конфига возникает вопрос - откуда брать этот ключ?

Работа при закрытом терминале

здравствуйте еще раз!

подскажите пожалуйста у меня при закрытии терминала бот перестает работать(

Он должен все таки работать при запущеных этих командах и закрытии терминала?

systemctl enable wireguard-bot.service
systemctl start wireguard-bot.service

или нужно дополнительно что то сделать?

failed to start

● wireguard-bot.service - 'Service for wireguard bot'
Loaded: loaded (/etc/systemd/system/wireguard-bot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-05-19 22:15:27 UTC; 2s ago
Process: 1046372 ExecStart=/bin/bash -c cd ~/wireguard-bot/ && source .venv/bin/activate && python3 app.py (code=ex>
Main PID: 1046372 (code=exited, status=1/FAILURE)
CPU: 1ms

May 19 22:15:27 rezrafserver systemd[1]: wireguard-bot.service: Scheduled restart job, restart counter is at 5.
May 19 22:15:27 rezrafserver systemd[1]: Stopped 'Service for wireguard bot'.
May 19 22:15:27 rezrafserver systemd[1]: wireguard-bot.service: Start request repeated too quickly.
May 19 22:15:27 rezrafserver systemd[1]: wireguard-bot.service: Failed with result 'exit-code'.
May 19 22:15:27 rezrafserver systemd[1]: Failed to start 'Service for wireguard bot'.

problem with start

systemctl status wireguard-bot.service

x wireguard-bot.service - WireGuard VPN Bot
Loaded: loaded (/etc/systemd/system/wireguard-bot.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-02-07 18:17:23 UTC; 12min ago
Duration: 1ms
Main PID: 8771 (code=exited, status=127)
CPU: 1ms

Feb 07 18:17:23 botgw systemd[1]: Started wireguard-bot.service - WireGuard VPN Bot.
Feb 07 18:17:23 botgw bash[8771]: /bin/bash: line 1: /bin/python3.10: No such file or directory
Feb 07 18:17:23 botgw systemd[1]: wireguard-bot.service: Main process exited, code=exited, status=127/n/a
Feb 07 18:17:23 botgw systemd[1]: wireguard-bot.service: Failed with result 'exit-code'.

ls /usr/bin/python*

/usr/bin/python3 /usr/bin/python3.11

When user disconnect wireguard down

hi, I ran into a problem when a user's subscription ends, then wireguard crashes. In the conf, I noticed that the script does not comment on all lines, and as a result, a broken config turns out.
So here's a little bit to fix.

for lines_under_username in range(line_index + 1, line_index + 4):

image
image

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.