Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka-blog committed Mar 31, 2024
1 parent 5371227 commit 53ab2d2
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 154 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/question-template.md

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- arm64
- armv7
- 386
- s390x
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
Expand All @@ -41,6 +42,8 @@ jobs:
sudo apt install gcc-arm-linux-gnueabihf
elif [ "${{ matrix.platform }}" == "386" ]; then
sudo apt install gcc-i686-linux-gnu
elif [ "${{ matrix.platform }}" == "s390x" ]; then
sudo apt install gcc-s390x-linux-gnu
fi
- name: Build frontend
Expand All @@ -66,10 +69,13 @@ jobs:
elif [ "${{ matrix.platform }}" == "386" ]; then
export GOARCH=386
export CC=i686-linux-gnu-gcc
elif [ "${{ matrix.platform }}" == "s390x" ]; then
export GOARCH=s390x
export CC=s390x-linux-gnu-gcc
fi
#### Build Sing-Box
git clone -b v1.8.7 https://github.com/SagerNet/sing-box
git clone -b v1.8.10 https://github.com/SagerNet/sing-box
cd sing-box
go build -tags with_v2ray_api,with_clash_api,with_grpc,with_quic,with_ech -o sing-box ./cmd/sing-box
cd ..
Expand Down
150 changes: 74 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
# S-UI
**An Advanced Web Panel • Built on SagerNet/Sing-Box**

