mirror of
https://github.com/andrey271192/WARP-Web-UI.git
synced 2026-09-20 11:55:34 +00:00
Sanitized panel from production: env-based auth, interactive install prompts for SOCKS/Web UI ports, MIT license, EN/RU README. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
1.2 KiB
Bash
Executable File
25 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
if command -v warp-cli >/dev/null 2>&1; then
|
|
echo "cloudflare-warp already installed: $(warp-cli --version 2>/dev/null || true)"
|
|
systemctl enable --now warp-svc 2>/dev/null || true
|
|
warp-cli --accept-tos registration show 2>/dev/null || warp-cli --accept-tos registration new 2>/dev/null || true
|
|
warp-cli --accept-tos mode proxy 2>/dev/null || true
|
|
warp-cli --accept-tos proxy port "${WARP_PROXY_PORT:-1024}" 2>/dev/null || true
|
|
exit 0
|
|
fi
|
|
apt-get update -qq
|
|
apt-get install -y -qq curl gnupg lsb-release ca-certificates
|
|
mkdir -p /usr/share/keyrings
|
|
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
|
|
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/cloudflare-client.list
|
|
apt-get update -qq
|
|
apt-get install -y -qq cloudflare-warp
|
|
systemctl enable --now warp-svc
|
|
sleep 2
|
|
warp-cli --accept-tos registration new || true
|
|
warp-cli --accept-tos mode proxy
|
|
warp-cli --accept-tos proxy port "${WARP_PROXY_PORT:-1024}"
|
|
echo "WARP installed."
|