diff --git a/DockerInit.sh b/DockerInit.sh index db391359..c457a33b 100755 --- a/DockerInit.sh +++ b/DockerInit.sh @@ -27,7 +27,7 @@ case $1 in esac mkdir -p build/bin cd build/bin -wget -q "https://github.com/XTLS/Xray-core/releases/download/v25.9.11/Xray-linux-${ARCH}.zip" +wget -q "https://github.com/XTLS/Xray-core/releases/download/v25.8.3/Xray-linux-${ARCH}.zip" unzip "Xray-linux-${ARCH}.zip" rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat mv xray "xray-linux-${FNAME}" diff --git a/Dockerfile b/Dockerfile index cddc945c..ee789ff2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ======================================================== # Stage: Builder # ======================================================== -FROM golang:1.25-alpine AS builder +FROM golang:1.24-alpine AS builder WORKDIR /app ARG TARGETARCH @@ -9,13 +9,14 @@ RUN apk --no-cache --update add \ build-base \ gcc \ wget \ - unzip + unzip \ + mariadb-connector-c-dev COPY . . ENV CGO_ENABLED=1 ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" -RUN go build -ldflags "-w -s" -o build/x-ui main.go +RUN go build -o build/x-ui main.go RUN ./DockerInit.sh "$TARGETARCH" # ======================================================== @@ -29,12 +30,18 @@ RUN apk add --no-cache --update \ ca-certificates \ tzdata \ fail2ban \ - bash + bash \ + mariadb-connector-c COPY --from=builder /app/build/ /app/ -COPY --from=builder /app/DockerEntrypoint.sh /app/ +COPY --from=builder /app/DockerEntrypoint.sh /app/DockerEntrypoint.sh COPY --from=builder /app/x-ui.sh /usr/bin/x-ui +# Verify files exist and set permissions +RUN ls -la /app/ +RUN ls -la /app/DockerEntrypoint.sh +RUN chmod +x /app/DockerEntrypoint.sh + # Configure fail2ban RUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \ @@ -49,7 +56,12 @@ RUN chmod +x \ /usr/bin/x-ui ENV XUI_ENABLE_FAIL2BAN="true" -EXPOSE 2053 VOLUME [ "/etc/x-ui" ] -CMD [ "./x-ui" ] -ENTRYPOINT [ "/app/DockerEntrypoint.sh" ] + +# Create a simple entrypoint script +RUN echo '#!/bin/sh' > /entrypoint.sh && \ + echo '[ "$XUI_ENABLE_FAIL2BAN" = "true" ] && fail2ban-client -x start' >> /entrypoint.sh && \ + echo 'exec /app/x-ui' >> /entrypoint.sh && \ + chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/README.ar_EG.md b/README.ar_EG.md index 01acad34..d2f6dcc3 100644 --- a/README.ar_EG.md +++ b/README.ar_EG.md @@ -7,13 +7,11 @@
-[](https://github.com/MHSanaei/3x-ui/releases) -[](https://github.com/MHSanaei/3x-ui/actions) -[](#) -[](https://github.com/MHSanaei/3x-ui/releases/latest) -[](https://www.gnu.org/licenses/gpl-3.0.en.html) -[](https://pkg.go.dev/github.com/mhsanaei/3x-ui/v2) -[](https://goreportcard.com/report/github.com/mhsanaei/3x-ui/v2) +[](https://github.com/MHSanaei/3x-ui/releases) +[](https://github.com/MHSanaei/3x-ui/actions) +[](#) +[](https://github.com/MHSanaei/3x-ui/releases/latest) +[](https://www.gnu.org/licenses/gpl-3.0.en.html) **3X-UI** — لوحة تحكم متقدمة مفتوحة المصدر تعتمد على الويب مصممة لإدارة خادم Xray-core. توفر واجهة سهلة الاستخدام لتكوين ومراقبة بروتوكولات VPN والوكيل المختلفة. @@ -43,13 +41,15 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install. **إذا كان هذا المشروع مفيدًا لك، فقد ترغب في إعطائه**:star2: - -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source IP | -|
Source | +|
Source Port | |
VLESS Route | -|
Network |