alireza0 / s-ui

An advanced Web Panel • Built for SagerNet/Sing-Box
https://t.me/XrayUI
GNU General Public License v3.0
2.11k stars 304 forks source link
hysteria hysteria2 naive-proxy shadowsocks shadowtls sing-box trojan tuic vless vmess

S-UI

An Advanced Web Panel • Built on SagerNet/Sing-Box

S-UI Docker pull S-UI-Singbox Docker pull 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

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

"Buy Me A Coffee"

Quick Overview

Features Enable?
Multi-Protocol :heavy_check_mark:
Multi-Language :heavy_check_mark:
Multi-Client/Inbound :heavy_check_mark:
Advanced Traffic Routing Interface :heavy_check_mark:
Client & Traffic & System Status :heavy_check_mark:
Subscription Service (link/json + info) :heavy_check_mark:
Dark/Light Theme :heavy_check_mark:

Default Installation Informarion

Install & Upgrade to Latest Version

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

Install Custom Version

Step 1: To install your desired version, add the version to the end of the installation command. e.g., ver 0.0.1:

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

Uninstall S-UI

systemctl disable sing-box --now
systemctl disable s-ui  --now

rm -f /etc/systemd/system/s-ui.service
rm -f /etc/systemd/system/sing-box.service
systemctl daemon-reload

rm -fr /usr/local/s-ui

Install using Docker

Click for details ### Usage **Step 1:** Install Docker ```shell curl -fsSL https://get.docker.com | sh ``` **Step 2:** Install S-UI > Docker compose method ```shell mkdir s-ui && cd s-ui wget -q https://raw.githubusercontent.com/alireza0/s-ui/main/docker-compose.yml docker compose up -d ``` > Use docker for s-ui only ```shell mkdir s-ui && cd s-ui docker run -itd \ -p 2095:2095 -p 2096:2096 -p 443:443 -p 80:80 \ -v $PWD/db/:/usr/local/s-ui/db/ \ -v $PWD/cert/:/root/cert/ \ --name s-ui --restart=unless-stopped \ alireza7/s-ui:latest ``` > Build your own image ```shell docker build -t s-ui . ```

Manual run + contribution

Click for details ### Build and run whole project ```shell ./runSUI.sh ``` ### - Frontend Frontend codes are in `frontend` folder in the root of repository. To run it localy for instant developement you can use (apply automatic changes on file save): ```shell cd frontend npm run dev ``` > By this command it will run a `vite` web server on separate port `3000`, with backend proxy to `http://localhost:2095`. You can change it in `frontend/vite.config.mts`. To build fronend: ```shell cd frontend npm run build ``` ### - Backend Backend codes are in `backend` folder in the root of repository. > Please build fronend once before! To build backend: ```shell cd backend # remove old frontend compiled files rm -fr web/html/* # apply new frontend compiled files cp -R ../frontend/dist/ web/html/ # build go build -o ../sui main.go ``` To run backend (from root folder of repository): ```shell ./sui ```

Languages

Features

Recommended OS

Environment Variables

Click for details ### Usage | Variable | Type | Default | | -------------- | :--------------------------------------------: | :------------ | | SUI_LOG_LEVEL | `"debug"` \| `"info"` \| `"warn"` \| `"error"` | `"info"` | | SUI_DEBUG | `boolean` | `false` | | SUI_BIN_FOLDER | `string` | `"bin"` | | SUI_DB_FOLDER | `string` | `"db"` | | SINGBOX_API | `string` | - |

SSL Certificate

Click for details ### Certbot ```bash 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 ```

Stargazers over Time

Stargazers over time