diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 182e9c8f..6a33808b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 @@ -31,6 +31,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + install: true - name: Login to Docker Hub uses: docker/login-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84a00cf6..10615089 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,7 +72,7 @@ jobs: export GOARCH=s390x export CC=s390x-linux-gnu-gcc fi - go build -o xui-release -v main.go + go build -ldflags "-w -s" -o xui-release -v main.go mkdir x-ui cp xui-release x-ui/ @@ -83,43 +83,43 @@ jobs: cd x-ui/bin # Download dependencies - Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v24.12.15/" + Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v25.1.30/" if [ "${{ matrix.platform }}" == "amd64" ]; then - wget ${Xray_URL}Xray-linux-64.zip + wget -q ${Xray_URL}Xray-linux-64.zip unzip Xray-linux-64.zip rm -f Xray-linux-64.zip elif [ "${{ matrix.platform }}" == "arm64" ]; then - wget ${Xray_URL}Xray-linux-arm64-v8a.zip + wget -q ${Xray_URL}Xray-linux-arm64-v8a.zip unzip Xray-linux-arm64-v8a.zip rm -f Xray-linux-arm64-v8a.zip elif [ "${{ matrix.platform }}" == "armv7" ]; then - wget ${Xray_URL}Xray-linux-arm32-v7a.zip + wget -q ${Xray_URL}Xray-linux-arm32-v7a.zip unzip Xray-linux-arm32-v7a.zip rm -f Xray-linux-arm32-v7a.zip elif [ "${{ matrix.platform }}" == "armv6" ]; then - wget ${Xray_URL}Xray-linux-arm32-v6.zip + wget -q ${Xray_URL}Xray-linux-arm32-v6.zip unzip Xray-linux-arm32-v6.zip rm -f Xray-linux-arm32-v6.zip elif [ "${{ matrix.platform }}" == "386" ]; then - wget ${Xray_URL}Xray-linux-32.zip + wget -q ${Xray_URL}Xray-linux-32.zip unzip Xray-linux-32.zip rm -f Xray-linux-32.zip elif [ "${{ matrix.platform }}" == "armv5" ]; then - wget ${Xray_URL}Xray-linux-arm32-v5.zip + wget -q ${Xray_URL}Xray-linux-arm32-v5.zip unzip Xray-linux-arm32-v5.zip rm -f Xray-linux-arm32-v5.zip elif [ "${{ matrix.platform }}" == "s390x" ]; then - wget ${Xray_URL}Xray-linux-s390x.zip + wget -q ${Xray_URL}Xray-linux-s390x.zip unzip Xray-linux-s390x.zip rm -f Xray-linux-s390x.zip fi rm -f geoip.dat geosite.dat - wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat - wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat - wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat - wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.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 -q https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat + wget -q https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat + wget -q -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat + wget -q -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat + wget -q -O geoip_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat + wget -q -O geosite_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat mv xray xray-linux-${{ matrix.platform }} cd ../.. diff --git a/DockerEntrypoint.sh b/DockerEntrypoint.sh index 9ebcd1d6..dfd85ba7 100644 --- a/DockerEntrypoint.sh +++ b/DockerEntrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh # Start fail2ban -fail2ban-client -x start +[ $X_UI_ENABLE_FAIL2BAN == "true" ] && fail2ban-client -x start # Run x-ui exec /app/x-ui diff --git a/DockerInit.sh b/DockerInit.sh index 769c946f..424cacfe 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -27,14 +27,14 @@ case $1 in esac mkdir -p build/bin cd build/bin -wget "https://github.com/XTLS/Xray-core/releases/download/v24.12.15/Xray-linux-${ARCH}.zip" +wget -q "https://github.com/XTLS/Xray-core/releases/download/v25.1.30/Xray-linux-${ARCH}.zip" unzip "Xray-linux-${ARCH}.zip" rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat mv xray "xray-linux-${FNAME}" -wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat -wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat -wget -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat -wget -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.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 -q https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat +wget -q https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat +wget -q -O geoip_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geoip.dat +wget -q -O geosite_IR.dat https://github.com/chocolate4u/Iran-v2ray-rules/releases/latest/download/geosite.dat +wget -q -O geoip_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geoip.dat +wget -q -O geosite_RU.dat https://github.com/runetfreedom/russia-v2ray-rules-dat/releases/latest/download/geosite.dat cd ../../ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ac09b531..36f5235c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ COPY . . ENV CGO_ENABLED=1 ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" -RUN go build -o build/x-ui main.go +RUN go build -ldflags "-w -s" -o build/x-ui main.go RUN ./DockerInit.sh "$TARGETARCH" # ======================================================== @@ -48,6 +48,7 @@ RUN chmod +x \ /app/x-ui \ /usr/bin/x-ui +ENV X_UI_ENABLE_FAIL2BAN="true" VOLUME [ "/etc/x-ui" ] CMD [ "./x-ui" ] ENTRYPOINT [ "/app/DockerEntrypoint.sh" ] diff --git a/README.es_ES.md b/README.es_ES.md index 1efdddf0..49a0d4f5 100644 --- a/README.es_ES.md +++ b/README.es_ES.md @@ -1,4 +1,4 @@ -[English](/README.md) | [中文](/README.zh_CN.md) | [Español](/README.es_ES.md) | [Русский](/README.ru_RU.md) +[English](/README.md) | [فارسی](/README.fa_IR.md) | [中文](/README.zh_CN.md) | [Español](/README.es_ES.md) | [Русский](/README.ru_RU.md)
+
+
+
+
+
+
+
+
+
+
this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0
+
+ {{ i18n "comment" }}
+
+
+
+
+ {{ i18n "pages.inbounds.IPLimit" }}
+
+
+
+
{{ i18n "pages.inbounds.IPLimitlog" }}
+
+
+
@@ -400,7 +427,7 @@
-