diff options
| author | Mammad <61095662+M4mmad@users.noreply.github.com> | 2024-01-01 23:09:21 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-01 23:17:50 +0300 |
| commit | 31e9734414f084b9d1725d5ae9be46d3720ac122 (patch) | |
| tree | aa66b0c210ae4fdbb3cb3dbaaf4876a5a4fd65ed | |
| parent | ceee1e4277953b68aeded8af01cf2eddfee2fbd5 (diff) | |
bash - Multi protocol support (#1496)
| -rw-r--r-- | x-ui.sh | 51 |
1 files changed, 41 insertions, 10 deletions
@@ -115,7 +115,7 @@ install() { } update() { - confirm "This function will forcefully reinstall the latest version, and the data will not be lost. Do you want to continue?" "n" + confirm "This function will forcefully reinstall the latest version, and the data will not be lost. Do you want to continue?" "y" if [[ $? != 0 ]]; then LOGE "Cancelled" if [[ $# == 0 ]]; then @@ -796,6 +796,33 @@ 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 @@ -1080,14 +1107,15 @@ show_menu() { ${green}17.${plain} Cloudflare SSL Certificate ${green}18.${plain} IP Limit Management ${green}19.${plain} WARP Management + ${green}20.${plain} Multi Protocol Management ———————————————— - ${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 + ${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 " show_status - echo && read -p "Please enter your selection [0-23]: " num + echo && read -p "Please enter your selection [0-24]: " num case "${num}" in 0) @@ -1151,19 +1179,22 @@ show_menu() { warp_cloudflare ;; 20) - enable_bbr + multi_protocol ;; 21) - update_geo + enable_bbr ;; 22) - open_ports + update_geo ;; 23) + open_ports + ;; + 24) run_speedtest ;; *) - LOGE "Please enter the correct number [0-23]" + LOGE "Please enter the correct number [0-24]" ;; esac } |
