Skip to content

ebrasha/abdal-4iproto-panel

Repository files navigation

Abdal 4iProto Panel

Abdal 4iProto Panel Logo
Abdal 4iProto Panel Logo

📘 Other Languages

🎯 About

Abdal 4iProto Panel is a comprehensive web-based management interface for the Abdal 4iProto Server. This panel provides administrators with a complete solution to manage users, server configuration, traffic monitoring, session management, and system logs through an intuitive web interface.

The panel is built with Go and uses embedded resources, making it a single executable file that can run without any prerequisites. It supports both Windows and Linux systems and can be installed as a system service.

✨ Features

User Management

  • Complete CRUD Operations: Create, read, update, and delete users
  • User Configuration: Manage user settings including:
    • Username and password
    • Role assignment (admin/user)
    • Blocked domains and IPs
    • Session limits and TTL
    • Speed limits (KB/s)
    • Traffic limits (MB)
    • Logging preferences

Server Configuration

  • Port Management: Configure multiple server ports
  • Shell Configuration: Set default shell for Windows/Linux
  • Authentication Settings: Configure max authentication attempts
  • Server Version: Customize server signature/version

Security Features

  • IP Blocking: Manage blocked IP addresses
  • Brute-Force Protection:
    • Configurable max login attempts
    • Time-based attempt window
    • Configurable block duration
    • Automatic IP blocking

Monitoring & Logging

  • Real-time Logs: View user access logs with Ajax updates
  • Traffic Monitoring: Monitor user traffic consumption
    • Real-time traffic statistics
    • Session-based and total traffic tracking
    • Traffic limit warnings
  • Session Management: View active sessions from the server
    • Session ID, username, IP address
    • Client version, creation time, last seen

Panel Configuration

  • Panel Settings: Manage panel configuration through web interface
    • Port configuration
    • Admin credentials
    • Logging preferences
    • Security settings
  • Auto-restart: Panel service automatically restarts after configuration changes

Additional Features

  • Multi-language Support: English and Persian (Farsi) interface
  • Responsive Design: Mobile-friendly with hamburger menu
  • Service Support: Can run as Windows Service or Linux systemd service
  • Embedded Resources: All assets (CSS, JS, templates, translations) are embedded
  • No Prerequisites: Single executable file, no external dependencies

🚀 Installation

🚀 Easy Installation via Abdal 4iProto Cli

Abdal 4iProto Cli is an advanced CLI tool for managing the Abdal 4iProto Ecosystem. It automatically detects your OS/Architecture, verifies SHA-256 checksums, configures ports, generates SSH keys, and registers persistent system services.

🧩 Required Files for Installation

The following files must be placed alongside the installation script:

abdal-4iproto-panel.json
abdal_4iproto_panel_linux
abdal_4iproto_server_linux
blocked_ips.json
id_ed25519
id_ed25519.pub
server_config.json
users.json

🧠 Note for linux:
The two executable core files are:

  • abdal_4iproto_panel_linux — The management panel executable
  • abdal_4iproto_server_linux — The 4iProto server executable

🧠 Note for windows:
The two main executable files are:

  • abdal-4iproto-panel-windows.exe — The management panel executable
  • abdal-4iproto-server-windows.exe — The 4iProto server executable

⚙️ Linux Installation Command

Simply execute the installation script along with the required files located in the path: /usr/local/abdal-4iproto-server

chmod +x install-abdal-4iproto-panel.sh
./install-abdal-4iproto-panel.sh

⚙️ Windows Installation Command

Store all files in a single directory, then run the install-abdal-4iproto-panel.bat file with Administrator privileges.

🧑‍💻 For developers

Prerequisites

  • Go 1.21 or later (for building from source)
  • Windows 7+ or Linux system with systemd

Build from Source

# Clone the repository
git clone https://github.com/ebrasha/abdal-4iproto-panel.git
cd abdal-4iproto-panel

# Build the executable
go build -o abdal-4iproto-panel main.go

# For Windows
go build -o abdal-4iproto-panel.exe main.go

Download Pre-built Binaries

Download the latest release from the Releases page.

⚙️ Configuration

Initial Configuration

The panel creates a default configuration file abdal-4iproto-panel.json on first run:

{
  "port": 52202,
  "username": "ebrasha",
  "password": "ebrasha1309",
  "logging": true,
  "blocked_ips": [],
  "max_login_attempts": 5,
  "login_attempt_window": 300,
  "block_duration": 3600
}

Accessing the Panel

  1. Open your web browser
  2. Navigate to http://localhost:52202 (or the configured port)
  3. Login with default credentials:
    • Username: ebrasha
    • Password: ebrasha1309

⚠️ Important: Change the default password immediately after first login!

Managing the Panel

