Git Product home page Git Product logo

x-ui's Introduction

x-ui

Go Report Card Downloads License

Disclaimer: This project is only for personal learning and communication, please do not use it for illegal purposes, please do not use it in a production environment

xray panel supporting multi-protocol, Multi-lang (English,Farsi,Chinese,Russian)

Features Enable?
Multi-lang ✔️
Dark/Light Theme ✔️
Search in deep ✔️
Inbound Multi User ✔️
Multi User Traffic & Expiration time ✔️
REST API ✔️
Telegram BOT (admin + clients) ✔️
Backup database using Telegram BOT ✔️
Subscription link + userInfo ✔️
Calculate expire date on first usage ✔️
Show Online Clients ✔️

If you think this project is helpful to you, you may wish to give a 🌟

Buy Me a Coffee :

  • Tron USDT (TRC20): TYTq73Gj6dJ67qe58JVPD9zpjW2cc9XgVz
  • Tezos (XTZ): tz2Wnh2SsY1eezXrcLChu6idWpgdHzUFQcts

Install & Upgrade to latest version

bash <(curl -Ls https://raw.githubusercontent.com/alireza0/x-ui/master/install.sh)

Install custom version

To install your desired version you can add the version to the end of install command. Example for ver 0.5.2:

bash <(curl -Ls https://raw.githubusercontent.com/alireza0/x-ui/master/install.sh) 0.5.2

Manual install & upgrade

  1. First download the latest compressed package from https://github.com/alireza0/x-ui/releases, generally choose Architecture amd64
  2. Then upload the compressed package to the server's /root/ directory and login to the server with user root

If your server cpu architecture is not amd64 replace another architecture

ARCH=$(uname -m)
[[ "${ARCH}" == "s390x" ]] && XUI_ARCH="s390x" || [[ "${ARCH}" == "aarch64" || "${ARCH}" == "arm64" ]] && XUI_ARCH="arm64" || XUI_ARCH="amd64"
cd /root/
rm x-ui/ /usr/local/x-ui/ /usr/bin/x-ui -rf
tar zxvf x-ui-linux-${XUI_ARCH}.tar.gz
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
cp x-ui/x-ui.sh /usr/bin/x-ui
cp -f x-ui/x-ui.service /etc/systemd/system/
mv x-ui/ /usr/local/
systemctl daemon-reload
systemctl enable x-ui
systemctl restart x-ui

Install using docker

  1. install docker
curl -fsSL https://get.docker.com | sh
  1. install x-ui
mkdir x-ui && cd x-ui
docker run -itd \
    -p 54321:54321 -p 443:443 -p 80:80 \
    -e XRAY_VMESS_AEAD_FORCED=false \
    -v $PWD/db/:/etc/x-ui/ \
    -v $PWD/cert/:/root/cert/ \
    --name x-ui --restart=unless-stopped \
    alireza7/x-ui:latest

Build your own image

docker build -t x-ui .

Features

  • System Status Monitoring
  • Search within all inbounds and clients
  • Support Dark/Light theme UI
  • Support multi-user multi-protocol, web page visualization operation
  • Support multi-domain configuration and multi-certificate inbounds
  • Supported protocols: vmess, vless, trojan, shadowsocks, dokodemo-door, socks, http
  • Support for configuring more transport configurations
  • Traffic statistics, limit traffic, limit expiration time
  • Customizable xray configuration templates
  • Support subscription ( multi ) link
  • Detect users which are expiring or exceed traffic limit soon
  • Support https access panel (self-provided domain name + ssl certificate)
  • Support one-click SSL certificate application and automatic renewal
  • For more advanced configuration items, please refer to the panel
  • Support export/import database from panel
  • Show online users

suggestion system

  • CentOS 8+
  • Ubuntu 20+
  • Debian 10+
  • Fedora 36+

API routes

  • /login with PUSH user data: {username: '', password: ''} for login
  • /xui/API/inbounds base for following actions:
Method Path Action
GET "/" Get all inbounds
GET "/get/:id" Get inbound with inbound.id
GET "/createbackup" Telegram bot sends backup to admins
POST "/add" Add inbound
POST "/del/:id" Delete Inbound
POST "/update/:id" Update Inbound
POST "/addClient/" Add Client to inbound
POST "/:id/delClient/:clientId" Delete Client by clientId*
POST "/updateClient/:clientId" Update Client by clientId*
GET "/getClientTraffics/:email" Get Client's Traffic
POST "/:id/resetClientTraffic/:email" Reset Client's Traffic
POST "/resetAllTraffics" Reset traffics of all inbounds
POST "/resetAllClientTraffics/:id" Reset inbound clients traffics (-1: all)
POST "/delDepletedClients/:id" Delete inbound depleted clients (-1: all)
POST "/onlines" Get Online users ( list of emails )

*- The field clientId should be filled by:

  • client.id for VMESS and VLESS
  • client.password for TROJAN
  • client.email for Shadowsocks

Environment Variables

Variable Type Default
XUI_LOG_LEVEL "debug" | "info" | "warn" | "error" "info"
XUI_DEBUG boolean false
XUI_BIN_FOLDER string "bin"
XUI_DB_FOLDER string "/etc/x-ui"

Screenshots

inbounds Dark inbounds outbounds rules

SSL certificate application

Click for details

Certbot

snap install core; snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot

certbot certonly --standalone --register-unsafely-without-email --non-interactive --agree-tos -d <Your Domain Name>

Tg robot use

Click for details

X-UI supports daily traffic notification, panel login reminder and other functions through the Tg robot. To use the Tg robot, you need to apply for the specific application tutorial. You can refer to the blog Set the robot-related parameters in the panel background, including:

  • Tg robot Token
  • Tg robot ChatId
  • Tg robot cycle runtime, in crontab syntax
  • Tg robot Expiration threshold
  • Tg robot Traffic threshold
  • Tg robot Enable send backup in cycle runtime
  • Tg robot Enable CPU usage alarm threshold

Reference syntax:

  • 30 * * * * * //Notify at the 30s of each point
  • 0 */10 * * * * //Notify at the first second of each 10 minutes
  • @hourly // hourly notification
  • @daily // Daily notification (00:00 in the morning)
  • @every 8h // notify every 8 hours

Telegram Bot Features

  • Report periodic
  • Login notification
  • CPU threshold notification
  • Threshold for Expiration time and Traffic to report in advance
  • Support client report menu if client's telegram ID or telegram UserName added to the user's configurations
  • Support telegram traffic report searched with UUID (VMESS/VLESS) or Password (TROJAN) - anonymously
  • Menu based bot
  • Search client by email ( only admin )
  • Check all inbounds
  • Check server status
  • Check depleted users
  • Receive backup by request and in periodic reports
  • Multi language bot

T-Shoots:

If you upgrade from an old version or other forks, for enable traffic for users you should do :

find this in config :

 "policy": {
    "system": {

and add this just after "policy": { :

    "levels": {
      "0": {
        "statsUserUplink": true,
        "statsUserDownlink": true
      }
    },

the final output is like :

  "policy": {
    "levels": {
      "0": {
        "statsUserUplink": true,
        "statsUserDownlink": true
      }
    },

    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {

restart panel

a special thanks to

Acknowledgment

  • Iran Hosted Domains (License: MIT): A comprehensive list of Iranian domains and services that are hosted within the country.
  • PersianBlocker (License: AGPLv3): An optimal and extensive list to block ads and trackers on Persian websites.

Stargazers over time

Stargazers over time

x-ui's People

Contributors

alireza0 avatar hossinasaadi avatar hamid-gh98 avatar dependabot[bot] avatar vaxilu avatar foroughi1380 avatar forkeer avatar sudospaes avatar franzkafkayu avatar proshir avatar shahin-io avatar saph1s avatar mhsanaei avatar arashmehrani avatar gswxxn avatar masoud-hidden avatar hexasoftwaretech avatar jukrb0x avatar chasing66 avatar mmrabbani avatar masterkia avatar nshayanfar avatar x-oracle avatar lk29 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.