final class ResolvedDestination

Constants

private DEFAULT_HTTP_PORT

private DEFAULT_HTTPS_PORT

Properties

non-empty-list<string> $addresses

Methods

direct(UriInterface $uri, string $address, string ...$fallbackAddresses)

Create a directly pinned destination.

proxy(UriInterface $uri, UriInterface $proxy, string $address, string ...$fallbackAddresses)

Create a destination routed through a pinned proxy.

bool
usesHttpsProxy()

Determine whether the route uses a TLS-protected proxy connection.

array
curlOptions()

Return the exact cURL connection-pinning options.

array
curlResolveOptions()

Pin the real hostname while preserving ordinary proxy routing.

Details

at line 64
static ResolvedDestination direct(UriInterface $uri, string $address, string ...$fallbackAddresses)

Create a directly pinned destination.

Parameters

UriInterface $uri
string $address
string ...$fallbackAddresses

Return Value

ResolvedDestination

at line 90
static ResolvedDestination proxy(UriInterface $uri, UriInterface $proxy, string $address, string ...$fallbackAddresses)

Create a destination routed through a pinned proxy.

A proxy without a port uses its scheme's default port (80 or 443), as any HTTP URI does, rather than cURL's 1080: PSR-7 URIs drop an explicit default port, so ":80" and no port cannot be told apart. A literal proxy requires one approved address equal to its host.

Parameters

UriInterface $uri
UriInterface $proxy
string $address
string ...$fallbackAddresses

Return Value

ResolvedDestination

at line 114
bool usesHttpsProxy()

Determine whether the route uses a TLS-protected proxy connection.

Return Value

bool

at line 127
array curlOptions()

Return the exact cURL connection-pinning options.

Direct substitutions must not enter the handler's shared DNS cache. Proxy substitutions retain the hostname required for proxy TLS.

Return Value

array

at line 160
array curlResolveOptions()

Pin the real hostname while preserving ordinary proxy routing.

Origin pins require a request-owned handler so they cannot enter another request's shared DNS cache.

Return Value

array