mirror of
https://github.com/anten-ka/go_warp_pro.git
synced 2026-05-19 14:45:59 +00:00
Clean: remove pipe detection hacks, use simple cp like Kaskad
This commit is contained in:
25
warp.sh
25
warp.sh
@@ -5,7 +5,6 @@ set -o pipefail
|
||||
# WARP Manager v1.1 — Cloudflare WARP SOCKS5 Proxy for 3X-UI
|
||||
# Telegram Bot · Status · Rekey · 3X-UI Config
|
||||
# Channel: https://www.youtube.com/@antenkaru
|
||||
# Line endings: LF only (Unix) for gowarp on Linux
|
||||
# ══════════════════════════════════════════════════════════════
|
||||
|
||||
WARP_VERSION="1.1"
|
||||
@@ -983,19 +982,10 @@ run_startup() {
|
||||
|
||||
((s++))
|
||||
printf " ${CYAN}[%d/%d]${NC} ${YELLOW}⏳${NC} Установка gowarp..." "$s" "$total"
|
||||
GOWARP_NOT_INSTALLED=0
|
||||
case "$0" in
|
||||
/dev/*)
|
||||
printf "\r ${CYAN}[%d/%d]${NC} ${YELLOW}⚠${NC} Через pipe — gowarp не сохранён (см. ниже) \n" "$s" "$total"
|
||||
GOWARP_NOT_INSTALLED=1
|
||||
;;
|
||||
*)
|
||||
if [ "$(readlink -f "$0" 2>/dev/null)" != "/usr/local/bin/gowarp" ] && [ -s "$0" ]; then
|
||||
cp -f "$0" "/usr/local/bin/gowarp" && chmod +x "/usr/local/bin/gowarp"
|
||||
fi
|
||||
printf "\r ${CYAN}[%d/%d]${NC} ${GREEN}✓${NC} Команда gowarp \n" "$s" "$total"
|
||||
;;
|
||||
esac
|
||||
if [ "$(readlink -f "$0" 2>/dev/null)" != "/usr/local/bin/gowarp" ]; then
|
||||
cp -f "$0" "/usr/local/bin/gowarp"; chmod +x "/usr/local/bin/gowarp"
|
||||
fi
|
||||
printf "\r ${CYAN}[%d/%d]${NC} ${GREEN}✓${NC} Команда gowarp \n" "$s" "$total"
|
||||
|
||||
((s++))
|
||||
printf " ${CYAN}[%d/%d]${NC} ${YELLOW}⏳${NC} Определение IP..." "$s" "$total"
|
||||
@@ -1015,13 +1005,6 @@ run_startup() {
|
||||
echo ""
|
||||
echo -e " ${GREEN}✅ WARP Manager v${WARP_VERSION} готов к работе!${NC}"
|
||||
echo ""
|
||||
if [ "${GOWARP_NOT_INSTALLED:-0}" -eq 1 ]; then
|
||||
echo -e " ${YELLOW}Чтобы команда ${CYAN}gowarp${YELLOW} работала после выхода, выполните:${NC}"
|
||||
echo -e " ${WHITE}curl -sL -H \"Authorization: token ВАШ_ТОКЕН\" \\${NC}"
|
||||
echo -e " ${WHITE} https://raw.githubusercontent.com/anten-ka/go_warp_pro/main/warp.sh -o /tmp/warp.sh \\${NC}"
|
||||
echo -e " ${WHITE} && bash /tmp/warp.sh ${GREEN}ВАШ_КЛЮЧ${NC}"
|
||||
echo ""
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
show_promo
|
||||
|
||||
Reference in New Issue
Block a user