Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions reality-ezpz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ HEIGHT=30
WIDTH=60
CHOICE_HEIGHT=20

image[xray]="teddysun/xray:1.8.4"
image[sing-box]="gzxhwq/sing-box:1.8.14"
image[nginx]="nginx:1.24.0"
image[certbot]="certbot/certbot:v2.6.0"
image[haproxy]="haproxy:2.8.0"
image[python]="python:3.11-alpine"
image[wgcf]="virb3/wgcf:2.2.18"
image[xray]="teddysun/xray:25.9.11"
image[sing-box]="gzxhwq/sing-box:1.12.9"
image[nginx]="nginx:1.29.1"
image[certbot]="certbot/certbot:v5.0.0"
image[haproxy]="haproxy:3.2.6"
image[python]="python:3.13-alpine"
image[wgcf]="virb3/wgcf:2.2.29"

defaults[transport]=tcp
defaults[domain]=www.google.com
Expand Down Expand Up @@ -120,7 +120,7 @@ function show_help {
echo " --enable-warp <true|false> Enable or disable Cloudflare warp"
echo " --warp-license <warp-license> Add Cloudflare warp+ license"
echo " -c --core <sing-box|xray> Select core (xray, sing-box, default: ${defaults[core]})"
echo " --security <reality|letsencrypt|selfsigned> Select type of TLS encryption (reality, letsencrypt, selfsigned, default: ${defaults[security]})"
echo " --security <reality|letsencrypt|selfsigned> Select type of TLS encryption (reality, letsencrypt, selfsigned, default: ${defaults[security]})"
echo " -m --menu Show menu"
echo " --enable-tgbot <true|false> Enable Telegram bot for user management"
echo " --tgbot-token <token> Token of Telegram bot"
Expand Down Expand Up @@ -278,7 +278,7 @@ function parse_args {
if [[ ! ${args[tgbot_token]} =~ ${regex[tgbot_token]} ]]; then
echo "Invalid Telegram Bot Token: ${args[tgbot_token]}"
return 1
fi
fi
if ! curl -sSfL -m 3 "https://api.telegram.org/bot${args[tgbot_token]}/getMe" >/dev/null 2>&1; then
echo "Invalid Telegram Bot Token: Telegram Bot Token is incorrect. Check it again."
return 1
Expand Down Expand Up @@ -638,7 +638,7 @@ function build_config {
config[warp_license]=""
warp_delete_account "${config[warp_id]}" "${config[warp_token]}"
echo "WARP has been disabled due to the license error."
fi
fi
fi
}

Expand Down Expand Up @@ -688,7 +688,7 @@ function uninstall {
}

function install_packages {
if [[ -n $BOT_TOKEN ]]; then
if [[ -n $BOT_TOKEN ]]; then
return 0
fi
if ! which qrencode whiptail jq xxd zip unzip >/dev/null 2>&1; then
Expand Down Expand Up @@ -751,6 +751,7 @@ services:
$([[ ${config[security]} != 'reality' && ${config[transport]} != 'shadowtls' ]] && echo "- 8443" || true)
restart: always
environment:
ENABLE_DEPRECATED_WIREGUARD_OUTBOUND: "true"
TZ: Etc/UTC
volumes:
- ./${path[engine]#${config_path}/}:/etc/${config[core]}/config.json
Expand Down Expand Up @@ -972,7 +973,7 @@ function generate_tgbot_dockerfile {
FROM ${image[python]}
WORKDIR ${config_path}/tgbot
RUN apk add --no-cache docker-cli-compose curl bash newt libqrencode-tools sudo openssl jq zip unzip
RUN pip install --no-cache-dir python-telegram-bot==13.5 qrcode[pil]==7.4.2
RUN pip install --no-cache-dir python-telegram-bot[callback-data]==22.5 qrcode[pil]==8.2
CMD [ "python", "./tgbot.py" ]
EOF
}
Expand Down
Loading