Quellcode durchsuchen

remove multi protocol script

MHSanaei vor 1 Jahr
Ursprung
Commit
e04283c1fb
6 geänderte Dateien mit 35 neuen und 66 gelöschten Zeilen
  1. 2 2
      .github/workflows/docker.yml
  2. 1 9
      DockerInit.sh
  3. 6 6
      Dockerfile
  4. 13 4
      README.md
  5. 2 2
      install.sh
  6. 11 43
      x-ui.sh

+ 2 - 2
.github/workflows/docker.yml

@@ -18,7 +18,7 @@ jobs:
       - name: Set up Docker Buildx
         uses: docker/[email protected]
 
-      - name: Log in to GitHub Container Registry
+      - name: Login to GHCR
         uses: docker/[email protected]
         with:
           registry: ghcr.io
@@ -38,4 +38,4 @@ jobs:
           push: ${{ github.event_name != 'pull_request' }}
           platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386
           tags: ${{ steps.meta.outputs.tags }}
-          labels: ${{ steps.meta.outputs.labels }}
+          labels: ${{ steps.meta.outputs.labels }}

+ 1 - 9
DockerInit.sh

@@ -1,5 +1,4 @@
 #!/bin/sh
-
 case $1 in
     amd64)
         ARCH="64"
@@ -21,28 +20,21 @@ case $1 in
         ARCH="arm32-v6"
         FNAME="armv6"
         ;;
-    armv5)
-        ARCH="arm32-v5"
-        FNAME="armv5"
-        ;;
     *)
         ARCH="64"
         FNAME="amd64"
         ;;
 esac
-
-
 mkdir -p build/bin
 cd build/bin
-
 wget "https://github.com/XTLS/Xray-core/releases/download/v1.8.7/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
+cd ../../

+ 6 - 6
Dockerfile

@@ -1,11 +1,9 @@
 # ========================================================
 # Stage: Builder
 # ========================================================
-FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
+FROM golang:1.21-alpine AS builder
 WORKDIR /app
 ARG TARGETARCH
-ENV CGO_ENABLED=1
-ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
 
 RUN apk --no-cache --update add \
   build-base \
@@ -15,6 +13,8 @@ RUN apk --no-cache --update add \
 
 COPY . .
 
+ENV CGO_ENABLED=1
+ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
 RUN go build -o build/x-ui main.go
 RUN ./DockerInit.sh "$TARGETARCH"
 
@@ -30,9 +30,9 @@ RUN apk add --no-cache --update \
   tzdata \
   fail2ban
 
-COPY --from=builder  /app/build/ /app/
-COPY --from=builder  /app/DockerEntrypoint.sh /app/
-COPY --from=builder  /app/x-ui.sh /usr/bin/x-ui
+COPY --from=builder /app/build/ /app/
+COPY --from=builder /app/DockerEntrypoint.sh /app/
+COPY --from=builder /app/x-ui.sh /usr/bin/x-ui
 
 # Configure fail2ban
 RUN rm -f /etc/fail2ban/jail.d/alpine-ssh.conf \

+ 13 - 4
README.md

@@ -106,10 +106,19 @@ systemctl restart x-ui
 update to latest version
 
    ```sh
-   cd 3x-ui
-   docker compose down
-   docker compose pull 3x-ui
-   docker compose up -d
+    cd 3x-ui
+    docker compose down
+    docker compose pull 3x-ui
+    docker compose up -d
+   ```
+
+remove 3x-ui from docker 
+
+   ```sh
+    docker stop 3x-ui
+    docker rm 3x-ui
+    cd --
+    rm -r 3x-ui
    ```
 
 </details>

+ 2 - 2
install.sh

@@ -123,9 +123,9 @@ config_after_install() {
             echo -e "${green}username:${usernameTemp}${plain}"
             echo -e "${green}password:${passwordTemp}${plain}"
             echo -e "###############################################"
-            echo -e "${red}if you forgot your login info,you can type x-ui and then type 7 to check after installation${plain}"
+            echo -e "${red}if you forgot your login info,you can type x-ui and then type 8 to check after installation${plain}"
         else
-            echo -e "${red} this is your upgrade,will keep old settings,if you forgot your login info,you can type x-ui and then type 7 to check${plain}"
+            echo -e "${red} this is your upgrade,will keep old settings,if you forgot your login info,you can type x-ui and then type 8 to check${plain}"
         fi
     fi
     /usr/local/x-ui/x-ui migrate

+ 11 - 43
x-ui.sh

@@ -806,34 +806,6 @@ warp_cloudflare() {
     esac
 }
 
-multi_protocol() {
-    echo "This script only supports Vless and Vmess. if you use another protocols, DON'T INSTALL or get backup first! "
-    echo -e "${green}\t1.${plain} Install Multi Protocol Script"
-    echo -e "${green}\t2.${plain} Uninstall"
-    echo -e "${green}\t3.${plain} Start Service"
-    echo -e "${green}\t4.${plain} Stop Service"
-    echo -e "${green}\t0.${plain} Back to Main Menu"
-    read -p "Choose an option: " choice
-    case "$choice" in
-    0)
-        show_menu
-        ;;
-    1)
-        bash <(curl -Ls https://raw.githubusercontent.com/M4mmad/3xui-multi-protocol/master/install.sh --ipv4)
-        ;;
-    2)
-        bash <(curl -Ls https://raw.githubusercontent.com/M4mmad/3xui-multi-protocol/master/unistall.sh --ipv4)
-        ;;
-    3)
-        systemctl start 3xui-multi-protocol
-        ;;
-    4)
-        systemctl stop 3xui-multi-protocol
-        ;;
-    *) echo "Invalid choice" ;;
-    esac
-}
-
 run_speedtest() {
     # Check if Speedtest is already installed
     if ! command -v speedtest &>/dev/null; then
@@ -1145,22 +1117,21 @@ show_menu() {
   ${green}12.${plain} Check Status
   ${green}13.${plain} Check Logs
 ————————————————
-  ${green}14.${plain} Enable x-ui On System Startup
-  ${green}15.${plain} Disable x-ui On System Startup
+  ${green}14.${plain} Enable Autostart
+  ${green}15.${plain} Disable Autostart
 ————————————————
   ${green}16.${plain} SSL Certificate Management
   ${green}17.${plain} Cloudflare SSL Certificate
   ${green}18.${plain} IP Limit Management
   ${green}19.${plain} WARP Management
-  ${green}20.${plain} Multi Protocol Management
 ————————————————
-  ${green}21.${plain} Enable BBR 
-  ${green}22.${plain} Update Geo Files
-  ${green}23.${plain} Active Firewall and open ports
-  ${green}24.${plain} Speedtest by Ookla
+  ${green}20.${plain} Enable BBR 
+  ${green}21.${plain} Update Geo Files
+  ${green}22.${plain} Active Firewall and open ports
+  ${green}23.${plain} Speedtest by Ookla
 "
     show_status
-    echo && read -p "Please enter your selection [0-24]: " num
+    echo && read -p "Please enter your selection [0-23]: " num
 
     case "${num}" in
     0)
@@ -1224,22 +1195,19 @@ show_menu() {
         warp_cloudflare
         ;;
     20)
-        multi_protocol
-        ;;
-    21)
         enable_bbr
         ;;
-    22)
+    21)
         update_geo
         ;;
-    23)
+    22)
         open_ports
         ;;
-    24)
+    23)
         run_speedtest
         ;;
     *)
-        LOGE "Please enter the correct number [0-24]"
+        LOGE "Please enter the correct number [0-23]"
         ;;
     esac
 }