- Merged stdout and stderr in cmd_logs to capture all container output.
- Added explicit check for container status when no logs are returned.
- Improved feedback for empty logs in running containers.
- Fixed "No logs" placeholder when container writes exclusively to stderr.
- Updated cmd_logs to combine stdout and stderr streams.
- Added a check for container existence before fetching logs.
- Increased log tail limit to 50 lines.
- Improved user feedback when logs are empty but the container is running.
- Added interactive port selection (443, 8443, and manual text input).
- Enhanced /status with a list of other running Docker containers.
- Improved MTG container stability with DNS tag -t 1.0.0.1.
- Implemented state-based text handler for custom port configuration.
- Modified Docker inspect template to include spaces between port bindings.
- Updated proxy_info logic to extract only the first port instance.
- Fixed concatenation of TCP and UDP ports (e.g., 2725727257 -> 27257).
- 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"
}