All management is done through the web interface:

  • Dashboard: Overview of users, sessions, and traffic
  • Users: Manage user accounts and permissions
  • Server Configuration: Configure the Abdal 4iProto Server
  • Blocked IPs: Manage blocked IP addresses
  • Logs: View user access logs
  • Traffic: Monitor user traffic consumption
  • Sessions: View active server sessions
  • Panel Configuration: Manage panel settings
  • About: Information about the panel and programmer

🤖 Telegram Bot

The panel ships with an optional Telegram bot that mirrors every administrative action from the web UI.

Enabling the bot

  1. Open @BotFather in Telegram and create a new bot. Save the API token it gives you.
  2. Open @userinfobot (or any similar bot) and copy your own numeric Telegram user ID.
  3. In the panel, go to Panel Configuration and scroll to the 🤖 Telegram Bot section.
  4. Tick Enable Telegram bot, paste the API token, then list one or more admin Telegram IDs (separated by commas, spaces or new lines).
  5. Click Save. The panel service restarts automatically and the bot starts polling Telegram.

The settings are persisted to abdal-4iproto-panel.json under the telegram_bot key:

"telegram_bot": {
  "enabled": true,
  "token": "123456789:AA...your-bot-token",
  "admins": [111111111, 222222222]
}

Security model

  • The bot drops every update that does not come from an admin Telegram ID, and replies with a short "not authorized" message so attackers do not silently probe it.

Architecture & performance design

The bot runs as a fully isolated subsystem inside the panel process. It uses its own HTTP connection pool, dispatcher worker pool, asynchronous log channel and debounced restart queue, so a busy panel UI or slow disk I/O can never slow the bot down. The end-to-end update pipeline looks like this:

┌─────────────────────────┐      ┌──────────────────────┐
│ Telegram getUpdates     │ ───► │ updates channel      │
│ (1 goroutine)           │      │ (cap 1024)           │
└─────────────────────────┘      └──────────┬───────────┘
                                            │
                          ┌─────────────────┼─────────────────┐
                          ▼                 ▼                 ▼
                   ┌──────────┐      ┌──────────┐      ┌──────────┐
                   │ worker 1 │ ...  │ worker N │      │ worker N │ (NumCPU*2, ≥8)
                   └────┬─────┘      └────┬─────┘      └────┬─────┘
                        │                 │                 │
                        ▼ (go r(ctx,b,u)) ▼                 ▼
                   ┌────────────────────────────────────────────┐
                   │ Per-handler goroutine                       │
                   │  → trackerMiddleware (WaitGroup +1)         │
                   │  → adminOnly                                │
                   │  → recover                                  │
                   │  → handler (sendText via HTTP/2 conn pool)  │
                   └────────────────────────────────────────────┘
                        │
                        ▼ (svc.Info/Warning/Error)
                   ┌────────────────┐
                   │ async log chan │ ──► dedicated writer ──► panelLogger
                   │ (cap 1024)     │
                   └────────────────┘

Bot commands

Every command also appears in the Telegram client's / menu (registered automatically through SetMyCommands).

Command Description
/start Start the bot. First-time users see the language picker (🇬🇧 / 🇮🇷).
/menu Open the main menu (also available from any "🏠 Main Menu" button).
/language Switch between English and Persian at any time.
/help Print the full list of commands.
/cancel Abort the current interactive flow and return to the menu.
/users Open the paginated user list.
/adduser Create a user with default values (see below).
/adduser_interactive Create a user step by step (asks every field).
/server View or edit the server configuration field by field.
/blockedips Manage globally blocked IPs (list, add, remove).
/logs Browse user access logs (last 20 entries per user).
/blockedaccess Browse blocked access logs.
/traffic Show per user traffic usage.
/sessions List active sessions and revoke them.
/restart_server Restart the Abdal 4iProto Server service (with confirmation).
/restart_panel Restart the panel service (with confirmation).

🔧 Service Installation

The panel can be installed as a system service for automatic startup and background operation.

Windows Service

# Install the service
abdal-4iproto-panel.exe install

# Start the service
abdal-4iproto-panel.exe start

# Stop the service
abdal-4iproto-panel.exe stop

# Uninstall the service
abdal-4iproto-panel.exe uninstall

Linux Systemd Service

# Run the installation script
sudo ./install-abdal-4iproto-panel.sh

# Or manually
sudo systemctl start abdal-4iproto-panel
sudo systemctl enable abdal-4iproto-panel
sudo systemctl status abdal-4iproto-panel

🔗 Project Links

🐛 Reporting Issues

If you encounter any issues or have configuration problems, please reach out via email at Prof.Shafiei@Gmail.com. You can also report issues on GitHub.

❤️ Donation

If you find this project helpful and would like to support further development, please consider making a donation:

🤵 Programmer

Handcrafted with Passion by Ebrahim Shafiei (EbraSha)

📜 License

This project is licensed under the GPLv2 or later License.

About

Abdal 4iProto Panel is a comprehensive management interface for the Abdal 4iProto Server, providing full control over users, server configuration, traffic monitoring, and system logs.Programmer : Ebrahim Shafiei (EbraSha)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors