Hostnames are stable but ports often drift between environments. forceRemotePortAction keeps the client side URL exactly as it was and redirects only the TCP destination, which is usually the safest way to point traffic at a staging build or a side by side deployment.
Use forceRemotePortAction when you want to keep the original URL but redirect Fluxzy to a different port on the upstream. The Host header and SNI stay untouched, only the TCP destination port changes.
Typical situations include:
The action runs on the onAuthorityReceived scope, before the TCP connection is opened. Combine with spoofDnsAction if you also need to change the host IP, not just the port.
Lets your client keep using https://api.internal.example.com while Fluxzy actually connects to port 8443 on the same host.
rules:
- filter:
typeKind: HostFilter
pattern: api.internal.example.com
actions:
- typeKind: ForceRemotePortAction
port: 8443
Combined with spoofDnsAction this is a powerful way to redirect a hostname to a completely different server.
rules:
- filter:
typeKind: HostFilter
pattern: payments.example.com
actions:
- typeKind: SpoofDnsAction
remoteHostIp: 10.0.0.42
- typeKind: ForceRemotePortAction
port: 9443
Useful when only part of an API lives on a different port during a migration.
rules:
- filter:
typeKind: FilterCollection
operation: And
children:
- typeKind: HostFilter
pattern: legacy.example.com
- typeKind: PathFilter
pattern: /v2/
actions:
- typeKind: ForceRemotePortAction
port: 8444
Ignores the default port used by the current authority and use the provided port instead.
Evaluation scope defines the timing where this filter will be applied.
onAuthorityReceived This scope denotes the moment fluxzy is aware the destination authority. In a regular proxy connection, it will occur the moment where fluxzy parsed the CONNECT request.
forceRemotePortAction
The following table describes the customizable properties available for this action:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| port | int32 | The port to use for the remote connection | 0 |
This filter has no specific usage example
View definition of ForceRemotePortAction for .NET integration.
This action has no related action
No. The original Host header and URL stay intact, so the client behaves as if it was talking to the default port.
Fluxzy still uses the original SNI from the request authority. The upstream certificate must be valid for that hostname or the handshake will fail (unless you use skipRemoteCertificateValidationAction).
Yes. The action only changes the TCP port. Whether the connection is TLS or not depends on the original request scheme.
forwardAction makes Fluxzy act as a reverse proxy and rewrites the host, scheme, and protocol. forceRemotePortAction only changes the port while keeping everything else as the client sent it.