Indy HTTP Proxy IPv6 Bindings and Outbound IPVersion
Add explicit local IPv4/IPv6 bindings before activation; choose any required next-hop family on OutboundClient before it connects.
ProxyServer.Bindings.Clear;
with ProxyServer.Bindings.Add do
begin
IPVersion := Id_IPv4;
IP := '127.0.0.1';
Port := 8080;
end;
with ProxyServer.Bindings.Add do
begin
IPVersion := Id_IPv6;
IP := '::1';
Port := 8080;
end;Apply this to the inactive existing TIdHTTPProxyServer, then use its normal activation. The loopback addresses intentionally accept only local clients; remote use requires reachable interface addresses and access controls. Verify the resulting access boundary before exposing that listener.
The incoming bindings and outward socket do different jobs:
| Socket | Family selection |
|---|---|
| Client reaches proxy | Each explicit Bindings entry |
| Proxy reaches next hop | The context's OutboundClient.IPVersion |
An IPv6 listener therefore does not force every destination to IPv6. If the workload requires an explicit next-hop family, set it in OnHTTPBeforeCommand before that client connects, matching the intended destination path.
Separate listener failure from next-hop failure when one side works. Relying on automatic bindings can otherwise introduce platform-dependent assumptions into the comparison.