http-proxy

n8n community node to route HTTP requests through a serverless egress proxy (Google Cloud Run / Cloudflare Access)

Package Information

Released: this month
Downloads: 0 weeklyΒ /Β 0 monthly
Latest Version: 0.1.0
Author: iamprompt

Documentation

n8n-nodes-http-proxy

npm version
License: MIT

An n8n Community Node to route HTTP requests through a serverless egress proxy (such as serverless-egress-proxy deployed on Google Cloud Run or behind Cloudflare Access).

It gives you the familiar feel and power of n8n's native HTTP Request node, but eliminates redundant proxy configuration across all your workflows.


🌟 Why This Node?

When using Google Cloud Run or reverse-proxy egress gateways:

  • No CONNECT Support: Cloud Run terminates TLS at the Google Front End (GFE) and does not support HTTP CONNECT tunneling.
  • Redundant Configuration: Manually configuring n8n's built-in HTTP Request node requires pasting the gateway URL, injecting X-Target-URL, managing X-Gateway-Token, and configuring Cloudflare Zero Trust headers on every single workflow node.

With @iamprompt/n8n-nodes-http-proxy:

  • Configure Once in Credentials: Store Gateway URL, Bearer Token, Cloudflare Access Service Tokens, and Custom Headers in reusable n8n credentials.
  • Target Destination Directly: Enter your target URL (e.g. https://api.github.com/user or https://api.openai.com/v1/...) directly in the node.
  • Automatic Dual Authentication: The node authenticates with the proxy gateway (and Cloudflare Access) without colliding with upstream Authorization headers meant for the destination API.
  • Built-in Credential Health Check: Verifies connectivity with your proxy's /readyz endpoint directly in the n8n credential modal.

πŸ“¦ Installation

In n8n (Community Nodes)

  1. In n8n, go to Settings > Community Nodes.
  2. Select Install.
  3. Enter @iamprompt/n8n-nodes-http-proxy.
  4. Accept the risk warning and click Install.

Self-Hosted / Docker

Add it to your n8n Dockerfile or volume:

npm install @iamprompt/n8n-nodes-http-proxy

πŸ”‘ Credentials Setup: Serverless Egress Proxy API

In n8n, navigate to Credentials > New and search for Serverless Egress Proxy API:

Field Description Example
Gateway URL Base URL of your Cloud Run gateway or custom domain https://egress-gateway-xyz.a.run.app
Gateway Token Secret Bearer token configured in PROXY_AUTH_TOKEN (secret masked)
Gateway Auth Header Header strategy to authenticate with the proxy X-Gateway-Token (default) or Proxy-Authorization
Cloudflare Access Toggle for gateways protected by Cloudflare Zero Trust true / false
CF-Access-Client-Id Cloudflare Access Service Token Client ID xxxxxxxx.access
CF-Access-Client-Secret Cloudflare Access Service Token Client Secret (secret masked)
Custom Gateway Headers Optional edge headers (e.g. Origin, CDN verification) Name / Value pairs

Click Save or Test to verify connection to /readyz.


πŸš€ Node Usage: HTTP Request (Proxy)

Add the HTTP Request (Proxy) node to any workflow:

1. Main Parameters

  • Method: GET, POST, PUT, DELETE, PATCH, HEAD.
  • URL: The target destination API URL (e.g. https://api.openai.com/v1/chat/completions).
  • Authentication: Destination API authentication (None, Bearer Token, Basic Auth, or Custom Header).

2. Request Parameters

  • Send Query Parameters: Key-value pairs or JSON string.
  • Send Headers: Add any custom headers destined for the target API.
  • Send Body: Supported for POST, PUT, PATCH, DELETE:
    • JSON (Key-value pairs or raw JSON)
    • Form URL Encoded
    • Raw (e.g. text/plain, application/xml)

3. Advanced Options

  • Response:
    • Response Format: Autodetect, JSON, or Text.
    • Full Response: Return statusCode, statusMessage, headers, and body.
    • Never Error: Prevents node failure on 4xx/5xx status codes.
  • Redirects: Configure Follow Redirects and Max Redirects.
  • Timeout: Request timeout in milliseconds (default: 300,000 ms / 5 minutes).
  • Ignore SSL Issues: Allow self-signed or invalid upstream SSL certificates.
  • Path Prefix Mode: Route destination as URL path (/https://...) instead of X-Target-URL header.

πŸ› οΈ Local Development

# Clone the repository
git clone https://github.com/iamprompt/n8n-nodes-http-proxy.git
cd n8n-nodes-http-proxy

# Install dependencies
npm install

# Build the project
npm run build

# Run linter
npm run lint

# Link locally to your n8n installation
npm link
cd ~/.n8n
npm link @iamprompt/n8n-nodes-http-proxy

# Start n8n
n8n start

πŸ“„ License

MIT Β© iamprompt

Discussion