![](https://img.shields.io/github/v/release/alireza0/s-ui.svg)
基于 SagerNet/Sing-Box 的**高级网络面板**

![](https://img.shields.io/github/v/release/Misaka-blog/s-ui.svg)
![](https://img.shields.io/docker/pulls/alireza7/s-ui.svg)
[![Downloads](https://img.shields.io/github/downloads/alireza0/s-ui/total.svg)](https://img.shields.io/github/downloads/alireza0/s-ui/total.svg)
[![下载](https://img.shields.io/github/downloads/Misaka-blog/s-ui/total.svg)](https://img.shields.io/github/downloads/Misaka-blog/s-ui/total.svg)
[![License](https://img.shields.io/badge/license-GPL%20V3-blue.svg?longCache=true)](https://www.gnu.org/licenses/gpl-3.0.en.html)

> **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"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/alireza7)
> 免责声明:** 本项目仅用于个人学习和交流,请勿将其用于非法目的,也请勿将其用于生产环境。
- USDT (TRC20): `TYTq73Gj6dJ67qe58JVPD9zpjW2cc9XgVz`
**如果您认为本项目对您有帮助,不妨给予***:star2

## 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 + info) | :heavy_check_mark: |
| Dark/Light Theme | :heavy_check_mark: |
| 多协议 | :heavy_check_mark |
| 多语言 | :heavy_check_mark |
| 多客户/入站 | :heavy_check_mark |
| 高级流量路由接口 | :heavy_check_mark |
| 客户、流量和系统状态 | :heavy_check_mark |
| 订阅服务(链接 + 信息) | :heavy_check_mark |
| 深色/浅色主题 | :heavy_check_mark |


## Default Installation Informarion
- Panel Port: 2095
- Panel Path: /app/
- Subscription Port: 2096
- Subscription Path: /sub/
- User/Passowrd: admin
## 默认安装信息
- 面板端口: 2095
- 面板路径 /app/
- 订阅端口: 2096
- 订阅路径: /sub/
- 用户/密码: admin

## Install & Upgrade to Latest Version
## 安装并升级到最新版本

```sh
bash <(curl -Ls https://raw.githubusercontent.com/alireza0/s-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/Misaka-blog/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`:
**步骤 1:** 要安装所需的版本,请在安装命令末尾添加版本,例如,ver `0.0.1`

```sh
bash <(curl -Ls https://raw.githubusercontent.com/alireza0/s-ui/master/install.sh) 0.0.1
``sh
bash <(curl -Ls https://raw.githubusercontent.com/Misaka-blog/s-ui/master/install.sh) 0.0.1
```
## Uninstall S-UI
## 卸载 S-UI
```sh
systemctl disable sing-box --now
systemctl disable s-ui --now
systemctl disable s-ui --now
rm -f /etc/systemd/system/s-ui.service
rm -f /etc/systemd/system/sing-box.service
Expand All @@ -60,88 +57,88 @@ systemctl daemon-reload
rm -fr /usr/local/s-ui
```

## Install using Docker
## 使用 Docker 安装

<details>
<summary>Click for details</summary>
<details
<summary>点击查看详情</summary
### Usage
### 使用方法
**Step 1:** Install Docker
**步骤 1:** 安装 Docker
```shell
``shell
curl -fsSL https://get.docker.com | sh
```
**Step 2:** Install S-UI
**第 2 步:** 安装 S-UI
```shell
``shell
mkdir s-ui && cd s-ui
docker run -itd \
-p 2095:2095 -p 443:443 -p 80:80 \
-v $PWD/db/:/usr/local/s-ui/db/ \
-v $PWD/db/:/usr/local/s-ui/db/\
-v $PWD/cert/:/root/cert/ \
--name s-ui --restart=unless-stopped \
--name s-ui --restart=unless-stopped (除非已停止
alireza7/s-ui:latest
```
> Build your own image
> 构建自己的映像

```shell
docker build -t s-ui .
```

</details>
</details
## Languages
## 语言
- English
- Farsi
- Chinese (Simplified)
- 英语
- 波斯语
- 简体中文
## Features
## 功能
- Supported protocols:
- General: Mixed, SOCKS, HTTP, HTTPS, Direct, Redirect, TProxy
- V2Ray based: VLESS, VMess, Trojan, Shadowsocks
- Other protocols: ShadowTLS, Hysteria, Hysteri2, Naive, TUIC
- Supports XTLS protocols
- An advanced interface for routing traffic, incorporating PROXY Protocol, External, and Transparent Proxy, SSL Certificate, and Port
- An advanced interface for inbound and outbound configuration
- Clients’ traffic cap and expiration date
- Displays online clients, inbounds and outbounds with traffic statistics, and system status monitoring
- Subscription service with ability to add external links and subscription
- HTTPS for secure access to the web panel and subscription service (self-provided domain + SSL certificate)
- Dark/Light theme
- 支持的协议:
- 通用: 混合、SOCKSHTTPHTTPS、直接、重定向、TProxy
- 基于 V2RayVLESSVMessTrojanShadowsocks
- 其他协议 ShadowTLSHysteriaHysteri2NaiveTUIC
- 支持 XTLS 协议
- 用于路由流量的高级界面,包括 PROXY 协议、外部和透明代理、SSL 证书和端口
- 用于入站和出站配置的高级界面
- 客户端流量上限和到期日期
- 显示在线客户端、入站和出站流量统计以及系统状态监控
- 可添加外部链接和订阅的订阅服务
- HTTPS 用于安全访问网络面板和订阅服务(自备域名 + SSL 证书)
- 深色/浅色主题
## Recommended OS
## 推荐操作系统
- CentOS 8+
- Ubuntu 20+
- Debian 10+
- Fedora 36+
## Environment Variables
## 环境变量
<details>
<summary>Click for details</summary>
<summary>点击查看详情</summary
### 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` | - |
| SUI_LOG_LEVEL | `"debug"`\| `"info"`\| `"warn"`\| `"error"` | `"info"` |
| SUI_DEBUG | `boolean` | `false` | SUI_BIN_BUG
| SUI_BIN_FOLDER | `string` | `"bin"` | SUI_DB_FOLDER
| SUI_DB_FOLDER | `string` | `"db"`
| SINGBOX_API | `string` | - | SINGBOX_API
</details>

## SSL Certificate
## SSL 证书

<details>
<summary>Click for details</summary>
<summary>点击查看详情</summary>

### Certbot

Expand All @@ -150,10 +147,11 @@ 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>
certbot certonly --standalone --register-unsafely-without-email --non-interactive --agree-tos -d <您的域名>
```

</details>

## Stargazers over Time
[![Stargazers over time](https://starchart.cc/alireza0/s-ui.svg?variant=adaptive)](https://starchart.cc/alireza0/s-ui)
## Star 趋势

[![Stargazers over time](https://starchart.cc/Misaka-blog/s-ui.svg?variant=adaptive)](https://starchart.cc/Misaka-blog/s-ui)
2 changes: 1 addition & 1 deletion backend/config/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.0.2.1
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@ install_s-ui() {
cd /tmp/

if [ $# == 0 ]; then
last_version=$(curl -Ls "https://api.github.com/repos/alireza0/s-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
last_version=$(curl -Ls "https://api.github.com/repos/Misaka-blog/s-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$last_version" ]]; then
echo -e "${red}Failed to fetch s-ui version, it maybe due to Github API restrictions, please try it later${plain}"
exit 1
fi
echo -e "Got s-ui latest version: ${last_version}, beginning the installation..."
wget -N --no-check-certificate -O /tmp/s-ui-linux-$(arch).tar.gz https://github.com/alireza0/s-ui/releases/download/${last_version}/s-ui-linux-$(arch).tar.gz
wget -N --no-check-certificate -O /tmp/s-ui-linux-$(arch).tar.gz https://github.com/Misaka-blog/s-ui/releases/download/${last_version}/s-ui-linux-$(arch).tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}Dowanloading s-ui failed, please be sure that your server can access Github ${plain}"
exit 1
fi
else
last_version=$1
url="https://github.com/alireza0/s-ui/releases/download/${last_version}/s-ui-linux-$(arch).tar.gz"
url="https://github.com/Misaka-blog/s-ui/releases/download/${last_version}/s-ui-linux-$(arch).tar.gz"
echo -e "Begining to install s-ui v$1"
wget -N --no-check-certificate -O /tmp/s-ui-linux-$(arch).tar.gz ${url}
if [[ $? -ne 0 ]]; then
Expand All @@ -164,7 +164,7 @@ install_s-ui() {
tar zxvf s-ui-linux-$(arch).tar.gz
rm s-ui-linux-$(arch).tar.gz -f

wget --no-check-certificate -O /usr/bin/s-ui https://raw.githubusercontent.com/alireza0/s-ui/main/s-ui.sh
wget --no-check-certificate -O /usr/bin/s-ui https://raw.githubusercontent.com/Misaka-blog/s-ui/main/s-ui.sh

chmod +x s-ui/sui s-ui/bin/sing-box s-ui/bin/runSingbox.sh /usr/bin/s-ui
cp -rf s-ui /usr/local/
Expand Down
Loading

0 comments on commit 53ab2d2

Please sign in to comment.