How to Test an IPv6 Proxy
An IPv6 proxy test can refer to the connection to the gateway, the proxy’s connection to the destination or both. Test those paths separately so you can explain what each result confirms.
An IPv6 proxy gateway and an IPv6 exit are two different checks
An IPv6 gateway accepts the connection from your client over IPv6. An IPv6 exit is the public IPv6 address that a target sees when the proxy reaches it. These are separate connections. A laptop can reach a gateway over IPv4 while the proxy reaches the destination over IPv6. A client on IPv6 can likewise connect to a proxy that uses IPv4 on the target side. When someone describes a service as an IPv6 proxy, ask which part of the route the product supports and which part your application needs.
Keep the two addresses in your results. cURL’s remote_ip reports the peer of the most recently made connection. On an HTTPS request through one HTTP proxy, cURL sees the proxy gateway as its peer. The destination sees the exit address of the connection it receives. If your application needs a particular exit family, check the address returned by the destination. If it needs a gateway reachable from an IPv6-only runner, check the socket to the proxy as well. cURL write-out fields.
Put an IPv6 proxy address in brackets
For a proxy URL containing a literal IPv6 address, put the address in square brackets and the port after the bracket. The quotes keep the URL intact in the shell. If you have a proxy hostname, use the normal hostname format with the port. The IP below is from the range reserved for documentation. Replace it with the address of the proxy you are allowed to test. URI host syntax in RFC 3986 and IPv6 documentation addresses in RFC 3849.
proxy='http://[2001:db8:20::10]:8080'
lookup='https://testmyproxies.com/api/my-ip'
curl --disable --noproxy '' --proxy "$proxy" \
--fail --silent --show-error --connect-timeout 5 --max-time 15 \
--write-out '\ngateway=%{remote_ip} CONNECT=%{http_connect} status=%{http_code}\n' \
"$lookup"
Read the gateway line to verify the first hop and the JSON ip value to see the address observed by the lookup. A 200 in the CONNECT field on this HTTP proxy route means the proxy accepted the tunnel. Check the target status and response body separately. The lookup is useful for observing the exit on that visit. Use the IPv6-only fixture below whenever you need to test reachability without an IPv4 destination option. For credentials, follow the provider’s settings and supply them as proxy credentials. Test proxy authentication with cURL.
Test against an IPv6-only destination you control
Set up a dedicated hostname on a service you operate. Publish an AAAA record for it and leave the A record absent. Configure the HTTPS listener on IPv6 with a certificate for that hostname and expose a simple /ip path that returns the source IP from the incoming connection. Terminate the test directly at the listener where you record the peer address. If you place a CDN or reverse proxy in front, use its trusted edge records to verify the address it saw. Arbitrary forwarding headers can distort the result. AAAA records in RFC 3596.
fixture='https://ip6-probe.example/ip'
dig +short A ip6-probe.example
dig +short AAAA ip6-probe.example
curl --disable --ipv6 --noproxy '*' \
--fail --silent --show-error --connect-timeout 5 --max-time 15 \
--write-out '\ndirect_peer=%{remote_ip} status=%{http_code}\n' \
"$fixture"
curl --disable --noproxy '' --proxy "$proxy" \
--fail --silent --show-error --connect-timeout 5 --max-time 15 \
--write-out '\ngateway=%{remote_ip} CONNECT=%{http_connect} status=%{http_code}\n' \
"$fixture"
Replace the example hostname in all three commands and keep the proxy variable from the earlier example or assign your own. The AAAA lookup should show the configured IPv6 address. If you see an alias, confirm that its final name has AAAA records and no A record. A direct run requires the client to have a usable IPv6 path. If your runner lacks one, validate the fixture from a separate IPv6-capable machine. A proxy reachable over IPv4 can still reach the fixture. Verify that your listener logged an IPv6 peer at the time of the proxied test. That is the exit the fixture observed on the successful request.
What does curl -6 prove when a proxy is involved?
--ipv6, also written as -6, limits hostname resolution done by cURL to IPv6 addresses. On a direct request, that setting applies to the destination name. With an HTTP proxy hostname, it applies when cURL resolves the gateway it connects to. For an HTTPS target, the proxy receives the target hostname in the CONNECT request and makes its own routing decision. Adding -6 to the client command over that route does not set the upstream family at the proxy. The controlled target and its logs provide that evidence. cURL IPv6 option and HTTP proxy tunneling in cURL.
With socks5://, cURL normally resolves the destination locally and sends the chosen address to the SOCKS5 proxy. With socks5h://, it sends the name for the proxy to resolve. Check the scheme your application uses when investigating a result that differs between tools. SOCKS hostname resolution in cURL.
Troubleshoot failed gateway and exit checks
If cURL cannot reach the gateway, verify the address, brackets, port and your client’s IPv6 route to that listener. If you reach the gateway but get an HTTP 407, check the proxy’s authentication requirements. If the gateway accepts the tunnel and the fixture remains unreachable, confirm the destination’s certificate, AAAA record and listener. Compare what the client saw with the target logs and ask the provider whether the gateway can reach that IPv6 destination. Include the gateway family, CONNECT status and test time in your report. Diagnose HTTP 407 Proxy Authentication Required.
On a dual-stack destination, a successful lookup can legitimately return IPv4 on one visit and IPv6 on another depending on the path or provider policy. Use the same IPv6-only fixture when comparing proxies for a job that specifically requires that family. To compare exits in a browser, repeat an IP check inside the same browser profile that will make the requests. Verify the browser’s public IP.