How to Configure Multiple Residential Proxies for Different Apps in InternetIncome
InternetIncome supports running multiple earning apps simultaneously through separate residential proxies by mapping each proxy in proxies.txt to a dedicated SOCKS5 tunnel container that app containers share via --network=container: isolation.
The engageub/internetincome repository provides a Docker-based orchestration system that allows you to configure multiple residential proxies so each earning application instance operates through its own isolated network tunnel. This prevents cross-traffic contamination and lets you assign specific geographic or provider-specific proxies to individual apps like Honeygain, EarnApp, EarnFM, or URnetwork.
Prerequisites for Residential Proxy Configuration
Before assigning proxies to individual apps, you must prepare the proxy list and enable the feature in the configuration file.
Proxy List Format
Create a file named proxies.txt in the repository root directory. Each line must contain a single SOCKS5 proxy URL:
socks5://user1:pass1@proxy1.residential.com:1080
socks5://user2:pass2@proxy2.residential.com:1080
socks5://proxy3.residential.com:1080
The script strips the socks5:// prefix during parsing. Authentication is optional, but if provided, the format must be username:password@host:port.
Enabling Proxy Support in properties.conf
Set the proxy flag in your properties.conf file:
USE_PROXIES=true
When this value is true, the orchestration script reads proxies.txt and attempts to assign one proxy per app instance.
How the Proxy Assignment Works
The proxy-to-app mapping relies on index alignment between your proxy list and the container count.
Validation and Index Matching
The helper script updateProxies.sh (lines 59‑70) validates that the number of proxies matches the number of app accounts or container instances. If the counts differ, the script aborts to prevent partial proxy coverage.
Main Orchestration Loop
In internetIncome.sh (lines 1213‑1218), the main loop iterates over proxies.txt and invokes the container startup function with the proxy URL as an argument:
i=1
while read -r line; do
start_containers "$i" "$line"
i=$((i + 1))
done < "$proxies_file"
Each iteration increments the index $i, which corresponds to a specific app instance.
SOCKS5 Tunnel Creation
Inside start_containers, the script parses the proxy URL (lines 223‑246) to extract host, port, username, and password. It then launches a dedicated SOCKS5 tunnel container named tun$UNIQUE_ID$i:
sudo docker run --name tun$UNIQUE_ID$i \
-e SOCKS5_ADDR="$SOCKS_ADDR" \
-e SOCKS5_PORT="$SOCKS_PORT" \
-e SOCKS5_USERNAME="$SOCKS_USER" \
-e SOCKS5_PASSWORD="$SOCKS_PASS" \
...
All subsequent earning-app containers for index $i are started with --network=container:tun$UNIQUE_ID$i, forcing them to route through that specific tunnel.
Configuring Individual Apps with Dedicated Proxies
Different apps consume the proxy configuration in slightly different ways, but all rely on the same proxies.txt source.
Standard Container Apps (Honeygain, EarnApp, etc.)
For most apps, the proxy assignment is transparent. The orchestration script handles the --network=container: attachment automatically when USE_PROXIES=true. You do not need additional configuration inside the app containers themselves.
EarnFM Fleetshare Proxy Configuration
EarnFM Fleetshare requires a JSON configuration file. The script generates this automatically from proxies.txt (lines 672‑695):
if [ -f "$proxies_file" ]; then
SOCKS_PROXIES=()
while IFS= read -r line; do
[[ -z "$line" ]] && continue
if [[ "$line" == socks5://* ]]; then
proxy="${line#socks5://}"
SOCKS_PROXIES+=("\"$proxy\"")
fi
done < "$proxies_file"
cat > "$earn_fm_config_file" <<-EOF
{
"apiKey": "$EARN_FM_API",
"devices": {
"subnets": [],
"socksProxies": [$(IFS=,; echo "${SOCKS_PROXIES[*]}")]
},
"debug": false
}
EOF
fi
Ensure your proxies.txt contains valid SOCKS5 URLs, and the Fleetshare container will receive the generated JSON at runtime.
URnetwork Proxy Mode
URnetwork uses a custom proxy list format. The script converts proxies.txt into the required colon-separated format (lines 954‑986):
while IFS= read -r line; do
[[ -z "$line" ]] && continue
if [[ "$line" == socks5://* ]]; then
SOCKS_NO_SCHEME="${line#socks5://}"
if [[ "$SOCKS_NO_SCHEME" == *@* ]]; then
SOCKS_CREDS="${SOCKS_NO_SCHEME%@*}"
SOCKS_HOSTPORT="${SOCKS_NO_SCHEME#*@}"
SOCKS_USER="${SOCKS_CREDS%%:*}"
SOCKS_PASS="${SOCKS_CREDS#*:}"
else
SOCKS_HOSTPORT="$SOCKS_NO_SCHEME"
fi
SOCKS_ADDR="${SOCKS_HOSTPORT%%:*}"
SOCKS_PORT="${SOCKS_HOSTPORT##*:}"
[[ $SOCKS_USER && $SOCKS_PASS ]] && \
echo "$SOCKS_ADDR:$SOCKS_PORT:$SOCKS_USER:$SOCKS_PASS" >> "$ur_proxies_file" || \
echo "$SOCKS_ADDR:$SOCKS_PORT" >> "$ur_proxies_file"
fi
done < "$proxies_file"
The resulting file is mounted into the URnetwork container, allowing it to route through the specified residential proxies.
Validating and Updating Proxies
The updateProxies.sh script provides lifecycle management for your proxy list. It sanitizes input, validates that proxy count matches container count, and can trigger container restarts when the proxy list changes. Run this script after modifying proxies.txt to apply changes without full redeployment.
Summary
- Enable proxies by setting
USE_PROXIES=trueinproperties.conf. - List your proxies in
proxies.txtusing standard SOCKS5 URLs (socks5://user:pass@host:port). - Validation occurs in
updateProxies.shto ensure proxy count matches app instance count. - Tunnel creation happens in
internetIncome.shviastart_containers, which launches a SOCKS5 tunnel container for each proxy. - Network isolation is achieved by attaching app containers to the tunnel container’s network stack (
--network=container:tun...). - Specialized apps like EarnFM Fleetshare and URnetwork consume the same
proxies.txtbut receive converted formats (JSON or colon-separated lists).
Frequently Asked Questions
What happens if the number of proxies does not match the number of app instances?
The script aborts execution. According to the validation logic in updateProxies.sh (lines 59‑70), the proxy count must exactly equal the number of container instances or accounts configured. This prevents scenarios where some apps run without proxy coverage while others do.
Can I use authenticated and non-authenticated proxies in the same list?
Yes. The parsing logic in internetIncome.sh (lines 223‑246) detects the presence of credentials by checking for the @ symbol. If credentials are present, it extracts username:password; if absent, it sets empty values and launches the tunnel container accordingly.
Do I need to manually configure each app container to use the proxy?
No. The orchestration is automatic. When USE_PROXIES=true, the start_containers function launches a tunnel container first, then attaches all subsequent app containers for that index using --network=container:tun$UNIQUE_ID$i. The apps route through the proxy transparently without internal configuration.
How do I update proxies without stopping all containers?
Use the updateProxies.sh helper script. It sanitizes the new proxies.txt, validates counts, and can selectively restart containers to pick up the new proxy assignments. This avoids the need for a full teardown and redeployment of the entire stack.
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 →