### Install MTProxyMax using One-Line Installer Source: https://context7.com/samnet-dev/mtproxymax/llms.txt Installs MTProxyMax using a convenient one-line bash script that guides the user through an interactive setup wizard. This method is recommended for quick and easy deployment. ```bash sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/SamNet-dev/MTProxyMax/main/install.sh)" ``` -------------------------------- ### mtproxymax Replication Setup and Status Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands for setting up and managing replication between mtproxymax instances. Includes commands to initiate setup, check status, trigger syncs, view logs, test connectivity, and promote a slave to master. It relies on a master generating a sync script and a systemd timer for periodic synchronization. ```bash mtproxymax replication setup mtproxymax replication status mtproxymax replication sync mtproxymax replication logs mtproxymax replication test mtproxymax replication promote ``` -------------------------------- ### Install MTProxyMax Manually Source: https://context7.com/samnet-dev/mtproxymax/llms.txt Provides instructions for manually installing MTProxyMax by downloading the script, making it executable, and running the install command. This method offers more control over the installation process. ```bash curl -fsSL https://raw.githubusercontent.com/SamNet-dev/MTProxyMax/main/mtproxymax.sh -o mtproxymax chmod +x mtproxymax sudo ./mtproxymax install ``` -------------------------------- ### Manage Proxy Lifecycle Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to control the installation, status, and execution state of the proxy service. ```bash mtproxymax install mtproxymax uninstall mtproxymax start mtproxymax stop mtproxymax restart mtproxymax status mtproxymax menu ``` -------------------------------- ### mtproxymax Ad-Tag Monetization Setup Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Command to set up ad-tag monetization. Requires a hex value obtained from MTProxyBot. This feature enables users to see a pinned channel, allowing the proxy owner to earn revenue. ```bash mtproxymax adtag set ``` -------------------------------- ### mtproxymax Proxy Chaining (Upstream Routing) Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Demonstrates how to configure upstream routing for traffic through intermediate servers using SOCKS5, SOCKS4, or direct routing. Supports authentication and weight-based load balancing. Hostnames are resolved by the engine. Example configurations show routing percentages and credentials. ```bash # Route 20% through Cloudflare WARP mtproxymax upstream add warp socks5 127.0.0.1:40000 - - 20 # Route through a backup VPS mtproxymax upstream add backup socks5 203.0.113.50:1080 user pass 80 # Hostnames are supported (resolved by the engine) mtproxymax upstream add remote socks5 my-proxy.example.com:1080 user pass 50 ``` -------------------------------- ### Manage MTProxyMax Proxy Lifecycle Source: https://context7.com/samnet-dev/mtproxymax/llms.txt Commands to control the lifecycle of the MTProxyMax Docker container, including starting, stopping, and restarting the proxy service. It also includes commands to check the proxy's current status. ```bash sudo mtproxymax start sudo mtproxymax stop sudo mtproxymax restart mtproxymax status ``` -------------------------------- ### Get MTProxyMax Status in JSON Format Source: https://context7.com/samnet-dev/mtproxymax/llms.txt Retrieves the current status of the MTProxyMax proxy in JSON format, which is useful for integration with monitoring tools like Grafana or Zabbix. This provides structured data about the proxy's health and performance. ```bash mtproxymax status --json ``` -------------------------------- ### Manage Replication Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands for setting up and maintaining master-slave replication between proxy instances. ```bash mtproxymax replication setup mtproxymax replication status mtproxymax replication add [port] [label] mtproxymax replication remove mtproxymax replication list mtproxymax replication enable mtproxymax replication disable mtproxymax replication sync mtproxymax replication test [host] mtproxymax replication logs mtproxymax replication reset mtproxymax replication promote ``` -------------------------------- ### Engine and Update Management Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to manage the proxy engine version, rebuild images, and check for software updates. ```bash mtproxymax engine status mtproxymax engine rebuild mtproxymax rebuild mtproxymax update ``` -------------------------------- ### Monitoring and Diagnostics Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to view traffic statistics, engine metrics, logs, and perform health checks. ```bash mtproxymax traffic mtproxymax metrics mtproxymax metrics live [seconds] mtproxymax logs mtproxymax health ``` -------------------------------- ### mtproxymax Engine Management and Updates Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands for managing the mtproxymax engine, including checking the current version, forcing a rebuild of the engine Docker image, or rebuilding from source. Updates are typically delivered via `mtproxymax update`, with fallbacks to source compilation if pre-built images are unavailable. ```bash mtproxymax engine status mtproxymax engine rebuild mtproxymax rebuild ``` -------------------------------- ### mtproxymax Real-Time Traffic Monitoring Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to monitor real-time traffic and connection statistics. Provides per-user breakdowns of uploaded/downloaded bytes and active connections. Cumulative tracking is maintained across restarts. Metrics are exposed for Prometheus. ```bash mtproxymax traffic mtproxymax status ``` -------------------------------- ### Security and Routing Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to manage geoblocking, upstream routing, and SNI policies. ```bash mtproxymax geoblock add mtproxymax geoblock remove mtproxymax geoblock list mtproxymax upstream list mtproxymax upstream add [user] [pass] [weight] mtproxymax upstream remove mtproxymax upstream test mtproxymax sni-policy [mask|drop] ``` -------------------------------- ### Configure Proxy Settings Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to modify core proxy settings such as ports, IP addresses, domains, and ad-tags. ```bash mtproxymax port [get|] mtproxymax ip [get|auto|
] mtproxymax domain [get|clear|] mtproxymax adtag set mtproxymax adtag remove ``` -------------------------------- ### Replication Management Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to manage master-slave replication, including status checks, manual synchronization, and failover promotion. ```APIDOC ## POST /replication/sync ### Description Triggers an immediate synchronization of configuration from the Master node to all Slave nodes. ### Method POST ### Endpoint mtproxymax replication sync ### Response #### Success Response (200) - **status** (string) - Confirmation of sync initiation. ``` -------------------------------- ### Manage User Secrets Source: https://github.com/samnet-dev/mtproxymax/blob/main/README.md Commands to manage user access, including adding, removing, rotating keys, and setting traffic limits. ```bash mtproxymax secret add