Proxy Code Examples: Java, Rust, Python, PHP and n8n

A public source snapshot with versioned proxy examples, setup instructions and scoped local test evidence for five client families.

Written by the Mexela Editorial Team. Technical guides are reviewed by the Mexela Technical Team under the Mexela Editorial Policy.

PROXY OPTIONS

Choose a proxy endpoint for this integration

After verifying the configured client, compare private proxy options and pricing. Check the endpoint protocol, authentication and destination compatibility for the runtime that will make your requests.

Download or clone this public Mexela source snapshot to configure and diagnose proxy requests in Java, Rust, Python, PHP or n8n. Each folder records exact tested versions, setup instructions, source provenance and the limits of its local checks.

Reviewed: October 13, 2026. The current v2 snapshot contains 38 source and documentation files: all 26 original files remain byte-exact, with a public test harness, pinned setup and regression controls added. Mexela hosts this read-only repository directly as one standalone source commit. The original v1 snapshot and its historical observations remain available below.

Run the public proxy test suite

Download the v2 source and tests ZIP or open the v2 public Git repository. This package contains source files and test instructions; install the documented runtimes and pinned dependencies separately.

git clone --config core.autocrlf=false https://mexela.com/blog/wp-content/uploads/2026/10/mexela-proxy-examples-20261013-v2/ mexela-proxy-examples-v2
cd mexela-proxy-examples-v2
git rev-parse HEAD

Expected v2 commit: b440bbf4bdb2dc641a5f6c60101619ff6673dce1. ZIP SHA-256: 544e0ba21d39dd839a2fa7d9fd4db071389265b789197544f353fc7329584976. Verify tests-manifest.json for this 38-file snapshot; the unchanged manifest.json records the original 26-file snapshot.

The 13 October clean-copy run passed 79 native checks: HTTPX sync 8, HTTPX async 8, aiohttp 8, PHP cURL 8, JDK HttpClient 9, OkHttp 8, n8n 8 and Rust 22. These are new reproducible local checks, separate from the historical client counts below. All calls used owned loopback fixtures with destination TLS checks retained.

Read TESTING.md first. Keep the runtime configuration, dependencies and output report outside the source snapshot, then run all configured clients with one command:

node tests/run.cjs --config /absolute/path/runtime.json --report /absolute/path/result.json

Missing runtimes, dependencies, compilation or assertions fail the command. An explicitly selected subset is labelled as a selected-client result and does not become an all-client pass. The setup helper verifies exact Java and n8n artifact pins:

node tests/setup.cjs java /absolute/path/java-libraries
node tests/setup.cjs n8n /absolute/path/n8n-archives

The suite uses fresh local credentials and disposable certificates without changing global trust stores. Nine harness regression controls additionally check optimization guards, source-contained output refusal and graceful interruption cleanup. Deliberate route, authentication and TLS mutations produced failures and nonzero exits. Forced termination or power loss still requires inspecting the owned temporary directories described in TESTING.md.

n8n checks execute the native workflow engine with fixture lifecycle hooks; editor import, persisted credentials, migrations, scheduling and queue mode remain outside this qualification. Rust checks ran natively inside Ubuntu WSL. These local tests do not establish a live Mexela exit, location, DNS privacy, speed, uptime or search ranking.

Original example snapshot: v1

Download the complete source ZIP or open the public Git repository. The ZIP contains the same tracked files as the commit below; it omits private runtime packages, fixture keys and execution logs.

git clone https://mexela.com/blog/wp-content/uploads/2026/10/mexela-proxy-examples-20261013-v1/ mexela-proxy-examples
cd mexela-proxy-examples
git rev-parse HEAD

Expected commit: b2e2582552aa806a9f35a7f43581e5ee27c3a13f. ZIP SHA-256: 884ef19313ee34f3747d2b15f74191047ed5ac765eb0070544bf269cf6251165. Read the root README and the folder instructions before choosing an approved destination and supplying proxy credentials through your existing secret manager or process environment.

Java: JDK HttpClient and OkHttp

The java/ folder contains ProxyRequest.java, build.ps1 and hash-pinned dependency metadata. Recorded runtime: Windows Temurin 21.0.11 and OkHttp 4.12.0, with 27 owned loopback checks. Follow the Java proxy guide for the HTTP-versus-HTTPS CONNECT authentication distinction.

Rust: reqwest blocking client

The rust/ folder includes Cargo.toml, Cargo.lock and the diagnostic and displayed article programs. Recorded runtime: Rust 1.99.0, reqwest 0.13.5 and Ubuntu 24.04 in WSL2, with 23 checks. Build with cargo build --locked; the Rust guide explains features, explicit routing and strict TLS. These checks do not qualify the async, native Windows or WebAssembly paths.

Python: HTTPX and aiohttp

The python/ folder contains hash-pinned dependencies and a convenience CLI around the owned client helper. Recorded versions are Python 3.12.14, HTTPX 0.28.1 and aiohttp 3.14.5. Seven helper checks belong to the original ten-check suite; the new convenience runner passed twelve additional owned HTTP, direct and CONNECT/TLS cases. Read the HTTPX guide or the aiohttp guide for the appropriate client API. The folder README gives the isolated installation and CLI commands.

PHP: native cURL

The php/ folder supplies request.php and setup instructions. Recorded runtime: Windows PHP 8.4.22, libcurl 8.20.0 and OpenSSL 3.0.20, with 15 loopback checks. The native PHP cURL guide explains how to separate a transport error, CONNECT status and destination response.

n8n: HTTP Request reference workflow

The n8n/ folder contains a local reference workflow and a sanitized summary of 17 native engine cases on Node 24.19.0 with HTTP Request node 4.5. These cases executed the native workflow engine; they do not certify the editor import, stored credentials, scheduling or queue mode. The n8n proxy guide explains how to replace local fixture settings through the credential handling available in your deployment.

Interpret the recorded checks

These were owned loopback tests, with version-specific failures retained. A received HTTP status and a successful transport are different results. Corroborate the chosen route using your own permitted logs. The tests do not establish a public proxy exit, country, DNS privacy, speed, anonymity or uptime. Private harnesses are excluded, so the repository supplies reproducible build and usage instructions rather than claiming every historic test can be rerun from this source snapshot alone.

Consult LICENSE-NOTICE.md before reuse; public availability does not supply a new blanket license for the examples or their third-party dependencies. Use the developer setup hub to choose a problem-based path and the compatibility matrix to compare observed client behavior.