How URNetwork Proxy Mode Handles Multiple SOCKS5 Proxies in InternetIncome

When URNetwork proxy mode is enabled in InternetIncome, the script aggregates all SOCKS5 entries from proxies.txt, converts them to URNetwork's native format, and injects them into the provider container so traffic routes through every configured proxy.

The engageub/internetincome repository automates income generation across multiple proxy networks. When UR_NETWORK_PROXY_MODE is set to true in properties.conf, the internetIncome.sh orchestration script activates a specialized workflow that transforms a list of SOCKS5 proxies into a unified configuration consumed by the URNetwork provider container.

Enabling URNetwork Proxy Mode in InternetIncome

Configuration in properties.conf

To activate multiple SOCKS5 proxy handling, set the boolean flag in the main configuration file:


# properties.conf

UR_NETWORK_PROXY_MODE=true

When this value is true, the script enters the proxy aggregation branch at lines 53‑100 of internetIncome.sh. If set to false, the script launches a plain URNetwork container without proxy injection, or uses the dindurnetwork helper for Docker‑in‑Docker environments.

How the Script Aggregates Multiple SOCKS5 Proxies

Parsing proxies.txt

The script scans proxies.txt line‑by‑line and filters for SOCKS5 schemes. According to the implementation in internetIncome.sh (lines 53‑78), the logic:

  • Reads each line from proxies.txt
  • Selects entries beginning with socks5://
  • Strips the scheme prefix
  • Parses optional authentication credentials when present in user:pass@host:port format

Generating ur_proxies.txt

After parsing, the script writes a temporary file named ur_proxies.txt in the working directory. The format follows URNetwork's native specification:


<address>:<port>
<address>:<port>:<username>:<password>

Each proxy occupies one line. The script handles both authenticated and non‑authenticated SOCKS5 endpoints, ensuring the final list contains every valid proxy from the source file.

Injecting Proxies into the URNetwork Container

The Docker Provider Command

Before launching the main service, internetIncome.sh executes a one‑shot Docker command (lines 89‑95) to populate URNetwork's internal database:

docker run --rm \
  -v "$PWD/urnetwork-data/data/.urnetwork":/root/.urnetwork \
  -v "$PWD/ur_proxies.txt":/root/ur_proxy.txt \
  bringyour/community-provider:latest \
  proxy add --proxy_file=/root/ur_proxy.txt

This command mounts the generated ur_proxies.txt as /root/ur_proxy.txt inside the ephemeral container and invokes the proxy add sub‑command. The bringyour/community-provider image processes the file and writes the merged configuration to the persistent data volume.

Creating the Internal Proxy File

The provider container converts the temporary list into URNetwork's internal proxy file stored in the mounted data directory ($urnetwork_data_folder). This file contains the aggregated SOCKS5 endpoints in the format expected by the URNetwork client runtime, ensuring the provider can route traffic through every configured proxy simultaneously.

Starting the URNetwork Service with Multiple Proxies

Finally, the script launches the persistent URNetwork container (lines 96‑100):

docker run -d --name urnetwork$UNIQUE_ID$i \
  -v "$urnetwork_data_folder":/root/.urnetwork \
  --restart=always \
  bringyour/community-provider:latest

Because the data volume already contains the populated proxy file, the container starts with full knowledge of all SOCKS5 endpoints. The container name incorporates a unique identifier and index ($UNIQUE_ID$i), allowing multiple isolated instances if needed.

Summary

  • URNetwork proxy mode activates when UR_NETWORK_PROXY_MODE=true in properties.conf, triggering specialized handling in internetIncome.sh.
  • The script parses proxies.txt, filters for SOCKS5 schemes, and writes them to a temporary ur_proxies.txt file in URNetwork's native format.
  • A one‑shot Docker command using bringyour/community-provider:latest processes the proxy list and generates the internal proxy configuration file.
  • The main URNetwork container mounts this pre‑populated data directory, enabling multiple SOCKS5 proxies to be used simultaneously for traffic routing.

Frequently Asked Questions

How do I format SOCKS5 proxies in proxies.txt for URNetwork mode?

List each proxy on a separate line using standard URL notation. For authenticated proxies, include credentials before the host: socks5://username:password@host:port. For unauthenticated proxies, use socks5://host:port. The script automatically strips the socks5:// scheme and converts the entries to URNetwork's internal format.

Can I mix authenticated and non-authenticated SOCKS5 proxies in the same list?

Yes. The parsing logic in internetIncome.sh handles both formats simultaneously. It detects the presence of credentials in the URL and writes them to ur_proxies.txt using the four‑field format (host:port:user:pass) when present, or the two‑field format (host:port) when absent. URNetwork processes this mixed list without requiring separate configurations.

What happens if UR_NETWORK_PROXY_MODE is set to false?

When the flag is disabled, the script bypasses the proxy aggregation logic entirely. It either starts a standard URNetwork container without SOCKS5 injection or, in Docker‑in‑Docker environments, launches the dindurnetwork helper container instead. The provider will connect directly to the URNetwork infrastructure without routing through intermediate SOCKS5 proxies.

Where is the final proxy configuration stored after processing?

The aggregated proxy list is stored in two locations during the lifecycle: first as a temporary text file ur_proxies.txt in the script's working directory, then as an internal binary or structured file named proxy inside the URNetwork data directory (mounted at urnetwork-data/data/.urnetwork). The latter persists across container restarts and is read by the running provider service.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →