11 Commits

Author SHA1 Message Date
kobaltgit
0e45055fd9 fix: robust log retrieval with stderr merging and status check
- 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.
2026-04-06 13:08:55 +03:00
kobaltgit
5da628ed70 fix: improve docker logs retrieval and diagnostics
- 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.
2026-04-06 13:05:46 +03:00
kobaltgit
3c6ce21d31 feat: integrate GoTelegram features into SwiftGram
- 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.
2026-04-06 13:00:00 +03:00
kobaltgit
e1b495ca47 fix: resolve port doubling issue in status display
- 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).
2026-04-06 12:46:57 +03:00
kobaltgit
09f1aa3832 feat: make installer self-contained and fix UDP calls
- 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.
2026-04-06 12:36:33 +03:00
kobaltgit
ed983773cd modified: install.sh 2026-04-05 23:59:51 +03:00
kobaltgit
ec972b17e4 fix: Ultimate UDP call fix with host networking
- 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.
2026-04-05 23:49:12 +03:00
kobaltgit
8980f74b26 modified: install.sh 2026-04-05 23:34:33 +03:00
kobaltgit
272e712eaa fix: Resolve proxy connectivity and port selection issues
- 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).
2026-04-05 23:29:13 +03:00
kobaltgit
89825de812 find_smart_port() {
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"
}
2026-04-05 23:10:37 +03:00
kobaltgit
9482cfe7f6 feat: Initial commit for SwiftGram - Smart MTProxy Manager 2026-04-05 22:08:46 +03:00