Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 12:26:10 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-01-27 18:51:16 +0300
commite04283c1fb3e56867c7922bab5f3d7edb29fe13c (patch)
tree938360a74623d1ee750ac03f5efbdd3acd51ae1e
parent9fba92d879767394535f70ba83f0a58d6b063a7d (diff)
remove multi protocol script
-rw-r--r--.github/workflows/docker.yml4
-rwxr-xr-xDockerInit.sh10
-rw-r--r--Dockerfile12
-rw-r--r--README.md17
-rw-r--r--install.sh4
-rw-r--r--x-ui.sh54
6 files changed, 35 insertions, 66 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 1115de37..a7a8c790 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -18,7 +18,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- - name: Log in to GitHub Container Registry
+ - name: Login to GHCR
uses: docker/login-action@v3.0.0
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 }} \ No newline at end of file
diff --git a/DockerInit.sh b/DockerInit.sh
index bbfcb04e..a2224999 100755
--- a/DockerInit.sh
+++ b/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 ../../ \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 951d463b..7db1a175 100644
--- a/Dockerfile
+++ b/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 \
diff --git a/README.md b/README.md
index 389d6d1d..ec1e5a15 100644
--- a/README.md
+++ b/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>
diff --git a/install.sh b/install.sh
index ae489c2a..9f46d4df 100644
--- a/install.sh
+++ b/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
diff --git a/x-ui.sh b/x-ui.sh
index c7331e6d..ffb20f06 100644
--- a/x-ui.sh
+++ b/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
}