From 3f997482decfbfc8bd06aee5a9d6d7e156921284 Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Tue, 14 Apr 2026 23:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=AC=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 26 +++++++++++++------------- service/xboard/service.go | 5 ++--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index a3ad2895..2a3aa5ff 100644 --- a/install.sh +++ b/install.sh @@ -33,19 +33,6 @@ case $ARCH in *) echo -e "${RED}Unsupported architecture: $ARCH${NC}"; exit 1 ;; esac -# Interactive Prompts -read -p "Enter Panel URL (e.g., https://yourbase.com): " PANEL_URL -read -p "Enter Node ID: " NODE_ID -read -p "Enter Panel Token (Node Key): " PANEL_TOKEN - -if [[ -z "$PANEL_URL" || -z "$NODE_ID" || -z "$PANEL_TOKEN" ]]; then - echo -e "${RED}All fields are required!${NC}" - exit 1 -fi - -# Clean up trailing slash -PANEL_URL="${PANEL_URL%/}" - # Prepare directories mkdir -p "$CONFIG_DIR" mkdir -p "/var/lib/sing-box" @@ -126,6 +113,19 @@ build_sing_box() { install_go build_sing_box +# Interactive Prompts +read -p "Enter Panel URL (e.g., https://yourbase.com): " PANEL_URL +read -p "Enter Node ID: " NODE_ID +read -p "Enter Panel Token (Node Key): " PANEL_TOKEN + +if [[ -z "$PANEL_URL" || -z "$NODE_ID" || -z "$PANEL_TOKEN" ]]; then + echo -e "${RED}All fields are required!${NC}" + exit 1 +fi + +# Clean up trailing slash +PANEL_URL="${PANEL_URL%/}" + # Generate Configuration echo -e "${YELLOW}Generating configuration...${NC}" cat > "$CONFIG_FILE" <