mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-05-04 06:08:48 +00:00
Merge pull request #1 from serogaq/feature/1.improvements
1 / Improvements
This commit is contained in:
commit
2a1d8c9be6
12 changed files with 132 additions and 90 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
@ -10,5 +10,5 @@ liberapay: # Replace with a single Liberapay username
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||||
polar: # Replace with a single Polar username
|
polar: # Replace with a single Polar username
|
||||||
buy_me_a_coffee: mhsanaei
|
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
|
|
|
@ -3,5 +3,9 @@
|
||||||
# Start fail2ban
|
# Start fail2ban
|
||||||
fail2ban-client -x start
|
fail2ban-client -x start
|
||||||
|
|
||||||
|
# Docker Logs
|
||||||
|
ln -sf /dev/stdout /app/access.log
|
||||||
|
ln -sf /dev/stdout /app/error.log
|
||||||
|
|
||||||
# Run x-ui
|
# Run x-ui
|
||||||
exec /app/x-ui
|
exec /app/x-ui
|
||||||
|
|
|
@ -38,3 +38,33 @@ wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/
|
||||||
wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat
|
wget -O geoip_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geoip.dat
|
||||||
wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat
|
wget -O geosite_VN.dat https://github.com/vuong2023/vn-v2ray-rules/releases/latest/download/geosite.dat
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
|
# Antizapret
|
||||||
|
case $2 in
|
||||||
|
0)
|
||||||
|
ANTIZAPRET="0"
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
ANTIZAPRET="1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ANTIZAPRET="0"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [[ $ANTIZAPRET == "1" ]]; then
|
||||||
|
wget https://github.com/warexify/antizapret-xray/archive/refs/heads/main.zip
|
||||||
|
unzip main.zip
|
||||||
|
mv antizapret-xray-main antizapret-xray
|
||||||
|
mkdir -p antizapret-xray/z-i
|
||||||
|
cd antizapret-xray/z-i
|
||||||
|
wget -O dump.csv https://github.com/zapret-info/z-i/raw/master/dump.csv
|
||||||
|
cd ../
|
||||||
|
go build
|
||||||
|
chmod +x antizapret-xray
|
||||||
|
./antizapret-xray
|
||||||
|
mv publish/geosite.dat ../build/bin/geosite_antizapret.dat
|
||||||
|
cd ../
|
||||||
|
echo "Antizapret: ext:geosite_antizapret.dat:zapretinfo"
|
||||||
|
else
|
||||||
|
echo "Antizapret: disabled"
|
||||||
|
fi
|
|
@ -4,6 +4,7 @@
|
||||||
FROM golang:1.23-alpine AS builder
|
FROM golang:1.23-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
ARG ANTIZAPRET
|
||||||
|
|
||||||
RUN apk --no-cache --update add \
|
RUN apk --no-cache --update add \
|
||||||
build-base \
|
build-base \
|
||||||
|
@ -16,20 +17,22 @@ COPY . .
|
||||||
ENV CGO_ENABLED=1
|
ENV CGO_ENABLED=1
|
||||||
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
|
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
|
||||||
RUN go build -o build/x-ui main.go
|
RUN go build -o build/x-ui main.go
|
||||||
RUN ./DockerInit.sh "$TARGETARCH"
|
RUN ./DockerInit.sh "$TARGETARCH" "$ANTIZAPRET"
|
||||||
|
|
||||||
# ========================================================
|
# ========================================================
|
||||||
# Stage: Final Image of 3x-ui
|
# Stage: Final Image of 3x-ui
|
||||||
# ========================================================
|
# ========================================================
|
||||||
FROM alpine
|
FROM alpine
|
||||||
ENV TZ=Asia/Tehran
|
ENV TZ=Europe/Moscow
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --no-cache --update \
|
RUN apk add --no-cache --update \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
tzdata \
|
tzdata \
|
||||||
fail2ban \
|
fail2ban \
|
||||||
bash
|
bash \
|
||||||
|
nano \
|
||||||
|
unzip
|
||||||
|
|
||||||
COPY --from=builder /app/build/ /app/
|
COPY --from=builder /app/build/ /app/
|
||||||
COPY --from=builder /app/DockerEntrypoint.sh /app/
|
COPY --from=builder /app/DockerEntrypoint.sh /app/
|
||||||
|
|
30
README.md
30
README.md
|
@ -4,30 +4,18 @@
|
||||||
|
|
||||||
**An Advanced Web Panel • Built on Xray Core**
|
**An Advanced Web Panel • Built on Xray Core**
|
||||||
|
|
||||||
[](https://github.com/MHSanaei/3x-ui/releases)
|
[](https://github.com/MHSanaei/3x-ui/releases)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
[](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
|
> **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 this project is helpful to you, you may wish to give it a**:star2:
|
|
||||||
|
|
||||||
<p align="left">
|
|
||||||
<a href="https://buymeacoffee.com/mhsanaei" target="_blank">
|
|
||||||
<img src="./media/buymeacoffe.png" alt="Image">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- USDT (TRC20): `TXncxkvhkDWGts487Pjqq1qT9JmwRUz8CC`
|
|
||||||
- MATIC (polygon): `0x41C9548675D044c6Bfb425786C765bc37427256A`
|
|
||||||
- LTC (Litecoin): `ltc1q2ach7x6d2zq0n4l0t4zl7d7xe2s6fs7a3vspwv`
|
|
||||||
|
|
||||||
## Install & Upgrade
|
## Install & Upgrade
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
|
bash <(curl -Ls https://raw.githubusercontent.com/serogaq/3x-ui/master/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install legacy Version (we don't recommend)
|
## Install legacy Version (we don't recommend)
|
||||||
|
@ -35,7 +23,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
|
||||||
To install your desired version, use following installation command. e.g., ver `v1.7.9`:
|
To install your desired version, use following installation command. e.g., ver `v1.7.9`:
|
||||||
|
|
||||||
```
|
```
|
||||||
VERSION=v1.7.9 && bash <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION
|
VERSION=v1.7.9 && bash <(curl -Ls "https://raw.githubusercontent.com/serogaq/3x-ui/$VERSION/install.sh") $VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
## SSL Certificate
|
## SSL Certificate
|
||||||
|
@ -183,7 +171,7 @@ systemctl restart x-ui
|
||||||
--network=host \
|
--network=host \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
--name 3x-ui \
|
--name 3x-ui \
|
||||||
ghcr.io/mhsanaei/3x-ui:latest
|
ghcr.io/serogaq/3x-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Update to the Latest Version:**
|
4. **Update to the Latest Version:**
|
||||||
|
@ -562,7 +550,3 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
|
||||||
|
|
||||||
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
||||||
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
||||||
|
|
||||||
## Stargazers over Time
|
|
||||||
|
|
||||||
[](https://starchart.cc/MHSanaei/3x-ui)
|
|
||||||
|
|
|
@ -4,30 +4,18 @@
|
||||||
|
|
||||||
**Продвинутая веб-панель • Построена на основе Xray Core**
|
**Продвинутая веб-панель • Построена на основе Xray Core**
|
||||||
|
|
||||||
[](https://github.com/MHSanaei/3x-ui/releases)
|
[](https://github.com/MHSanaei/3x-ui/releases)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||||
|
|
||||||
> **Отказ от ответственности:** Этот проект предназначен только для личного обучения и общения. Пожалуйста, не используйте его в незаконных целях и не применяйте в производственной среде.
|
> **Отказ от ответственности:** Этот проект предназначен только для личного обучения и общения. Пожалуйста, не используйте его в незаконных целях и не применяйте в производственной среде.
|
||||||
|
|
||||||
**Если этот проект оказался полезным для вас, вы можете оценить его, поставив звёздочку** :star2:
|
|
||||||
|
|
||||||
<p align="left">
|
|
||||||
<a href="https://buymeacoffee.com/mhsanaei" target="_blank">
|
|
||||||
<img src="./media/buymeacoffe.png" alt="Image">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- USDT (TRC20): `TXncxkvhkDWGts487Pjqq1qT9JmwRUz8CC`
|
|
||||||
- MATIC (polygon): `0x41C9548675D044c6Bfb425786C765bc37427256A`
|
|
||||||
- LTC (Litecoin): `ltc1q2ach7x6d2zq0n4l0t4zl7d7xe2s6fs7a3vspwv`
|
|
||||||
|
|
||||||
## Установка и обновление
|
## Установка и обновление
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
|
bash <(curl -Ls https://raw.githubusercontent.com/serogaq/3x-ui/master/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Установить старую версию (мы не рекомендуем)
|
## Установить старую версию (мы не рекомендуем)
|
||||||
|
@ -35,7 +23,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
|
||||||
Чтобы установить желаемую версию, используйте следующую команду установки. Например, ver `v1.7.9`:
|
Чтобы установить желаемую версию, используйте следующую команду установки. Например, ver `v1.7.9`:
|
||||||
|
|
||||||
```
|
```
|
||||||
VERSION=v1.7.9 && <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION
|
VERSION=v1.7.9 && <(curl -Ls "https://raw.githubusercontent.com/serogaq/3x-ui/$VERSION/install.sh") $VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
## SSL Сертификат
|
## SSL Сертификат
|
||||||
|
@ -182,7 +170,7 @@ systemctl restart x-ui
|
||||||
--network=host \
|
--network=host \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
--name 3x-ui \
|
--name 3x-ui \
|
||||||
ghcr.io/mhsanaei/3x-ui:latest
|
ghcr.io/serogaq/3x-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Обновление до последней версии:**
|
4. **Обновление до последней версии:**
|
||||||
|
@ -559,7 +547,3 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
|
||||||
|
|
||||||
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
||||||
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
||||||
|
|
||||||
## Число звёзд со временем
|
|
||||||
|
|
||||||
[](https://starchart.cc/MHSanaei/3x-ui)
|
|
||||||
|
|
|
@ -4,30 +4,18 @@
|
||||||
|
|
||||||
**一个更好的面板 • 基于Xray Core构建**
|
**一个更好的面板 • 基于Xray Core构建**
|
||||||
|
|
||||||
[](https://github.com/MHSanaei/3x-ui/releases)
|
[](https://github.com/MHSanaei/3x-ui/releases)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](#)
|
[](#)
|
||||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||||
|
|
||||||
> **Disclaimer:** 此项目仅供个人学习交流,请不要用于非法目的,请不要在生产环境中使用。
|
> **Disclaimer:** 此项目仅供个人学习交流,请不要用于非法目的,请不要在生产环境中使用。
|
||||||
|
|
||||||
**如果此项目对你有用,请给一个**:star2:
|
|
||||||
|
|
||||||
<p align="left">
|
|
||||||
<a href="https://buymeacoffee.com/mhsanaei" target="_blank">
|
|
||||||
<img src="./media/buymeacoffe.png" alt="Image">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- USDT (TRC20): `TXncxkvhkDWGts487Pjqq1qT9JmwRUz8CC`
|
|
||||||
- MATIC (polygon): `0x41C9548675D044c6Bfb425786C765bc37427256A`
|
|
||||||
- LTC (Litecoin): `ltc1q2ach7x6d2zq0n4l0t4zl7d7xe2s6fs7a3vspwv`
|
|
||||||
|
|
||||||
## 安装 & 升级
|
## 安装 & 升级
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
|
bash <(curl -Ls https://raw.githubusercontent.com/serogaq/3x-ui/master/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 安装旧版本 (我们不建议)
|
## 安装旧版本 (我们不建议)
|
||||||
|
@ -35,7 +23,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
|
||||||
要安装您想要的版本,请使用以下安装命令。例如,ver `v1.7.9`:
|
要安装您想要的版本,请使用以下安装命令。例如,ver `v1.7.9`:
|
||||||
|
|
||||||
```
|
```
|
||||||
VERSION=v1.7.9 && <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION
|
VERSION=v1.7.9 && <(curl -Ls "https://raw.githubusercontent.com/serogaq/3x-ui/$VERSION/install.sh") $VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
### SSL证书
|
### SSL证书
|
||||||
|
@ -178,7 +166,7 @@ systemctl restart x-ui
|
||||||
--network=host \
|
--network=host \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
--name 3x-ui \
|
--name 3x-ui \
|
||||||
ghcr.io/mhsanaei/3x-ui:latest
|
ghcr.io/serogaq/3x-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
更新至最新版本
|
更新至最新版本
|
||||||
|
@ -550,7 +538,3 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
|
||||||
|
|
||||||
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
|
||||||
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
- [Vietnam Adblock rules](https://github.com/vuong2023/vn-v2ray-rules) (License: **GPL-3.0**): _A hosted domain hosted in Vietnam and blocklist with the most efficiency for Vietnamese._
|
||||||
|
|
||||||
## Star趋势
|
|
||||||
|
|
||||||
[](https://starchart.cc/MHSanaei/3x-ui)
|
|
||||||
|
|
|
@ -3,14 +3,42 @@ version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
3x-ui:
|
3x-ui:
|
||||||
image: ghcr.io/mhsanaei/3x-ui:latest
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
ANTIZAPRET: "1"
|
||||||
container_name: 3x-ui
|
container_name: 3x-ui
|
||||||
hostname: yourhostname
|
hostname: 3x-ui
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.3x-ui.rule=Host(`<...>`)
|
||||||
|
- traefik.http.routers.3x-ui.service=3x-ui
|
||||||
|
- traefik.http.routers.3x-ui.entrypoints=https
|
||||||
|
- traefik.http.services.3x-ui.loadbalancer.server.port=<...>
|
||||||
|
#
|
||||||
|
- traefik.http.routers.3x-ui-sub.rule=Host(`<...>`)
|
||||||
|
- traefik.http.routers.3x-ui-sub.service=3x-ui-sub
|
||||||
|
- traefik.http.routers.3x-ui-sub.entrypoints=https
|
||||||
|
- traefik.http.services.3x-ui-sub.loadbalancer.server.port=<...>
|
||||||
|
#
|
||||||
|
- traefik.tcp.routers.vless.rule=HostSNI(`<...>`)
|
||||||
|
- traefik.tcp.routers.vless.tls.passthrough=true
|
||||||
|
- traefik.tcp.routers.vless.service=3x-ui-inbound-443
|
||||||
|
- traefik.tcp.services.3x-ui-inbound-443.loadbalancer.server.port=443
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD/db/:/etc/x-ui/
|
- $PWD/db/:/etc/x-ui/
|
||||||
- $PWD/cert/:/root/cert/
|
- $PWD/cert/:/root/cert/
|
||||||
environment:
|
environment:
|
||||||
|
PUID: 1000
|
||||||
|
PGID: 1000
|
||||||
XRAY_VMESS_AEAD_FORCED: "false"
|
XRAY_VMESS_AEAD_FORCED: "false"
|
||||||
|
TZ: Europe/Moscow
|
||||||
|
XUI_SERVER_IP: "" # Server IP
|
||||||
tty: true
|
tty: true
|
||||||
network_mode: host
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
@ -57,9 +58,12 @@ func (a *SUBController) initRouter(g *gin.RouterGroup) {
|
||||||
func (a *SUBController) subs(c *gin.Context) {
|
func (a *SUBController) subs(c *gin.Context) {
|
||||||
subId := c.Param("subid")
|
subId := c.Param("subid")
|
||||||
var host string
|
var host string
|
||||||
|
host = os.Getenv("XUI_SERVER_IP")
|
||||||
|
if host == "" {
|
||||||
if h, err := getHostFromXFH(c.GetHeader("X-Forwarded-Host")); err == nil {
|
if h, err := getHostFromXFH(c.GetHeader("X-Forwarded-Host")); err == nil {
|
||||||
host = h
|
host = h
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if host == "" {
|
if host == "" {
|
||||||
host = c.GetHeader("X-Real-IP")
|
host = c.GetHeader("X-Real-IP")
|
||||||
}
|
}
|
||||||
|
@ -95,9 +99,12 @@ func (a *SUBController) subs(c *gin.Context) {
|
||||||
func (a *SUBController) subJsons(c *gin.Context) {
|
func (a *SUBController) subJsons(c *gin.Context) {
|
||||||
subId := c.Param("subid")
|
subId := c.Param("subid")
|
||||||
var host string
|
var host string
|
||||||
|
host = os.Getenv("XUI_SERVER_IP")
|
||||||
|
if host == "" {
|
||||||
if h, err := getHostFromXFH(c.GetHeader("X-Forwarded-Host")); err == nil {
|
if h, err := getHostFromXFH(c.GetHeader("X-Forwarded-Host")); err == nil {
|
||||||
host = h
|
host = h
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if host == "" {
|
if host == "" {
|
||||||
host = c.GetHeader("X-Real-IP")
|
host = c.GetHeader("X-Real-IP")
|
||||||
}
|
}
|
||||||
|
|
|
@ -917,6 +917,9 @@
|
||||||
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
||||||
{ label: '🇷🇺 Russia', value: 'geosite:category-ru' },
|
{ label: '🇷🇺 Russia', value: 'geosite:category-ru' },
|
||||||
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
|
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
|
||||||
|
{ label: '🇷🇺 .su', value: 'regexp:.*\\.su$' },
|
||||||
|
{ label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' },
|
||||||
|
{ label: '🇷🇺 Antizapret', value: 'ext:geosite_antizapret.dat:zapretinfo' },
|
||||||
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
|
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
|
||||||
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
||||||
],
|
],
|
||||||
|
@ -927,6 +930,7 @@
|
||||||
{ label: 'Malware 🇮🇷', value: 'ext:geosite_IR.dat:malware' },
|
{ label: 'Malware 🇮🇷', value: 'ext:geosite_IR.dat:malware' },
|
||||||
{ label: 'Phishing 🇮🇷', value: 'ext:geosite_IR.dat:phishing' },
|
{ label: 'Phishing 🇮🇷', value: 'ext:geosite_IR.dat:phishing' },
|
||||||
{ label: 'Cryptominers 🇮🇷', value: 'ext:geosite_IR.dat:cryptominers' },
|
{ label: 'Cryptominers 🇮🇷', value: 'ext:geosite_IR.dat:cryptominers' },
|
||||||
|
{ label: 'Antizapret 🇷🇺', value: 'ext:geosite_antizapret.dat:zapretinfo' },
|
||||||
{ label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' },
|
{ label: '🇮🇷 Iran', value: 'ext:geosite_IR.dat:ir' },
|
||||||
{ label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' },
|
{ label: '🇮🇷 .ir', value: 'regexp:.*\\.ir$' },
|
||||||
{ label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' },
|
{ label: '🇮🇷 .ایران', value: 'regexp:.*\\.xn--mgba3a4f16a$' },
|
||||||
|
@ -934,6 +938,8 @@
|
||||||
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
||||||
{ label: '🇷🇺 Russia', value: 'geosite:category-ru' },
|
{ label: '🇷🇺 Russia', value: 'geosite:category-ru' },
|
||||||
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
|
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
|
||||||
|
{ label: '🇷🇺 .su', value: 'regexp:.*\\.su$' },
|
||||||
|
{ label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' },
|
||||||
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
|
{ label: '🇻🇳 Vietnam', value: 'ext:geosite_VN.dat:vn' },
|
||||||
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
||||||
],
|
],
|
||||||
|
@ -946,13 +952,25 @@
|
||||||
{ label: 'Netflix', value: 'geosite:netflix' },
|
{ label: 'Netflix', value: 'geosite:netflix' },
|
||||||
{ label: 'Reddit', value: 'geosite:reddit' },
|
{ label: 'Reddit', value: 'geosite:reddit' },
|
||||||
{ label: 'Speedtest', value: 'geosite:speedtest' },
|
{ label: 'Speedtest', value: 'geosite:speedtest' },
|
||||||
|
{ label: 'Telegram', value: 'geosite:telegram' },
|
||||||
|
{ label: 'Instagram', value: 'geosite:instagram' },
|
||||||
|
{ label: 'Stripe', value: 'geosite:stripe' },
|
||||||
|
{ label: 'Adobe', value: 'geosite:adobe' },
|
||||||
|
{ label: 'Amazon', value: 'geosite:amazon' },
|
||||||
|
{ label: 'AWS', value: 'geosite:aws' },
|
||||||
|
{ label: 'Google Gemini', value: 'geosite:google-gemini' },
|
||||||
|
{ label: 'Perplexity', value: 'geosite:perplexity' },
|
||||||
|
{ label: 'Booking', value: 'geosite:booking' },
|
||||||
|
{ label: 'X (Twitter)', value: 'geosite:x' },
|
||||||
|
{ label: 'Category: Porn', value: 'geosite:category-porn' },
|
||||||
|
{ label: 'Category: AI Chats', value: 'geosite:category-ai-chat-!cn' },
|
||||||
],
|
],
|
||||||
familyProtectDNS: {
|
familyProtectDNS: {
|
||||||
"servers": [
|
"servers": [
|
||||||
"1.1.1.3", // https://developers.cloudflare.com/1.1.1.1/setup/
|
"1.1.1.1", // https://developers.cloudflare.com/1.1.1.1/setup/
|
||||||
"1.0.0.3",
|
"1.0.0.1",
|
||||||
"2606:4700:4700::1113",
|
"2606:4700:4700::1111",
|
||||||
"2606:4700:4700::1003"
|
"2606:4700:4700::1001"
|
||||||
],
|
],
|
||||||
"queryStrategy": "UseIP"
|
"queryStrategy": "UseIP"
|
||||||
},
|
},
|
||||||
|
|
|
@ -349,8 +349,8 @@
|
||||||
"RoutingStrategyDesc" = "Set the overall traffic routing strategy for resolving all requests."
|
"RoutingStrategyDesc" = "Set the overall traffic routing strategy for resolving all requests."
|
||||||
"Torrent" = "Block BitTorrent Protocol"
|
"Torrent" = "Block BitTorrent Protocol"
|
||||||
"TorrentDesc" = "Blocks BitTorrent protocol."
|
"TorrentDesc" = "Blocks BitTorrent protocol."
|
||||||
"Family" = "Family Protection"
|
"Family" = "Cloudflare DNS"
|
||||||
"FamilyDesc" = "Blocks adult content, and malware websites."
|
"FamilyDesc" = "DNS servers from Cloudflare (1.1.1.1; 1.0.0.1)."
|
||||||
"Inbounds" = "Inbounds"
|
"Inbounds" = "Inbounds"
|
||||||
"InboundsDesc" = "Accepting the specific clients."
|
"InboundsDesc" = "Accepting the specific clients."
|
||||||
"Outbounds" = "Outbounds"
|
"Outbounds" = "Outbounds"
|
||||||
|
|
|
@ -349,8 +349,8 @@
|
||||||
"RoutingStrategyDesc" = "Установка общей стратегии маршрутизации разрешения DNS"
|
"RoutingStrategyDesc" = "Установка общей стратегии маршрутизации разрешения DNS"
|
||||||
"Torrent" = "Запрет использования BitTorrent"
|
"Torrent" = "Запрет использования BitTorrent"
|
||||||
"TorrentDesc" = "Изменение шаблона конфигурации для предупреждения использования BitTorrent пользователями"
|
"TorrentDesc" = "Изменение шаблона конфигурации для предупреждения использования BitTorrent пользователями"
|
||||||
"Family" = "Блокируйте вредоносное ПО и контент для взрослых"
|
"Family" = "Cloudflare DNS"
|
||||||
"FamilyDesc" = "DNS-преобразователи Cloudflare для блокировки вредоносного ПО и контента для взрослых в целях защиты семьи."
|
"FamilyDesc" = "DNS-преобразователи Cloudflare (1.1.1.1; 1.0.0.1)."
|
||||||
"Inbounds" = "Входящие"
|
"Inbounds" = "Входящие"
|
||||||
"InboundsDesc" = "Изменение шаблона конфигурации для подключения определенных пользователей"
|
"InboundsDesc" = "Изменение шаблона конфигурации для подключения определенных пользователей"
|
||||||
"Outbounds" = "Исходящие"
|
"Outbounds" = "Исходящие"
|
||||||
|
@ -572,7 +572,7 @@
|
||||||
"allClients" = "Все клиенты"
|
"allClients" = "Все клиенты"
|
||||||
|
|
||||||
[tgbot.answers]
|
[tgbot.answers]
|
||||||
"successfulOperation" = "✅ Успешный!"
|
"successfulOperation" = "✅ OK!"
|
||||||
"errorOperation" = "❗ Ошибка в операции."
|
"errorOperation" = "❗ Ошибка в операции."
|
||||||
"getInboundsFailed" = "❌ Не удалось получить входящие потоки."
|
"getInboundsFailed" = "❌ Не удалось получить входящие потоки."
|
||||||
"getClientsFailed" = "❌ Не удалось получить клиентов."
|
"getClientsFailed" = "❌ Не удалось получить клиентов."
|
||||||
|
|
Loading…
Reference in a new issue