Giter Site home page Giter Site logo

robot's Introduction

GFW-BOT

Cloudflare Woker 机器人! 不需要服务器,只需创建纯粹的 Xray 链接,所有这些都可以在 PythonAnywhere 上顺利运行。 通往互联网自由的捷径! ✨"

1

version 0.02 | 新内容 ?

  • 它可以为每个可以使用IP-API值的用户创建唯一的订阅工作链接
  • 只需更改 IP_API 值即可更新订阅
  • cloudflare 网站错误已解决

目录

关于?

这个 Python Telegram 机器人由 Cloudflare 的 Workers 提供支持,使生成 Xray 链接变得轻而易举! 无需复杂的服务器设置,只需按照以下简单步骤即可开始:

Features

  • Easy Setup: No server configurations required. With Cloudflare's Workers, deploying the bot is a breeze.
  • Persistent Storage: Utilizes SQLite for database management, ensuring that your user data and generated links are securely stored.
  • User Management: Create and manage multiple users with ease. Each user has access to their generated links at all times.
  • Efficient Deployment: Leveraging Wrangler, the bot's worker script can be easily deployed on Cloudflare, ensuring reliability and scalability.

Prerequisites

  • One domain registered on Cloudflare
  • Access to Cloudflare account
  • Telegram Bot token (available from Telegram's BotFather)
  • Cloudflare API key (generate one from Cloudflare dashboard)
  • Account ID of your Cloudflare account
  • User ID of the Telegram account you want to use the bot on (for authentication)

LAZY INSTALL

  1. Register for a free account on PythonAnywhere.
  2. Obtain the required API keys:
    • Telegram Bot token from BotFather
    • Cloudflare API key from Cloudflare dashboard (make sure to select "Edit Cloudflare Workers template" and grant necessary permissions, all of them should have EDIT permission)
    • Telegram UserID you can obtain it from here https://t.me/useridinfobot or any similar bot you know
    • Cloudflare Account id, you can find it from right side of overview page or worker page in cloudflare
  3. in your Dashboard section Select Files and and Click on "Open Bash Console Here"
  4. Clone this repository:
git clone https://github.com/avotcorg/GFW-BOT.git
  1. Navigate to the project directory:
cd GFW-BOT
  1. Make requirement.sh executable:
chmod +x requirement.sh
  1. Run dos2unix.py: "If you encounter errors running requirement.sh on PythonAnywhere , simply close the console (using exit command) , go to file manager and open it and save it (use ctrl+s ) without changing any thing. thats it! now you can run it" another solution is converting it using dos2unix since PythonAnyWhere does not support that you can use this simple python code 'dos2unix.py' you can run this to solve the issue:
python3 dos2unix.py
  1. Run requirement.sh:
./requirement.sh
  1. Run install.py and provide the required API tokens when prompted:
python3 install.py
  1. Start the bot:
python3 gfw.py

ADVANCED INSTALL

  1. install requirements:
pip install telebot
pip install pytelegrambotapi --upgrade
pip install qrcode[pil]
pip install requests
pip install python-dotenv
  1. install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  1. set nvm settings
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads NVM
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads NVM bash completion
  1. start nvm and install wrangler
nvm install 16.17.0
nvm use 16.17.0
npm install wrangler@latest
npx wrangler --version
  1. set .env file variables
Variable Description
CLOUDFLARE_API_TOKEN Cloudflare API token with Worker edit permission
BOT_TOKEN Telegram bot token obtained from BotFather
ACCOUNT_ID Cloudflare account ID
ADMIN_USER_ID Numeric Telegram user ID for admin authentication
IP_API use this as refrence https://raw.githubusercontent.com/2ri4eUI/CFW_Worker_Sub/main/ips.txt

6.remember to set cloudflare account id in workertemp.txt

How To Use the Bot

Once the bot is running, simply send the necessary commands to generate Xray links right from your Telegram app! Creating a new user is a straightforward process. Follow these steps to get started: Obtain Cloudflare IP or Domain:

  • Use platforms like fofa.info to find Cloudflare IP addresses or domains.
  • Example search query for fofa.info:
server=="cloudflare" && port=="443" && country=="NL" && city=="Amsterdam"
  • Choose based on your preferences and network speed.

Note

This bot is designed to be lightweight and inexpensive to run, making it accessible for everyone. Enjoy creating Xray links hassle-free!

robot's People

Contributors

zhukings avatar

Watchers

 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.