Skip to content

Support transparent proxying (TPROXY) and iptables redirection #8

Description

@itsVentie

Description

Currently, deploying pqc-proxy in legacy environments requires manually modifying client application configurations or environment variables to point to the local listener (e.g., localhost:3000). In complex enterprise infrastructures, some legacy applications use hardcoded destination IPs or dynamically allocated ports, making manual reconfiguration impossible.

To make pqc-proxy a truly seamless sidecar/ambassador solution, we need to support transparent proxying.

Proposed Solution

  1. Add a new configuration mode or flag (e.g., -transparent).
  2. Utilize Linux iptables / nftables rules to intercept and redirect outbound TCP traffic to pqc-proxy automatically.
  3. Use SO_ORIGINAL_DST via golang.org/x/sys/unix to retrieve the original destination IP and port from the intercepted connection, allowing the proxy to establish the PQC tunnel transparently.

Benefits

  • Allows dropping pqc-proxy into existing infrastructures without altering a single line of code or configuration in legacy apps.
  • Simplifies multi-service container mesh deployments (e.g., Docker/Kubernetes sidecars).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions