How EarnFM Fleetshare Mode Differs from Standard Proxy Mode in InternetIncome
EarnFM Fleetshare mode aggregates multiple SOCKS5 proxies into a single container via a JSON configuration file, while standard mode runs an isolated client that operates independently of any proxy files.
InternetIncome supports two distinct EarnFM deployment strategies controlled by the USE_EARN_FM_FLEETSHARE flag in properties.conf. Understanding the architectural differences between standard client mode and Fleetshare mode is essential for optimizing proxy utilization, reducing container overhead, and maximizing bandwidth monetization efficiency.
Core Architectural Differences
The fundamental distinction lies in how each mode handles network traffic and proxy resources.
Standard EarnFM Client Mode
In standard mode, the container runs as a standalone client using the earnfm/earnfm-client:latest image. It connects directly to EarnFM's servers using only the API token provided via environment variables. This mode does not read, mount, or utilize any external proxies.txt file. The container operates in isolation, making it suitable for single-device deployments where proxy aggregation is unnecessary.
EarnFM Fleetshare Mode
Fleetshare mode transforms the container into a proxy aggregation hub using the earnfm/fleetshare:latest image. Instead of running independently, this mode consumes the entire proxies.txt file, parses every socks5:// entry, and compiles them into a JSON configuration array. The script then mounts this generated configuration into the container at /app/config.json, allowing the Fleetshare client to rotate through and monetize all supplied SOCKS5 proxies sequentially.
Configuration and Activation Logic
The activation logic resides in internetIncome.sh, where conditional statements determine which branch executes based on the USE_EARN_FM_FLEETSHARE value set in properties.conf (lines 50-53).
For standard mode, the script evaluates:
if [[ $EARN_FM_API && "$USE_EARN_FM_FLEETSHARE" != true ]]; then
This branch triggers when the flag is false or unset (lines 48-50).
For Fleetshare mode, the condition requires explicit activation:
if [[ $EARN_FM_API && "$USE_EARN_FM_FLEETSHARE" = true ]]; then
This branch executes only when the flag is explicitly set to true (lines 67-69).
Docker Image and Container Strategy
Each mode pulls and runs a distinct Docker image optimized for its specific architecture.
Standard Mode Image:
earnfm/earnfm-client:latest- Lightweight client designed for single-token, direct-connection scenarios
- No volume mounts required for proxy configuration
Fleetshare Mode Image:
earnfm/fleetshare:latest- Designed to ingest external proxy configurations via file mount
- Requires read access to the generated
earnfm_config.json
Proxy Handling Mechanisms
The proxy handling logic represents the most significant operational difference between the two modes.
In standard mode, the script passes only the API token as an environment variable:
docker run -d \
--name earnfm$UNIQUE_ID$i \
--restart=always $NETWORK_TUN $LOGS_PARAM $DNS_VOLUME \
-e EARNFM_TOKEN=$EARN_FM_API \
earnfm/earnfm-client:latest
The container ignores any proxies.txt file present in the working directory.
In Fleetshare mode, the script performs a multi-step proxy aggregation process (lines 73-95):
- Validation: Checks for
proxies.txtexistence - Parsing: Iterates through each line, extracting entries starting with
socks5:// - Transformation: Strips the
socks5://prefix from each entry - Compilation: Builds a JSON structure with
apiKeyand adevices.socksProxiesarray - Persistence: Writes the configuration to
earnfm_config.json
The resulting configuration file looks like:
{
"apiKey": "your-token-here",
"devices": {
"subnets": [],
"socksProxies": [
"user:pass@1.2.3.4:1080",
"5.6.7.8:1080"
]
},
"debug": false
}
The container then mounts this file:
docker run -d \
--name earnfm$UNIQUE_ID$i \
--restart=always $LOGS_PARAM $DNS_VOLUME \
--mount type=bind,source=$PWD/earnfm_config.json,target=/app/config.json \
earnfm/fleetshare:latest
Practical Implementation Examples
Standard Mode Setup
Configure properties.conf:
USE_EARN_FM_FLEETSHARE=false
EARN_FM_API='your-api-token-here'
Execute the launcher:
./internetIncome.sh
The script deploys isolated earnfm/earnfm-client containers that connect directly to EarnFM servers.
Fleetshare Mode Setup
Configure properties.conf:
USE_EARN_FM_FLEETSHARE=true
EARN_FM_API='your-api-token-here'
Prepare proxies.txt with SOCKS5 endpoints:
socks5://user:pass@192.168.1.100:1080
socks5://203.0.113.45:1080
socks5://198.51.100.22:1080
Execute the launcher:
./internetIncome.sh
The script generates earnfm_config.json containing all three proxies and launches a single earnfm/fleetshare container that monetizes the entire proxy fleet.
Summary
- Standard EarnFM mode runs
earnfm/earnfm-client:latestas an isolated container using only an API token, ignoring any proxy files. - Fleetshare mode runs
earnfm/fleetshare:latestand aggregates all SOCKS5 proxies fromproxies.txtinto a JSON configuration file mounted at/app/config.json. - Activation is controlled by the
USE_EARN_FM_FLEETSHAREboolean inproperties.conf(lines 50-53), evaluated ininternetIncome.shat lines 48-50 (standard) and 67-69 (Fleetshare). - Fleetshare reduces container overhead by consolidating multiple proxy connections into a single EarnFM instance, while standard mode provides direct, unproxied connectivity.
Frequently Asked Questions
What configuration flag enables EarnFM Fleetshare mode?
The USE_EARN_FM_FLEETSHARE flag in properties.conf controls the mode. Set it to true to enable Fleetshare mode, which triggers the proxy aggregation logic in internetIncome.sh (lines 67-69). When set to false or unset, the script defaults to standard client mode (lines 48-50).
Does standard EarnFM mode use the proxies.txt file?
No. Standard mode completely ignores proxies.txt. The earnfm/earnfm-client:latest container receives only the EARNFM_TOKEN environment variable and establishes direct connections to EarnFM servers without routing through external SOCKS5 proxies.
Which Docker image should I use for proxy aggregation?
Use earnfm/fleetshare:latest when you need to aggregate multiple SOCKS5 proxies. This image expects a mounted JSON configuration file at /app/config.json containing a socksProxies array. The standard image (earnfm/earnfm-client:latest) does not support proxy aggregation and runs as a standalone client.
Can I run both EarnFM modes simultaneously?
Technically, you could run separate instances of InternetIncome with different properties.conf configurations, but a single execution of internetIncome.sh processes only one mode per run based on the USE_EARN_FM_FLEETSHARE value. To run both simultaneously, you would need to maintain separate working directories or modify the script logic to avoid container name collisions (earnfm$UNIQUE_ID$i).
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →