- Embedded bot.py and requirements.txt directly into install.sh.
- Removed external curl dependencies for bot source code.
- Strengthened UDP port forwarding in Docker and Firewall for Telegram calls.
- Improved port detection logic to avoid conflicts with Hiddify Panel.
- Switched container to --network host to eliminate NAT-related UDP call issues.
- Fixed availability by explicitly binding to 0.0.0.0 instead of hybrid :: address.
- Retained smart port selection logic and ad-free environment.
- Verified as the most stable configuration for MTProxy calls.
- Fixed port variable pollution by redirecting info messages to stderr.
- Switched Docker to --network host for maximum compatibility.
- Improved UDP/IPv6 accessibility by binding to all interfaces (::).
- Verified compatibility with existing server panels (Hiddify/Nginx).
local port=443
if ss -tlnp | grep -qE ":${port}\b"; then
echo -e " ${YELLOW}ℹ Порт 443 занят (Hiddify/Nginx). Пробую 8443...${NC}" >&2
port=8443
if ss -tlnp | grep -qE ":${port}\b"; then
port=$(( (RANDOM % 10000) + 20000 ))
echo -e " ${YELLOW}ℹ Порт 8443 тоже занят. Выбран случайный: $port${NC}" >&2
fi
fi
echo "$port"
}