v2:readme
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | v2:readme [2026/06/12 22:14] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== 1. Proxysmart manual [v2]. ====== | ||
| + | |||
| + | |||
| + | ===== 1.1. The goal of the software. | ||
| + | |||
| + | The software allows running your own 4g/5g mobile proxy infrastructure. | ||
| + | |||
| + | Functions: | ||
| + | |||
| + | * IP resets on modems (+ automatic rotation + checking IP uniqueness) | ||
| + | * WebApp for checking statuses of the modems, for creating users and ports, IP rotations | ||
| + | * WEB API for all actions | ||
| + | * Bandwidth quotas and Speed limits per proxy | ||
| + | * Exposing proxy ports, so they are available from world wide | ||
| + | * OS TCP normalization, | ||
| + | * Proxy ACLs (what to allow/deny to proxy users) - blacklists | ||
| + | * Openvpn integration, | ||
| + | * Socks5 supports UDP and QUIC (HTTP/3.0) | ||
| + | * No leaks | ||
| + | * Native DNS from mobile carriers | ||
| + | * Large set of supported | ||
| + | |||
| + | Concept: | ||
| + | |||
| + | * A Modem is a device that connects to a mobile carrier | ||
| + | * A Port is a proxy (SOCKS5 + HTTP) + Openvpn profile, built on a modem | ||
| + | * Create multiple Ports on a Modem | ||
| + | * Each Port has its own settings | ||
| + | |||
| + | |||
| + | ===== 1.2. Architecture | ||
| + | |||
| + | * Onsite: box with Ubuntu, USB hub and modems | ||
| + | * Remote: VPS with proxy ports (optional) | ||
| + | |||
| + | ** Online services are used: ** | ||
| + | |||
| + | * IP checker - '' | ||
| + | * URL that is latency on modems measured with. Defined as '' | ||
| + | |||
| + | |||
| + | ===== 1.3. Configuration. ===== | ||
| + | |||
| + | Variables are set in the **WebApp-> | ||
| + | |||
| + | Each variable has brief description in place. | ||
| + | |||
| + | ===== 1.4. Mongodb integration ===== | ||
| + | |||
| + | ** Mongodb Schema ** | ||
| + | |||
| + | Mongodb contains 2 collections: | ||
| + | |||
| + | * **modems** collection. | ||
| + | |||
| + | It contains real modems, array of associative arrays, take allowed fields in '' | ||
| + | |||
| + | * **ports** collection | ||
| + | |||
| + | It contains proxy ports given to the users. Each port is connected to a modem by the IMEI key. So you can attach 1 or more ports to a modem. It is array of associative arrays, take allowed fields in '' | ||
| + | |||
| + | ** MongoDB Configuration ** | ||
| + | |||
| + | |||
| + | MongoDB URI is defined in '' | ||
| + | |||
| + | * '' | ||
| + | |||
| + | If you want to use other Mongodb collection names instead of '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | after changes: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ** Moving Mongodb to other server ** | ||
| + | |||
| + | Sometimes you want to move Mongodb to a cloud server. | ||
| + | |||
| + | * update '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ===== 1.5. Multishop ===== | ||
| + | |||
| + | It is useful for those who want to sell proxies to multiple **proxy shops**. | ||
| + | |||
| + | When shops are granted access to the server, they receive full admin-level permissions, | ||
| + | |||
| + | The Multishop system allows a single server to be safely and efficiently rented out to multiple proxy shops. Each shop can sell proxies independently, | ||
| + | |||
| + | * **Controlled access**: Shops only see their assigned modems and available (free) modems. | ||
| + | * **Scoped permissions**: | ||
| + | * **On-demand usage**: Shops should create ports only when an order is received and release the modem when the order expires. | ||
| + | * **Usage tracking**: The system tracks how long each modem is used by each shop, enabling better resource management and billing. | ||
| + | |||
| + | Prerequisites: | ||
| + | |||
| + | * Proxysmart | ||
| + | * ' | ||
| + | |||
| + | How to get it working? | ||
| + | |||
| + | * Buy Extended license, issue Extended license to the server | ||
| + | * create SHOPS: WebApp-> | ||
| + | * send the SHOPS access to the server. | ||
| + | * let the SHOPS create proxy ports. | ||
| + | |||
| + | |||
| + | Each SHOP can: | ||
| + | |||
| + | * log in the WebApp | ||
| + | * create proxy ports on free modems (a modem is then marked as belonging to the shop). | ||
| + | * delete their proxy ports (a modem is then marked as free). | ||
| + | * review their usage of proxy ports. | ||
| + | * Operations with proxy ports can be done in the WebApp or by WEB API (with the SHOP' credentials). | ||
| + | |||
| + | Admin can: | ||
| + | |||
| + | * create/ | ||
| + | * track usage of each SHOP. Usage is of 2 types: 1. bandwidth consumed. 2. The Modems*hours number. | ||
| + | |||
| + | |||
| + | |||
| + | ====== 2. Installation ====== | ||
| + | |||
| + | ===== 2.1. Initial installation ===== | ||
| + | |||
| + | Supported OS and Architectures: | ||
| + | |||
| + | * PC / Mini-PC / Laptop: https:// | ||
| + | * Raspberry PI : https:// | ||
| + | |||
| + | Armhf (arm 32 bit) doesn’t have Mongodb support! | ||
| + | |||
| + | Install a fresh OS. | ||
| + | |||
| + | Unplug any USB modems. | ||
| + | |||
| + | < | ||
| + | curl https:// | ||
| + | </ | ||
| + | |||
| + | Reboot or run '' | ||
| + | |||
| + | After that either enjoy the Demo version at '' | ||
| + | |||
| + | ++++ **Rockpi Notes** | | ||
| + | |||
| + | If LOGRAM is enabled ( a folder / | ||
| + | |||
| + | * mongodb, edit '' | ||
| + | |||
| + | ++++ | ||
| + | |||
| + | |||
| + | ===== 2.2. Adding modems ===== | ||
| + | |||
| + | * Read the section '' | ||
| + | * Plug in all modems you have, | ||
| + | * Navigate to the WebApp ( '' | ||
| + | * Wait ~20 sec to let them initialize. | ||
| + | * For each modem, click "Add modem", | ||
| + | * For each modem, create proxy ports instead of " | ||
| + | * Reboot and wait 1 minute | ||
| + | * Navigate to the WebApp and make sure the WebApp shows the modems. | ||
| + | | ||
| + | |||
| + | ===== 2.3. Forwarding proxies ports ===== | ||
| + | |||
| + | Why? In order to make proxy ports available for all users around the world. | ||
| + | |||
| + | ** Basic info on forwarding ports ** | ||
| + | |||
| + | You have 2 methods of forwarding ports : | ||
| + | * either forward them through a VPS | ||
| + | * or forward them through your own LAN router. | ||
| + | |||
| + | Which to choose? | ||
| + | |||
| + | If these conditions are met: | ||
| + | |||
| + | * you have static fiber IP onsite. | ||
| + | * and ISP allows incoming connections to that static IP | ||
| + | * and Upload and Download of fiber Internet is at least 40 Mbps. | ||
| + | * you don't need UDP in Socks5 | ||
| + | |||
| + | .. then choose port forwarding through your LAN router. Otherwise, choose port forwarding through a VPS. | ||
| + | |||
| + | ===== 2.4. Forwarding proxies ports through a VPS. ===== | ||
| + | |||
| + | The VPS server can be a cheap DigitalOcean / Linode / Vultr VPS or similar. | ||
| + | |||
| + | It should have: | ||
| + | |||
| + | * Location: as close as possible to the local server | ||
| + | * Static IPv4, so clouds like GCP / AWS / Azure / AliBabaCloud won't work (they have NAT'ed v4 IP). | ||
| + | * OS: fresh Ubuntu 22.04 / 24.04 | ||
| + | * For 1-10 modems: CPU: 1, RAM:1GB | ||
| + | * For 11-39 | ||
| + | * For 40-100 modems: CPU: 2, RAM:4GB | ||
| + | |||
| + | == On Proxysmart multi modem server == | ||
| + | |||
| + | Go to the WebApp , copy content of the SSH public key from the bottom of the page. We will refer to it as **PUBKEY** below. | ||
| + | |||
| + | Also it is stored on disk as '' | ||
| + | |||
| + | == On VPS == | ||
| + | |||
| + | Check if your VPS has no firewall. Disable it if it has – Both inside Linux OS and in hoster panel. | ||
| + | |||
| + | Install & run Ansible. | ||
| + | |||
| + | < | ||
| + | apt update && apt install git ansible -y | ||
| + | cd ~/ | ||
| + | git clone https:// | ||
| + | cd proxysmart-vps | ||
| + | </ | ||
| + | |||
| + | copy template to '' | ||
| + | |||
| + | < | ||
| + | cp -i vars.txt.example vars.txt | ||
| + | </ | ||
| + | |||
| + | edit the file '' | ||
| + | |||
| + | < | ||
| + | nano vars.txt | ||
| + | </ | ||
| + | |||
| + | Replace '' | ||
| + | |||
| + | Run Ansible: | ||
| + | |||
| + | < | ||
| + | ansible-playbook proxysmart-vps.yml | ||
| + | </ | ||
| + | |||
| + | done. | ||
| + | |||
| + | |||
| + | == On Proxysmart multi modem server == | ||
| + | |||
| + | in **WebApp-> | ||
| + | |||
| + | * set '' | ||
| + | * set '' | ||
| + | * Pick a port for '' | ||
| + | * Pick a port for '' | ||
| + | * Pick a port for '' | ||
| + | * set '' | ||
| + | * Click SAVE | ||
| + | |||
| + | Run '' | ||
| + | |||
| + | == On VPS == | ||
| + | |||
| + | issue the command '' | ||
| + | |||
| + | == On your private desktop or any other PC == | ||
| + | |||
| + | * visit '' | ||
| + | * you can ssh to VPS IP and port 6001, and that goes to the multi-modem-server: | ||
| + | |||
| + | |||
| + | === Cloud VPS IP change === | ||
| + | |||
| + | If Cloud VPS IP is changed, update it on multi-modem-server side by defining new '' | ||
| + | |||
| + | ===== 2.5. Forwarding ports through your own LAN router. ===== | ||
| + | |||
| + | |||
| + | **Steps** | ||
| + | |||
| + | Consult with documentation of your LAN router. Forward these ports from ISP IP address to the LAN IP of proxysmart server: | ||
| + | |||
| + | * TCP 8001-8999 for HTTP proxies | ||
| + | * TCP 5001-5999 for SOCKS5 proxies | ||
| + | * TCP 8080 for the WebApp , will be used in ' | ||
| + | * TCP 1194 for Openvpn (if it is working in TCP mode) , will be used for OPENVPN_SERVER_PORT | ||
| + | * UDP 1194 for Openvpn (if it is working in UDP mode) , will be used for OPENVPN_SERVER_PORT | ||
| + | * TCP 443 for Xray (makes sense only if Xray support is activated) | ||
| + | |||
| + | **Notes** | ||
| + | |||
| + | Set in WebApp-> | ||
| + | |||
| + | * PROXY_PORTS_FORWARDER_ENABLE | ||
| + | * REWRITE_WEBAPP_URL | ||
| + | * REWRITE_WEBAPP_TO | ||
| + | * REWRITE_HOST_IN_PROXY_CREDS | ||
| + | * REWRITE_HOST_IN_PROXY_CREDS_TO : '' | ||
| + | * OPENVPN_SERVER_HOST | ||
| + | * OPENVPN_SERVER_PORT | ||
| + | * XRAY_REMOTE_PORT | ||
| + | |||
| + | | ||
| + | |||
| + | * click SAVE. | ||
| + | |||
| + | Then finally reconfigure the system by running '' | ||
| + | |||
| + | ----- | ||
| + | |||
| + | ===== 2.6. Upgrade ===== | ||
| + | |||
| + | * Current stable version is **v2.3**. | ||
| + | * Current development version is **v2.4**. | ||
| + | |||
| + | |||
| + | ==== 2.6.1. Upgrade from v2.3 to (current stable) v2.3 ==== | ||
| + | |||
| + | |||
| + | Run these commands: | ||
| + | |||
| + | < | ||
| + | curl https:// | ||
| + | </ | ||
| + | |||
| + | Reboot or run '' | ||
| + | |||
| + | |||
| + | ===== 2.7. Development version installation (v2.4) ===== | ||
| + | |||
| + | Why? To unlock new features that are not yet in the Main version. | ||
| + | |||
| + | ** v2.4 ** | ||
| + | |||
| + | < | ||
| + | curl https:// | ||
| + | </ | ||
| + | |||
| + | Reboot or run '' | ||
| + | |||
| + | |||
| + | ----- | ||
| + | |||
| + | |||
| + | ====== 3. Adding modems ======= | ||
| + | |||
| + | |||
| + | ** Proxy credentials for new modems ** | ||
| + | |||
| + | When adding new modems, please use | ||
| + | |||
| + | * unique HTTP ports from 8001 to 8999, | ||
| + | * unique SOCKS ports from 5001 to 5999. | ||
| + | * unique nicknames like '' | ||
| + | |||
| + | |||
| + | ===== 3.1 Adding a new modem (USB) ===== | ||
| + | |||
| + | * Remove PIN from the modem’s SIM card and plug in the modem into USB port or USB hub. | ||
| + | * Check whether your modem Web App (e.g. Huawei’s E8372 / E5xxx or ZTE MF79 or Alcatel MW4x ) requires authentication, | ||
| + | * Plug in the modem. | ||
| + | * Wait ~5 minutes | ||
| + | * The modem will appear in the WebApp. | ||
| + | * Click ADD MODEM on it, assign a unique Nickname, click APPLY. | ||
| + | * Create Ports on the modem - click ADD PORT against the modem, assign a unique Port name, HTTP & SOCKS5 ports, Login and Password, then click APPLY. | ||
| + | * Refresh the WebApp, done! | ||
| + | |||
| + | ===== 3.2. Adding a LAN modem. ===== | ||
| + | |||
| + | |||
| + | **Prepare network configuration on the Proxysmart server** | ||
| + | |||
| + | |||
| + | Prerequisites: | ||
| + | |||
| + | |||
| + | * A server with 2 network Ethernet cards (preferred), | ||
| + | |||
| + | Goal: | ||
| + | |||
| + | * To have 2 network interfaces, one as an internet source ; second for accessing the modems (HUBS). | ||
| + | |||
| + | |||
| + | Assume you have 2 LAN cards, e.g. **enp6s0** main LAN, **enp2s0** is dedicated for LAN modems: | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | NAME UUID TYPE DEVICE | ||
| + | Wired connection 1 bbbee134-51c3-3830-801f-9636470e0708 | ||
| + | Wired connection 2 000ed912-2d99-3f37-882b-d79ad13102e7 | ||
| + | </ | ||
| + | |||
| + | * Rename '' | ||
| + | |||
| + | < | ||
| + | nmcli con modify Wired\ connection\ 2 con-name HUBS | ||
| + | </ | ||
| + | |||
| + | * Disable DHCP and IPV6 on **HUBS** and assign static IPv4 address 192.168.10.100. Here a network 192.168.10.x is used, where modems will be added later (as 192.168.10.1, | ||
| + | |||
| + | < | ||
| + | nmcli con modify HUBS ipv4.method manual ipv4.addresses 192.168.10.100/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | systemctl restart NetworkManager | ||
| + | </ | ||
| + | |||
| + | Delete old route: | ||
| + | |||
| + | < | ||
| + | ip ro del default via 192.168.10.1 | ||
| + | </ | ||
| + | |||
| + | Confirm you have only 1 default route via main LAN, query with | ||
| + | |||
| + | < | ||
| + | ip ro | ||
| + | </ | ||
| + | |||
| + | Output: | ||
| + | |||
| + | < | ||
| + | default via 192.168.1.1 dev enp6s0 proto static metric 100 | ||
| + | </ | ||
| + | |||
| + | **Add the modems** | ||
| + | |||
| + | |||
| + | * Remove PIN from the SIM card and power on the modem. | ||
| + | * Change the modem’s web admin password to something stored in WebApp-> | ||
| + | * Change the modem’s IP to something unique e.g. '' | ||
| + | * Put the modem' | ||
| + | * On the Proxysmart server make sure you can ping the new modem by its IP you set in previous step. | ||
| + | * Make sure '' | ||
| + | * Add Lan modem in the Webapp-> | ||
| + | * Either wait 5 minutes or run the command '' | ||
| + | * Refresh the proxysmart Web App and assign proxy logins and passwords to the new modems. | ||
| + | |||
| + | ===== 3.3. Adding an Android phone ===== | ||
| + | |||
| + | Main guide dedicated to adding Android Phones: [[v2: | ||
| + | |||
| + | ===== 3.4. Adding a virtual modem (backend proxy). ===== | ||
| + | |||
| + | A **virtual modem** is a in fact a redirect to a 3rd party proxy (HTTP or SOCKS5) so you can build own proxies based on that and resell them. | ||
| + | |||
| + | They even can be rotated if the backend proxy supports it. | ||
| + | |||
| + | How to add? | ||
| + | |||
| + | |||
| + | Make sure '' | ||
| + | |||
| + | Add them the **Webapp-> | ||
| + | |||
| + | , scroll to the bottom, and add each with the following fields | ||
| + | |||
| + | - **id** has to be in the form ' | ||
| + | - **creds** is a line with credentials of the backend proxy e.g. '' | ||
| + | - **ip_reset** is an optional parameter , the URL for triggering IP rotation of the backend proxy | ||
| + | |||
| + | Click **SAVE** | ||
| + | |||
| + | Then either wait 5 minutes or run the command '' | ||
| + | |||
| + | |||
| + | |||
| + | --------- | ||
| + | |||
| + | ====== 3. CLI API ====== | ||
| + | |||
| + | |||
| + | ===== 3.1. Maintenance ===== | ||
| + | |||
| + | ==== 3.1.1. Full reconfiguration | ||
| + | |||
| + | Run | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh reset_complete | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.1.2. Report IP uniqueness | ||
| + | |||
| + | |||
| + | ++++ JSON output.| | ||
| + | |||
| + | < | ||
| + | proxysmart.sh | ||
| + | |||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | ++++TEXT output. | | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | |||
| + | IP Uniqueness report: | ||
| + | |||
| + | Of past 14 days. | ||
| + | A Unique IP is an IP that was encountered less than 50 times during the reported period. | ||
| + | Total IP rotations on all devices: 7 | ||
| + | Unique IP rotations: 7 (100%) | ||
| + | Non Unique IP rotations: 0 (0%) | ||
| + | </ | ||
| + | |||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.1.3. Autofix the system | ||
| + | |||
| + | The command adds not added modems, also it is executed automatically by Cron every 5th minute. | ||
| + | |||
| + | Run | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh reset_gently | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.1.4. Export and Import Backup | ||
| + | |||
| + | |||
| + | |||
| + | Exports backup to a file: | ||
| + | |||
| + | < | ||
| + | proxysmart.sh backup_export FILE | ||
| + | </ | ||
| + | |||
| + | |||
| + | Imports backup from a file | ||
| + | |||
| + | < | ||
| + | proxysmart.sh backup_import FILE | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.1.5. Report Shop usage ==== | ||
| + | |||
| + | |||
| + | (only for Proxysmart v2.4+ with enabled Multishop feature) | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | < | ||
| + | proxysmart.sh shop_report SHOP PERIOD | ||
| + | </ | ||
| + | |||
| + | ++++Output: | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | "00:00 15.01.2026", | ||
| + | "13:35 15.01.2026" | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | ], | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | "00:00 15.01.2026", | ||
| + | "13:35 15.01.2026" | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | ] | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 3.2. Modems Actions ===== | ||
| + | |||
| + | ==== 3.2.1. reset IP on a modem ==== | ||
| + | |||
| + | Args: IMEI or NICKNAME. | ||
| + | |||
| + | JSON output: | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++ Output:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Plain text output: | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++Output: | ||
| + | < | ||
| + | = lock acquired on DEV modem93 | ||
| + | = resetting NICK Client5 DEV modem93 local IP 192.168.0.100 N 93 GW 192.168.0.1 IMEI 359999999999999 | ||
| + | = external IP is 46.56.178.172 | ||
| + | =stopping redirector N 93 | ||
| + | ... | ||
| + | =DNS test attempt 2/7 to DNS server 1.1.1.1 | ||
| + | Checking/ | ||
| + | Applying net_cls class identifier 0x0010093 to cgroup cgproxy93 | ||
| + | Unset reverse path filtering for interface " | ||
| + | Unset reverse path filtering for interface " | ||
| + | DNS OK - 0.092 seconds response time | ||
| + | = passed | ||
| + | = restarting proxy@93 to definitely drop old connections.. | ||
| + | = starting redirector N 93 | ||
| + | =now detect EXT_IP | ||
| + | = external IP is 46.56.181.222 | ||
| + | = purging old MTU rules from Iptables for modem N=93 | ||
| + | deleted rule 9 from mangle/ | ||
| + | = purging old MTU rules from Iptables for modem N=93 | ||
| + | = adding MTU rules to Iptables for modem N=93 MTU=1400 MSS=1360 | ||
| + | ==save report: | ||
| + | start_time=2022-05-29@21: | ||
| + | total_time=27 old_ip=46.56.178.172 | ||
| + | = lock released on DEV modem93 | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.2. Reset a modem via USB ==== | ||
| + | |||
| + | |||
| + | Can accept DEV name, IMEI or Nickname. So | ||
| + | |||
| + | ++++ For Text output:| | ||
| + | |||
| + | < | ||
| + | proxysmart.sh usb_reset_modem modem179 | ||
| + | proxysmart.sh usb_reset_modem 123456789012345 | ||
| + | proxysmart.sh usb_reset_modem Mydongle222 | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | ++++ For Json output.| | ||
| + | |||
| + | < | ||
| + | proxysmart.sh usb_reset_modem_json modem179 | ||
| + | proxysmart.sh usb_reset_modem_json 123456789012345 | ||
| + | proxysmart.sh usb_reset_modem_json Mydongle222 | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.3. show status | ||
| + | |||
| + | Show full status of all modems, table (slower). | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++Output: | ||
| + | |||
| + | |||
| + | < | ||
| + | +--------+----+---------+-------+----------------+-----+--------------+-----------+-------------+------+------------+----+ | ||
| + | | NICK | N | DEV | MODEL | IMEI | HTTP| LOCAL_IP | ||
| + | +--------+----+---------+-------+----------------+-----+--------------+-----------+-------------+------+------------+----+ | ||
| + | | dongle1| 0 | modem0 | ||
| + | | dongle2| 114| modem114| E3131 | 352221099999999| 8002| 192.168.8.100|192.168.8.1| | ||
| + | +--------+----+---------+-------+----------------+-----+--------------+-----------+-------------+------+------------+----+ | ||
| + | items TOTAL 2 | ||
| + | </ | ||
| + | |||
| + | |||
| + | Show brief status of all modems, table, (faster) | ||
| + | |||
| + | Run | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++Output: | ||
| + | |||
| + | < | ||
| + | | NICK | N | DEV | IMEI | HTTP| LOCAL_IP | ||
| + | | Cdongle2| 77| modem77| 862329099999999| 8002| 192.168.8.100| 192.168.8.1| 46.216.152.241| yes | ||
| + | | Client5 | 93| modem93| 352221099999999| 8004| 192.168.0.100| 192.168.0.1| 46.56.186.34 | ||
| + | </ | ||
| + | |||
| + | Show full status of all modems , json | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | |||
| + | ++++Output: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | Show status for a single modem, JSON | ||
| + | |||
| + | Arguements - NICK or IMEI. | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++Output: | ||
| + | <code json> | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.4. reboot a modem ==== | ||
| + | |||
| + | |||
| + | Args: Nickname or IMEI. | ||
| + | |||
| + | ++++ TEXT Output| | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | or | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | ++++ JSON Output| | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh reset_modem_by_imei 899999999999999 full | ||
| + | </ | ||
| + | or | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh reset_modem_by_imei dongle61_us full | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.5. Apply settings for a modem by IMEI ==== | ||
| + | |||
| + | JSON output | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | ++++Output: | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | Plain text output: | ||
| + | |||
| + | < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ++++output: | ||
| + | |||
| + | < | ||
| + | = lock acquired on DEV wwan_modem17 | ||
| + | = WAN_APN= | ||
| + | = PHONE_NUMBER= | ||
| + | = purge port portXrzD | ||
| + | {" | ||
| + | = purge port pxsystem17 | ||
| + | {" | ||
| + | = adding port PORT pxsystem17 for N 17 | ||
| + | = HTTP_PORT 127.0.0.1: | ||
| + | = applying new settings: port pxsystem17 DEV wwan_modem17, | ||
| + | = proxyport pxsystem17 started | ||
| + | = wont purge_port_remote for pxsystem17 | ||
| + | = updated collectd conf | ||
| + | = adding port PORT portXrzD for N 17 | ||
| + | = SOCKS_PORT 192.168.1.35: | ||
| + | = HTTP_PORT 127.0.0.1: | ||
| + | = applying new settings: port portXrzD DEV wwan_modem17, | ||
| + | = proxyport portXrzD started | ||
| + | = purging gost_quic_server@5001 on VPS | ||
| + | = setting up GOST proxy server, version: gost3 | ||
| + | = Gost local BA server | ||
| + | = Gost remote Socks5 server | ||
| + | = remote service name: gost_quic_server@5001 on 116.202.103.247: | ||
| + | = LDNS 127.100.1.100 | ||
| + | = saved / | ||
| + | |||
| + | = starting redirector@portXrzD | ||
| + | = port portXrzD: BIND_PORT=-R 0.0.0.0: | ||
| + | = updated collectd conf | ||
| + | = check expiry for PORT portXrzD | ||
| + | = no proxy expiry set | ||
| + | = kill vpn user portXrzD on OPENVPN_MGMT_SOCKET / | ||
| + | = purging old MTU rules from Iptables for modem N=17 | ||
| + | = del rotator timer if any | ||
| + | = updated collectd conf | ||
| + | = lock released on DEV wwan_modem17 | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.6. Get IP rotations log for a modem ==== | ||
| + | |||
| + | |||
| + | ++++ By Nickname or IMEI| | ||
| + | |||
| + | < | ||
| + | proxysmart.sh | ||
| + | proxysmart.sh | ||
| + | </ | ||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.2.7. Run speedtest | ||
| + | |||
| + | |||
| + | On a single modem: | ||
| + | |||
| + | Args: NICKNAME or IMEI. | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | # proxysmart.sh | ||
| + | </ | ||
| + | |||
| + | ++++ Response: | | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 3.3. Ports Actions ===== | ||
| + | |||
| + | ==== 3.3.1. Get Top hosts from a modem ==== | ||
| + | |||
| + | |||
| + | |||
| + | ++++ By PORTID | | ||
| + | |||
| + | < | ||
| + | proxysmart.sh top_hosts port92848428 | ||
| + | </ | ||
| + | Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.3.2. report bandwitdh | ||
| + | |||
| + | |||
| + | ++++ On a single port| | ||
| + | |||
| + | Args: portID | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | ++++ With arbitrary time interval.| | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh get_counters_port portID394848 ' | ||
| + | </ | ||
| + | |||
| + | Output: | ||
| + | |||
| + | < | ||
| + | |||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | ++++ On all ports at once | | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh bandwidth_report_all | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 3.3.3. reset bandwidth counter on a port ==== | ||
| + | |||
| + | |||
| + | ARGS: portID | ||
| + | ++++ JSON output| | ||
| + | |||
| + | < | ||
| + | # proxysmart.sh | ||
| + | |||
| + | {" | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | --------- | ||
| + | |||
| + | ====== 4. WEB API ====== | ||
| + | |||
| + | |||
| + | ===== 4.1. Basic info ===== | ||
| + | |||
| + | ==== 4.1.1. Web API endpoint | ||
| + | |||
| + | |||
| + | WEB API endpoint is the URL that Proxysmart WebApp available at. | ||
| + | |||
| + | It can be | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Also attach proper username: | ||
| + | |||
| + | Whenever below you are seeing '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.1.2. Workflow | ||
| + | |||
| + | |||
| + | **quick start:** | ||
| + | |||
| + | * Populate '' | ||
| + | * Populate '' | ||
| + | * for each added modem call 'Apply settings for a modem' WEB API call. It will configure each modem and its ports | ||
| + | |||
| + | ** Detailed start ** | ||
| + | |||
| + | Assume you have given a fresh Proxysmart server with multiple modems, by default each of the modems has generated a '' | ||
| + | |||
| + | IMEI is a unique identifier for a modem. | ||
| + | |||
| + | So, query full status with ''/ | ||
| + | |||
| + | * generate a unique modem nickname, e.g. " | ||
| + | * generate proxy ports for the modem, create proxy port objects and store them with ''/ | ||
| + | * apply the settings for the modem and for its ports with ''/ | ||
| + | |||
| + | (done) | ||
| + | |||
| + | **if you edited a modem** | ||
| + | |||
| + | call 'Apply settings for a modem' WEB API call for the modem. | ||
| + | |||
| + | ** if you edited a port ** | ||
| + | |||
| + | call 'Apply settings for a port' WEB API call for the port (faster) | ||
| + | |||
| + | or | ||
| + | |||
| + | call 'Apply settings for a modem' WEB API call for the modem. (slower, affects all modem' | ||
| + | |||
| + | |||
| + | ** if you deleted a port ** | ||
| + | |||
| + | call 'Purge port' WEB API call for the port (faster) | ||
| + | |||
| + | or | ||
| + | | ||
| + | call 'Apply settings for a modem' WEB API call for the modem. (slower, affects all modem' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 4.2. Modems Actions ===== | ||
| + | |||
| + | ==== 4.2.1. Store a modem object in Mongodb | ||
| + | |||
| + | |||
| + | This call just stores the object. Then you have to call "Apply Settings for a modem" | ||
| + | |||
| + | It deletes all modem objects with the same IMEI. | ||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | |||
| + | { | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | **Mandatory Fields** | ||
| + | |||
| + | * IMEI - 15 digits | ||
| + | * name - a Nickname of the modem | ||
| + | |||
| + | **Optional Fields** | ||
| + | |||
| + | * TARGET_MODE - the mode, one of ( 3g / 4g / auto / default ) the mode will work in. | ||
| + | * AUTO_IP_ROTATION - how often to rotate the IP on the modem (minutes) | ||
| + | * PHONE_NUMBER - arbitrary field for setting phone number just for your information ) e.g. " | ||
| + | * NOTES - arbitrary string for some info about the modem. | ||
| + | * WAN_APN - for LTE modules, APN to be set during bringing up the modem online, if correct APN can't be detected automatically. E.g. " | ||
| + | * mtu - set MTU fix for the modem, e.g. '' | ||
| + | * MUTE_ALERTS - 0 or 1, if mute alerts about this modem | ||
| + | |||
| + | Example 1, only mandatory fields. | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Example 2, mandatory + optional | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.2. Apply settings for a modem ==== | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.3. List all modems | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl ' | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.4. Single modem status | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | ( either by IMEI or Nickname ) | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.5. Reset (change) IP on a modem. | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | ( either by IMEI or Nickname ) | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.6. Reboot a modem ==== | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | ( either by IMEI or Nickname ) | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | or | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | ETA: ~ 1.5 minute | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.7. Get IP rotations log for a modem ==== | ||
| + | |||
| + | |||
| + | Request - by Nickname - by IMEI | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | curl localhost: | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.8. Reset a modem via USB ==== | ||
| + | |||
| + | |||
| + | Request either - by network interface e.g. modem77 - by Nickname - by IMEI | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | curl localhost: | ||
| + | curl localhost: | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.2.9. Run speedtest on a modem ==== | ||
| + | |||
| + | |||
| + | |||
| + | Request: by modem Nickname or IMEI : | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | curl localhost: | ||
| + | </ | ||
| + | |||
| + | Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 4.3. Ports Actions ===== | ||
| + | |||
| + | ==== 4.3.1. Store a port object in Mongodb | ||
| + | |||
| + | |||
| + | This call just stores the object. Then you have to call "Apply Settings for a port". | ||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | |||
| + | { | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | **Mandatory fields :** | ||
| + | |||
| + | * IMEI: IMEI of the modem to attach the port to, e.g. '' | ||
| + | * portID: unique port ID, for existing ports, use existing value. For new ports, construct it like ' | ||
| + | * portName: arbitrary port name, e.g. '' | ||
| + | * proxy_login: | ||
| + | * proxy_password: | ||
| + | * http_port: Http port, e.g. 8005 , Must be 8001-8999 | ||
| + | * socks_port: Socks5 port, e.g. 5005 , Must be 5001-5999 | ||
| + | |||
| + | **Optional fields :** | ||
| + | |||
| + | * DENIED_SITES_ENABLE - if 1 , then apply DENIED_SITES_LIST , see below | ||
| + | * DENIED_SITES_LIST - array of denied sites. Applied if DENIED_SITES_ENABLE is " | ||
| + | * bw_quota : bandwidth quota in MB | ||
| + | * QUOTA_TYPE can be daily/ | ||
| + | * IP_MODE: can be : | ||
| + | * 4 : ipv4 only | ||
| + | * 6 : ipv6 only | ||
| + | * 46 : prefer ipv4 but also allow ipv6 | ||
| + | * 64 : prefer ipv6 but also allow ipv4 | ||
| + | * null : leave default | ||
| + | * PROXY_VALID_BEFORE: | ||
| + | * CREATED_AT: datetime when port was created in format | ||
| + | * MAXCONN: max allowed connections | ||
| + | * CONNLIM: allow this number of new connections within 60 seconds | ||
| + | * bandlimin: download speed (megabits per second, mbps) | ||
| + | * bandlimout: upload speed (megabits per second, mbps) | ||
| + | * OS - destination TCP normalized OS fingerprint, | ||
| + | * (empty or absent field) No altering | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | * white_list - array of whitelisted customers' | ||
| + | |||
| + | |||
| + | |||
| + | Example 1, only mandatory fields. | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Example 2, mandatory + optional | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.2. Apply settings for a port ==== | ||
| + | |||
| + | |||
| + | Args: portID | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.3. List all active ports ==== | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.4. Get available TCP ports ==== | ||
| + | |||
| + | |||
| + | Available in Proxysmart v2.3+ | ||
| + | |||
| + | Get a list of Free TCP ports for farther usage in Http or Socks port creation. | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl ' | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | [ | ||
| + | 8004, | ||
| + | 8010, | ||
| + | ..SKIP.. | ||
| + | 5998, | ||
| + | 5999 | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.5. Purge a port ==== | ||
| + | |||
| + | |||
| + | * it deletes the port object from the DB | ||
| + | * it stops its proxies | ||
| + | |||
| + | Args: portID | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl http:// | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.6. Get Top hosts from a modem ==== | ||
| + | |||
| + | |||
| + | By PORTID | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.7. Read bandwidth stats from a port ==== | ||
| + | |||
| + | |||
| + | Args: porID | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **With arbitrary time interval:** | ||
| + | |||
| + | ARGS: portID, start time, end time. | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl -G http:// | ||
| + | </ | ||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { " | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.8. Read bandwidth stats from all ports ==== | ||
| + | |||
| + | |||
| + | Available only in Proxysmart **v2.3+** | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | |||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.9. Reset bandwidth stats for a port ==== | ||
| + | |||
| + | |||
| + | Request (by portID ): | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | Response: | ||
| + | |||
| + | < | ||
| + | {" | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.3.10. Download Openvpn profiles | ||
| + | |||
| + | For each port you can download an Openpn profile. | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | |||
| + | |||
| + | Where port2834hfhsf is '' | ||
| + | |||
| + | Note, this URL doesn' | ||
| + | |||
| + | The sole Ovpn profile file is not sufficient for connection - it will require a login and a password. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 4.4. Other ===== | ||
| + | |||
| + | ==== 4.4.1. Export backup | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.2. Getting current Backend Proxies (virtual modems) | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.3. Getting current LAN modems list ==== | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.4. Storing Backend Proxies (virtual modems) | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | ' | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ]' | ||
| + | </ | ||
| + | |||
| + | * id: a string like " | ||
| + | * creds: credentials in format '' | ||
| + | * ip_reset: (optional) Ip reset link | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.5. Storing LAN modems | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | ' | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ]' | ||
| + | </ | ||
| + | |||
| + | * dev: a string like " | ||
| + | * gw: the LAN modem' | ||
| + | |||
| + | ++++ Response:| | ||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.6. Report IP uniquness | ||
| + | |||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.7. Report Shop usage ==== | ||
| + | |||
| + | |||
| + | (only for Proxysmart v2.4+ with enabled Multishop feature) | ||
| + | |||
| + | Request options are: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | | ||
| + | Response fields are: | ||
| + | |||
| + | * bw_in, bw_out, bw_total -- Download, Upload, Download+Upload in Bytes. | ||
| + | * modems_hours : number of modems\*hours (like manhours but for modems) | ||
| + | * lease_periods: | ||
| + | |||
| + | |||
| + | Can be called by a Shop itself or by a Admin. | ||
| + | |||
| + | Request: | ||
| + | |||
| + | < | ||
| + | curl ' | ||
| + | </ | ||
| + | ++++Response: | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | "00:00 15.01.2026", | ||
| + | "13:35 15.01.2026" | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | ], | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | "00:00 15.01.2026", | ||
| + | "13:35 15.01.2026" | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | ] | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 4.4.8. Common Status | ||
| + | |||
| + | |||
| + | Request: | ||
| + | < | ||
| + | curl -u proxy:proxy localhost: | ||
| + | </ | ||
| + | |||
| + | ++++ Response:| | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | Notes on the response | ||
| + | |||
| + | * '' | ||
| + | * On Proxysmart v2.4, '' | ||
| + | * On Proxysmart v2.4, if '' | ||
| + | * '' | ||
| + | * The system won't allow creating proxies with ports outside of '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | --------- | ||
| + | |||
| + | |||
| + | ====== 7. License ====== | ||
| + | |||
| + | ==== 1. Demo license ==== | ||
| + | |||
| + | Installation is shipped with default **demo** license. | ||
| + | |||
| + | It allows you to run proxy on 1 modem. | ||
| + | |||
| + | In order to run more modems, buy a License. | ||
| + | |||
| + | ==== 2. Requesting a License ==== | ||
| + | |||
| + | === 2.1. Get the machine data === | ||
| + | |||
| + | **Method1. From the WebApp:** | ||
| + | |||
| + | * Open the proxysmart WebApp at '' | ||
| + | * Scroll down to the Machine Data text. | ||
| + | * Copy **MachineData** value to the Clipboard. | ||
| + | |||
| + | |||
| + | **Method2. From the CLI:** | ||
| + | |||
| + | * Open terminal | ||
| + | * Run **sudo proxysmart.sh license_status** | ||
| + | * Copy **machine_data** value | ||
| + | |||
| + | === 2.2. Contact Sales Team === | ||
| + | |||
| + | Send the copied value to [[https:// | ||
| + | |||
| + | ==== 2. License installation ==== | ||
| + | |||
| + | You will be given the **license** and **license signature**. Both are sequences of numbers and characters. Then submit both either via WebApp or CLI: | ||
| + | |||
| + | **submitting via WebApp** | ||
| + | |||
| + | Open the WebApp , '' | ||
| + | |||
| + | **submitting via CLI** | ||
| + | |||
| + | run commands | ||
| + | |||
| + | < | ||
| + | proxysmart.sh submit_license LICENSE | ||
| + | proxysmart.sh submit_license_signature LICENSE_SIGNATURE | ||
| + | </ | ||
| + | |||
| + | ==== 3. Restoring Demo license. ==== | ||
| + | |||
| + | If your paid license expired or broken, restore DEMO license | ||
| + | |||
| + | **Method1. From the WebApp:** | ||
| + | |||
| + | * Open the Proxysmart WebApp at '' | ||
| + | * click Restore Demo License. | ||
| + | |||
| + | **Method2. From the console:** | ||
| + | |||
| + | run '' | ||
| + | |||
| + | |||
| + | ==== 4. Upgrading license ==== | ||
| + | |||
| + | The idea: | ||
| + | |||
| + | * When adding modems, you only pay of the remaining time of the license | ||
| + | * When approaching license end, upgrade price is lower | ||
| + | |||
| + | The case: | ||
| + | |||
| + | * You bought a license for 50 modems / 1 year : USD 416 | ||
| + | * 8 months past, 4 months remained | ||
| + | * You want to add +20 modems | ||
| + | * New price of 70 modems / 1 year : USD 550.4 | ||
| + | * Time factor: 4 month / 12 month = .33 | ||
| + | * Difference between old price and new price : USD 134.400 | ||
| + | * The difference with applied Time factor: USD 134.400 * 0.3333333333 | ||
| + | * total to be paid: **USD 44.8** | ||
| + | |||
| + | |||
| + | Or simple formula: | ||
| + | |||
| + | '' | ||
| + | |||
| + | where: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | |||
| + | ---------- | ||
| + | |||
| + | |||
| + | ====== 8. FAQ and Troubleshooting. ====== | ||
| + | |||
| + | |||
| + | ===== 8.1. Basic info ===== | ||
| + | |||
| + | ==== 8.1.1. How to use proxies | ||
| + | |||
| + | * If proxy ports are forwarded via remote cloud VPS: then the proxies can be used from all over the Internet, by that VPS IP and proxy port numbers. | ||
| + | * From the same LAN where multimodem server is located: by the server’s LAN IP and proxy port numbers. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.2. Reconfigure all modems & proxies. | ||
| + | |||
| + | Method1. Click the button "Reset Complete" | ||
| + | |||
| + | Method2. In linux console, run: '' | ||
| + | |||
| + | Also it is done after reboot automatically by a Cron job. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.3. Where is WebApp | ||
| + | |||
| + | One of | ||
| + | |||
| + | * http: | ||
| + | * http: | ||
| + | * http: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.4. UDP support on Socks5 proxies, for QUIC / HTTP/ | ||
| + | |||
| + | On **Proxysmart 2.3+** | ||
| + | |||
| + | |||
| + | It is needed for proper work of HTTP/3.0 which uses UDP. | ||
| + | |||
| + | QUIC (UDP over socks5) will work either in your LAN or via a VPS. Steps are below. | ||
| + | |||
| + | === Steps on VPS : === | ||
| + | |||
| + | Make sure you finished the **Cloud VPS setup part**, with Ansible | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | nano vars.txt | ||
| + | </ | ||
| + | |||
| + | - set '' | ||
| + | |||
| + | Save the file (press '' | ||
| + | |||
| + | Run Ansible again | ||
| + | |||
| + | < | ||
| + | ansible-playbook ./ | ||
| + | </ | ||
| + | |||
| + | === Steps on Proxysmart server : === | ||
| + | |||
| + | set in '' | ||
| + | |||
| + | and reboot or reconfigure all proxies (run '' | ||
| + | |||
| + | Note: make sure the VPS has enough RAM, each proxy needs 50MB of RAM. Also add swap if needed. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.5. I want to add extra users on a modem ==== | ||
| + | |||
| + | In the WebApp, create more ports on the modem, each port means a dedicated proxy. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.6. How to set extra settings for a proxy port. ==== | ||
| + | |||
| + | Those are optional and are set in the WebApp | ||
| + | |||
| + | * WHITELIST - allowed customers IP’s who are not required to type in proxy password (IP-based auth). | ||
| + | * bandwidth (speed) limit. Values are in mbps (megabits per second). | ||
| + | * DENIED_SITES_ENABLE (on/off) and DENIED_SITES_LIST (list of blocked sites patterns). | ||
| + | * Bandwidth Quota (Megabytes) and Bandwidth Quota Type (daily/ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.7. How to change proxy credentials for a modem. How to rename a modem. | ||
| + | |||
| + | * click EDIT on a modem or a port, set new values | ||
| + | * click APPLY | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.8. How to change WebApp password | ||
| + | |||
| + | |||
| + | **Proxysmart versions: v2.3** | ||
| + | |||
| + | __WebApp method__ | ||
| + | |||
| + | In the '' | ||
| + | |||
| + | __Command line method.__ | ||
| + | |||
| + | < | ||
| + | sudo htpasswd -b / | ||
| + | </ | ||
| + | |||
| + | |||
| + | If you want to __change username__ as well, just delete the file and then assign new password | ||
| + | < | ||
| + | sudo rm / | ||
| + | sudo htpasswd -b -c / | ||
| + | </ | ||
| + | |||
| + | **Proxysmart versions: v2.4+** | ||
| + | |||
| + | __WebApp method__ | ||
| + | |||
| + | In the '' | ||
| + | |||
| + | __Command line method.__ | ||
| + | |||
| + | Set new random password | ||
| + | |||
| + | < | ||
| + | sudo proxysmart.sh reset_main_webapp_password | ||
| + | </ | ||
| + | |||
| + | or set your own password | ||
| + | |||
| + | < | ||
| + | sudo proxysmart.sh reset_main_webapp_password NewAweSomePassword999999 | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.9. Get monthly/ | ||
| + | |||
| + | Click '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.10. OS TCP fingerprint normalization. | ||
| + | |||
| + | Aligns the TCP/IP stack signature with the client' | ||
| + | |||
| + | **How to enable ?** | ||
| + | |||
| + | In the WebApp set the needed OS per each proxy port (click EDIT PORT). | ||
| + | |||
| + | **How to test ?** | ||
| + | |||
| + | Visit one of these websites (IP checkers) through a proxy. Find something like “OS TCP fingerprints”. | ||
| + | |||
| + | * http: | ||
| + | * https: | ||
| + | * https: | ||
| + | * https: | ||
| + | |||
| + | **Can I dump OS TCP fingerprint from a real device and use it?** | ||
| + | |||
| + | Yes, contact me. | ||
| + | |||
| + | **I enabled OS TCP normalization, | ||
| + | |||
| + | The reason may be that the operator passes all traffic through its internal proxy, or in other way modifies TCP signatures. Then local OS TCP modifications are overwritten. Is it bad? No! Because still traffic looks //natural// as it was coming from this operator network. | ||
| + | |||
| + | The carriers where OS TSP is not working (and it is 100% OK!): | ||
| + | |||
| + | * Three, UK | ||
| + | * AT& | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.1.11. PPP modems | ||
| + | |||
| + | These are very old 3g modems like **Huawei** E303, E173, E156; **ZTE** MF110, MF193, MF190. In order to make them work with proxysmart, | ||
| + | |||
| + | edit '' | ||
| + | |||
| + | **Make Quectel / Sierra Wireless LTE modules work in PPP mode** | ||
| + | |||
| + | Why? sometimes they fail working in QMI mode. So: | ||
| + | |||
| + | * edit '' | ||
| + | * place a file ''/ | ||
| + | |||
| + | < | ||
| + | # ignore QMI_WWAN endpoints on Quectel, to make it work in PPP mode. | ||
| + | SUBSYSTEM==" | ||
| + | # ignore QMI_WWAN endpoints on SierraWireless | ||
| + | SUBSYSTEM==" | ||
| + | </ | ||
| + | |||
| + | * re-plug modems or reboot Proxysmart server | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 8.2. Troubleshooting ===== | ||
| + | |||
| + | ==== 8.2.1. My proxy is offline and showing Red in the WebApp. | ||
| + | |||
| + | * Check if the modem has __good signal__. | ||
| + | * Check if the modem has __correct APN__ (set in its Web Dashboard). | ||
| + | * Check if its __SIM card is active__ (not blocked on Operator side) and is topped up. | ||
| + | * Check the modem on __another PC__ (e.g. your own Windows desktop) without WiFi and without Ethernet (to make sure Internet is provided by the dongle that being tested). | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.2. My proxies are slow. ==== | ||
| + | |||
| + | Assume a chain '' | ||
| + | |||
| + | * Download speed of the modem | ||
| + | * Upload speed from PC to VPS | ||
| + | * Download speed from VPS to the ProxyUser | ||
| + | |||
| + | |||
| + | ** Download speed of the modem. ** | ||
| + | |||
| + | It can be measured on the side of the PC e.g. in the Proxysmart WebApp by clicking the Speedtest button. | ||
| + | |||
| + | How to improve it? | ||
| + | |||
| + | * try other carriers | ||
| + | * try other modems | ||
| + | * try better location with better signal (i.e. not your Home) | ||
| + | |||
| + | ** Upload speed from PC to VPS. ** | ||
| + | |||
| + | Normally it correlates with quality of home internet (Fiber/ | ||
| + | |||
| + | With different types of port forwardings: | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | How to improve it? | ||
| + | |||
| + | * get a better home internet with better upload | ||
| + | * switch from WiFi to Ethernet | ||
| + | |||
| + | ** Download speed from VPS to the ProxyUser ** | ||
| + | |||
| + | It can be measured by downloading a file from VPS to the Proxyuser. | ||
| + | |||
| + | How to improve it? | ||
| + | |||
| + | * Change location of the VPS to a Cloud Hoster that has better reachability to the clients from all over the world | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.3. My proxies are slower than the same SIM card in a Phone. | ||
| + | |||
| + | Reason 1: Compare LTE category of the modem and the phone. Phone has higher LTE cat e.g. 12..20, | ||
| + | |||
| + | Reason 2: when the speed is really bad (about 1mbps) then it is Operator' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.4. IP's are rotated on their own ==== | ||
| + | |||
| + | If you don't rotate IP's and they are detected each time as a new IP - it is natural behaviour of mobile provider, when it routes its clients through random different gateways every 1 minute or so. T-Mobile USA is known of doing so. | ||
| + | |||
| + | __Solution__: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.5. Use custom Speedtest server. | ||
| + | |||
| + | It is useful when for some reason you want to run speed tests towards a custom server, instead of Ookla servers. | ||
| + | |||
| + | Update **WebApp-> | ||
| + | |||
| + | * '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.6. Speedtest for the clients | ||
| + | |||
| + | Why? In order to test quality of connnection between proxy/VPN users and the server, not involving mobile equipment. | ||
| + | |||
| + | How? | ||
| + | |||
| + | **For the proxy users: ** | ||
| + | |||
| + | Open the URL in the browser: The WebApp plus ''/ | ||
| + | |||
| + | ** For the VPN users:** | ||
| + | |||
| + | While connnected over the VPN, open the URL in the browser: '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.7. How to get current number of connections for a proxy port? ==== | ||
| + | |||
| + | In WebApp : click Bandwidth Report for the port. Scroll down to number of connections. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.2.8. Migrate a server (export/ | ||
| + | |||
| + | |||
| + | If you want to | ||
| + | |||
| + | * Migrate a server i.e. replace its hardware | ||
| + | * Keep all settings | ||
| + | * Keep all proxies configurations | ||
| + | |||
| + | Then on the old server, export its backup. | ||
| + | |||
| + | * Go to WebApp->'' | ||
| + | * Click Export backup, save the file. | ||
| + | |||
| + | On the new server, import the backup. | ||
| + | * Go to WebApp->'' | ||
| + | * Choose the file, Click Import backup. | ||
| + | * Reboot or run Reset Complete. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 8.3. IP Reset ===== | ||
| + | |||
| + | ==== 8.3.1. “Dirty” IP reset. | ||
| + | |||
| + | It may be needed when you need even faster IP reset. In this case, post-checks are not made, so it is not sure if the modem really went online after IP reset. It can be activated by '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.2. IP rotation links. | ||
| + | |||
| + | These links | ||
| + | |||
| + | * Can be safely passed to your customers. They don’t reveal real dongle parameters like IMEI or Nickname. | ||
| + | * They don’t require HTTP basic authentication | ||
| + | * They depend on the proxy password. So, when you change the proxy password - old IP rotation links, associated with that proxy, will stop working. | ||
| + | |||
| + | A link can be copied from the WebApp-> | ||
| + | |||
| + | If you realized you gave a link to a customer, and want to revoke it, just set new password for the proxy. | ||
| + | |||
| + | If you want to invalidate all links of all modems, set a new secret: set '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.3. Minimum time between IP rotations | ||
| + | |||
| + | If you want to avoid too frequent IP rotations triggered by your users – in **WebApp-> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.4. Prevent non-unique IP’s after IP rotation. | ||
| + | |||
| + | For example to prevent using IP’s that were in use 1 time (or more) within last 24h: set in **WebApp-> | ||
| + | |||
| + | < | ||
| + | RETRY_IP_ROTATIONS | ||
| + | NON_UNIQUE_IP_OCCURS 1 # how many times an IP must occur to be considered NonUnique. E.g. 1 | ||
| + | NON_UNIQUE_IP_PERIOD 24hour | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.5. Reset (change) IP on a modem. | ||
| + | |||
| + | The options are below. | ||
| + | |||
| + | * **From Web App** | ||
| + | |||
| + | Click '' | ||
| + | |||
| + | * **From command line.** | ||
| + | |||
| + | Run: '' | ||
| + | |||
| + | Where '' | ||
| + | |||
| + | * **From Web API.** | ||
| + | |||
| + | check WEB API section of this manual. | ||
| + | |||
| + | **How to rotate a modem periodically? | ||
| + | |||
| + | * WebApp method | ||
| + | |||
| + | Update modem’s settings in the WebApp and click APPLY. | ||
| + | |||
| + | |||
| + | * Cron method | ||
| + | |||
| + | Install a Cron job. Edit a file '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | so that a modem with the Nickname dongle3 is rotated every 10 min. | ||
| + | |||
| + | Repeat for each modem you want to rotate periodically. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.6. How to re-rotate IP when IP doesn’t change? | ||
| + | |||
| + | In **WebApp-> | ||
| + | |||
| + | So when Old_IP == New_IP, then IP rotation is retried. Up to '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.3.7. How to lock network mode per modem ==== | ||
| + | |||
| + | Set '' | ||
| + | |||
| + | * auto | ||
| + | * 3g | ||
| + | * 4g | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 8.4. Access Control ===== | ||
| + | |||
| + | ==== 8.4.1. How to block domains | ||
| + | |||
| + | * Individual (per proxy) block lists : WebApp -> **Edit Port**, check '' | ||
| + | * Global block list - for all proxies: **WebApp-> | ||
| + | |||
| + | |||
| + | How blocklists are processed: | ||
| + | |||
| + | * if you block '' | ||
| + | * if you block '' | ||
| + | * IP's are blocked also e.g. 23.23.23.23 | ||
| + | |||
| + | |||
| + | **Note for Socks5 proxies** | ||
| + | |||
| + | When a domain blacklist is imposed, then by default users still can access blocked sites by their IP’s. | ||
| + | |||
| + | In order to prevent it, set '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.4.2. How to allow only whitelisted domains. | ||
| + | |||
| + | The feaure it not ready. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.4.3. How to enable client IP whitelisting? | ||
| + | |||
| + | ** On Proxysmart 2.3+ it is enabled by default ** | ||
| + | |||
| + | By default Proxysmart can't see original clients IP's. So we have to enable it: | ||
| + | |||
| + | Steps: | ||
| + | |||
| + | **1. On Proxysmart server** | ||
| + | |||
| + | * set '' | ||
| + | * run '' | ||
| + | |||
| + | **2. On the VPS** | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | nano vars.txt | ||
| + | </ | ||
| + | |||
| + | set | ||
| + | |||
| + | '' | ||
| + | |||
| + | Save the file (press '' | ||
| + | |||
| + | Run Ansible again | ||
| + | |||
| + | < | ||
| + | ansible-playbook ./ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.4.4. How to make my proxes Open (i.e. not requiring authentication ) ==== | ||
| + | |||
| + | Set '' | ||
| + | |||
| + | Note, when proxy ports are forrwarded via a VPS, the proxies are available to any internet user. Use it with caution. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 8.5. Mobile VPN ===== | ||
| + | |||
| + | ==== 8.5.1. Mobile VPN ==== | ||
| + | |||
| + | Together with building proxies, it is possible to build Mobile VPN. | ||
| + | |||
| + | It is enabled with WebApp-> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.5.2. Mobile VPN, how to connect | ||
| + | |||
| + | So download the VPN profiles and connect using any VPN client software. | ||
| + | |||
| + | * Download and install software: | ||
| + | |||
| + | Windows: https:// | ||
| + | |||
| + | MacOS: https:// | ||
| + | |||
| + | Android: https:// | ||
| + | |||
| + | IOS: https:// | ||
| + | |||
| + | * Import downloaded OpenVPN profile, tap Connect. | ||
| + | * use Login and Password from the corresponding proxy. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.5.3. Mobile VPN logs ==== | ||
| + | |||
| + | Logs of openvpn sessions - ''/ | ||
| + | |||
| + | < | ||
| + | ' | ||
| + | </ | ||
| + | |||
| + | * type - session_start / session_stop / auth_reject | ||
| + | * local_port - local port of Openvpn server | ||
| + | * proto - tcp-server or udp | ||
| + | * duration - when type is session_stop, | ||
| + | * Real_IP, Real_PORT - of a client | ||
| + | * auth_reject_why - when type is session_stop, | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.5.4. Mobile VPN, Switch Openvpn protocol | ||
| + | |||
| + | * You can switch to TCP or UDP. | ||
| + | * In WebApp-> | ||
| + | * On Clients, either download profiles again, or change protocol in client settings. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 8.6. Advanced settings ===== | ||
| + | |||
| + | ==== 8.6.1. Is IPV6 supported? | ||
| + | |||
| + | Yes but it’s off by default. | ||
| + | |||
| + | On modems , edit APN and set APN type for both IPv4 and IPv6 , e.g. Ip4Ip6 or Ip4+ip6, there is a dropdown list for that. | ||
| + | |||
| + | On Proxysmart box: Update '' | ||
| + | |||
| + | and reset configuration '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.2. How to host multiple Proxysmart servers | ||
| + | |||
| + | ** When ports forwarded through a VPS ** | ||
| + | |||
| + | Assume 2 Proxysmart servers: | ||
| + | |||
| + | * Server1 | ||
| + | * Server2 | ||
| + | |||
| + | On each, make sure the proxies are configured on these ports: | ||
| + | |||
| + | * Server1 : http 8001..8099, socks5 5001..5099 | ||
| + | * Server2 : http 8101..8199, socks5 5101..5199 | ||
| + | |||
| + | Make settings in the WebApp-> | ||
| + | |||
| + | For Server1: | ||
| + | |||
| + | * VPS - IP of the VPS | ||
| + | * PROXY_PORTS_FORWARDER_ENABLE on | ||
| + | * SSH_REMOTE_PORT: | ||
| + | * WEB_REMOTE_PORT: | ||
| + | * OPENVPN_SERVER_PORT: | ||
| + | * XRAY_REMOTE_PORT: | ||
| + | |||
| + | For Server2: | ||
| + | |||
| + | * VPS - IP of the VPS | ||
| + | * PROXY_PORTS_FORWARDER_ENABLE on | ||
| + | * SSH_REMOTE_PORT: | ||
| + | * WEB_REMOTE_PORT: | ||
| + | * OPENVPN_SERVER_PORT: | ||
| + | * XRAY_REMOTE_PORT: | ||
| + | |||
| + | On the VPS install SSH public keys of each Proxysmart server: | ||
| + | |||
| + | < | ||
| + | cd ~/ | ||
| + | nano vars.txt | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ssh_pub_keys: | ||
| + | - ssh-rsa AAAAB3NzaC1.. | ||
| + | - ssh-rsa AAAA2847371.. | ||
| + | </ | ||
| + | |||
| + | Save the file by pressing '' | ||
| + | |||
| + | Run Ansible: | ||
| + | |||
| + | < | ||
| + | ansible-playbook proxysmart-vps.yml | ||
| + | </ | ||
| + | |||
| + | ** When ports forwarded through a static office IP ** | ||
| + | |||
| + | Assume 2 Proxysmart servers: | ||
| + | |||
| + | * Server1, LAN_IP1 | ||
| + | * Server2, LAN_IP2 | ||
| + | |||
| + | On each, make sure the proxies are configured on these ports: | ||
| + | |||
| + | * Server1 : http 8001..8099, socks5 5001..5099 | ||
| + | * Server2 : http 8101..8199, socks5 5101..5199 | ||
| + | |||
| + | Then on the router, make forwardings. | ||
| + | |||
| + | For Server1: | ||
| + | |||
| + | * WebApp: | ||
| + | * Proxies: (from external IP) TCP | ||
| + | * Openvpn: (from external IP) TCP+UDP | ||
| + | * Xray: (from external IP) TCP | ||
| + | |||
| + | For Server2: | ||
| + | |||
| + | * WebApp: | ||
| + | * Proxies: (from external IP) TCP | ||
| + | * Openvpn: (from external IP) TCP+UDP | ||
| + | * Xray: (from external IP) TCP | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.3. How to forward proxy ports via each modem individually? | ||
| + | |||
| + | Why is it needed? When home __base internet is unstable__ or its upload speed <15mbps. | ||
| + | |||
| + | A VPS is needed in order to expose the ports this way ( see **VPS integration** chapter ). | ||
| + | |||
| + | ** How it works ** | ||
| + | |||
| + | Each proxy forwards its port through its modem, not using base internet. | ||
| + | |||
| + | ** PRO's :** | ||
| + | |||
| + | * Home base internet speed & stability is not important | ||
| + | | ||
| + | ** CON's :** | ||
| + | |||
| + | * each modem is working in bidirectional mode | ||
| + | * proxy speed is limited to 4G Upload speed which is slow | ||
| + | |||
| + | **Steps: on Proxysmart server** | ||
| + | |||
| + | * set '' | ||
| + | * run '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.4. Auto-rebooting modems. | ||
| + | |||
| + | Sometimes only a reboot can fix a modem. In order to enable, set '' | ||
| + | |||
| + | * if a situation occurs , “reboot score” of a modem is increased by the value, according to the situation: | ||
| + | |||
| + | < | ||
| + | SCORE_IP_ROTATION_FAIL=10 | ||
| + | SCORE_IP_NOT_DETECTED=2 | ||
| + | SCORE_IP_RECONNECT_FAIL=10 | ||
| + | SCORE_WWAN_DATA_FAIL=10 | ||
| + | SCORE_WEBAPP_FAIL=20 | ||
| + | </ | ||
| + | * when the modem’s reboot score reaches '' | ||
| + | * special case, do USB reset instead of a reboot, when '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.5. Socks5 UDP behind a LAN router | ||
| + | |||
| + | Normally, when using socks5 software like 3proxy or gost, behind a LAN router, Socks5 proxies won't have UDP. In order to add UDP to them, perform these steps. | ||
| + | |||
| + | === If your LAN router has **Assymetrical** NAT type, or you **don' | ||
| + | |||
| + | |||
| + | On Proxysmart server: | ||
| + | |||
| + | * Set LAN_SOCKS_SOFTWARE | ||
| + | * Set REWRITE_UDP_ASSOCIATE_IP_TO to external (public) IP of the LAN router | ||
| + | * Set REWRITE_PORT_UDP_ASSOCIATE to On. | ||
| + | * Set CONE_NAT_FIX to Off. | ||
| + | * Set unique UDP port range e.g. 20000-20100 using MIN_PORT_UDP_ASSOCIATE and MAX_PORT_UDP_ASSOCIATE . This UDP port range is unique per server. | ||
| + | | ||
| + | On the router: | ||
| + | |||
| + | * forward UDP port range e.g. 20000..21000 to the LAN IP of the Socks5 proxy server | ||
| + | |||
| + | |||
| + | === If your LAN router | ||
| + | |||
| + | On Proxysmart server: | ||
| + | |||
| + | * Set LAN_SOCKS_SOFTWARE | ||
| + | * Set REWRITE_UDP_ASSOCIATE_IP_TO to external (public) IP of the LAN router | ||
| + | * Set CONE_NAT_FIX to On | ||
| + | |||
| + | On the router: | ||
| + | |||
| + | * Nothing. | ||
| + | |||
| + | === Finally === | ||
| + | |||
| + | Reboot or run '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.6. Custom DNS server for the proxies | ||
| + | |||
| + | |||
| + | Edit '' | ||
| + | |||
| + | Click the button "Reset Complete" | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.7. How to access WebApp and proxies by a Hostname? | ||
| + | |||
| + | |||
| + | |||
| + | Just buy a domain for $5 and assign a Hostname ( e.g. `srv1.company.com` to the IP of your LAN router or of the VPS. | ||
| + | |||
| + | And make up these **GlobalSettings** : | ||
| + | |||
| + | |||
| + | * REWRITE_WEBAPP_URL : On | ||
| + | * REWRITE_WEBAPP_TO : http:// | ||
| + | * REWRITE_HOST_IN_PROXY_CREDS : On | ||
| + | * REWRITE_HOST_IN_PROXY_CREDS_TO : srv1.company.com | ||
| + | * OPENVPN_SERVER_HOST : srv1.company.com | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.8. Performance tuning | ||
| + | |||
| + | When >50 modems are added, play with '' | ||
| + | |||
| + | * when generating status of the modems | ||
| + | * when generating configuration of newly added modems | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.9. How many modems can I run on a single computer? | ||
| + | |||
| + | Hi , technically it depends on how powerful this PC is, and how intensively proxies are used. | ||
| + | |||
| + | * Raspberry PI - 4 proxies (roughly) | ||
| + | * a miniPC (Intel NUC or similar) - up to 10 | ||
| + | * a Laptop like Core i5 - up to 30. | ||
| + | |||
| + | Also it depends on what Plan you buy. | ||
| + | |||
| + | Also it depends on USB configuration, | ||
| + | |||
| + | * disable USB3.0 in BIOS | ||
| + | * use USB2.0 hubs | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.10. How to set monthly traffic quota per modem? | ||
| + | |||
| + | In the WebApp, set monthly traffic quota. Click EDIT & APPLY. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.11. How to set TTL and why? ==== | ||
| + | |||
| + | In some cases custom TTL must be set in order to have Cell Operator think we are not using the modem in hotspot tethering mode. I.e. we don’t share its data. By default Linux OS has ttl = 64. To change Cell Operator perception of the situation, we want to set it +1 i.e. 65. | ||
| + | |||
| + | Edit '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.12. How to set MTU and why? ==== | ||
| + | |||
| + | In some cases different MTU values connect with different types of ISP’s. You may want to change it. | ||
| + | |||
| + | Mtu can be only lowered. E.g. if you have MTU 1390, you can set 1340. Not opposite. | ||
| + | |||
| + | - WebApp -> GlobalSettings -> enable '' | ||
| + | - Set MTU in the WebApp for each modem. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.13. Exclude some modems | ||
| + | |||
| + | In '' | ||
| + | |||
| + | * by Device name, populate this array '' | ||
| + | * by IMEI, populate this array '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.14. Nagios integration. | ||
| + | |||
| + | There is a plugin embedded, run it as root, | ||
| + | |||
| + | '' | ||
| + | |||
| + | or | ||
| + | |||
| + | '' | ||
| + | |||
| + | so it will return OK/ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.15. How can I access the web interface admin panel of each modem? | ||
| + | |||
| + | ** Proxysmart 2.3+ : ** | ||
| + | |||
| + | * Open WebApp. Locate the modem. Click blue " | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.16. What if a modem connected via 3G or 2G, and I want 4G? ==== | ||
| + | |||
| + | Lock network mode to 4G and rotate its IP. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.17. Where are proxy logs. ==== | ||
| + | |||
| + | On the Proxysmart server in a folder '' | ||
| + | |||
| + | Logs are rotated daily and 90 copies are saved, details are in '' | ||
| + | |||
| + | Logs of IP rotations are in a folder '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.18. No logs policy | ||
| + | |||
| + | If you want to run NoLogs policy, create | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.19. Install logging of all requests in single place ==== | ||
| + | |||
| + | Why? Get single log of all requests from Proxies (HTTP/ | ||
| + | |||
| + | **Installation On Proxysmart server** | ||
| + | |||
| + | In the '' | ||
| + | |||
| + | run '' | ||
| + | |||
| + | Watch the log ''/ | ||
| + | |||
| + | It is rotated and 365 daily copies are stored on disk. | ||
| + | |||
| + | Then it is bound to a button " | ||
| + | |||
| + | It can also be installed on a VPS if the VPS is working as proxies frontend. | ||
| + | |||
| + | |||
| + | **Installation On VPS** | ||
| + | |||
| + | not supported yet. | ||
| + | |||
| + | **Log format** | ||
| + | |||
| + | File: ''/ | ||
| + | |||
| + | < | ||
| + | _ws.col.Time | ||
| + | # | ||
| + | | ||
| + | socks.remote_name | ||
| + | # 7 | ||
| + | | ||
| + | | ||
| + | # | ||
| + | |||
| + | | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.20. Alerts to Telegram | ||
| + | |||
| + | In Telegram start a chat with a bot https:// | ||
| + | |||
| + | In Proxysmart WebApp-> | ||
| + | |||
| + | In Telegram start a chat with Proxysmart bot https:// | ||
| + | |||
| + | After that the bot will send you alerts. | ||
| + | |||
| + | |||
| + | **Sending alerts to a group ** (proxysmart v2.4+) | ||
| + | |||
| + | * Get numeric ID of the Telegram group, e.g. '' | ||
| + | * In Proxysmart WebApp-> | ||
| + | * In Proxysmart WebApp-> | ||
| + | * Add https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 8.6.21. Vless with Xtls Reality (Xray) integration. | ||
| + | |||
| + | ** What is it - Xray? ** | ||
| + | |||
| + | * Xray is a family of protocols. We will use its VLESS protocol + Xtls Reality extension. More read https:// | ||
| + | * Supports UDP-in-TCP tunneling, so if a Proxysmart server is behind a LAN router, the clients will be able to send UDP traffic. | ||
| + | * It bypasses Socks5 protocol blocks (in some countries) due to Xtls Reality extension that makes all traffic look like TLS traffic to a neutral domain like '' | ||
| + | |||
| + | |||
| + | ** How to activate Xray? ** | ||
| + | |||
| + | * **Extended** license is needed | ||
| + | * Set '' | ||
| + | * Set '' | ||
| + | * Reboot or reconfigure all proxies (run '' | ||
| + | * A button " | ||
| + | |||
| + | **How to use Xray on client' | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ------------ | ||
| + | |||
| + | |||
| + | |||
| + | ====== 9. Bugs and Limitations ====== | ||
| + | |||
| + | ==== LTE modules ==== | ||
| + | |||
| + | * IPV6 is not supported | ||
| + | |||
| + | ==== Android phones ==== | ||
| + | |||
| + | * No TCP OS normalization with Proxysmart APK app. | ||
| + | * No Sock5 UDP with Proxysmart APK app. | ||
| + | |||
| + | ==== VPN users ==== | ||
| + | |||
| + | * IPV6 is not supported | ||
| + | |||
| + | ==== Port ranges ==== | ||
| + | |||
| + | * Proxy ports range: HTTP 8001..8999, SOCKS5 5001..5999 | ||
| + | |||
| + | ==== OS TCP Fingerprint Normalization ==== | ||
| + | |||
| + | * Not supported on Ipv6 | ||
| + | |||
| + | ==== No spam ==== | ||
| + | |||
| + | TCP port 25 is blocked, we don't send spam. If you want to send normal emails then you can use ports: 587, 465. Port 25 is for server2server communication only. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
v2/readme.txt · Last modified: 2026/06/12 22:14 by 127.0.0.1