Support for hostname-based proxy server configuration in KumoMTA's egress sources #402
+437
−61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for hostname-based proxy server configuration in KumoMTA's egress sources. Previously,
ha_proxy_server
andsocks5_proxy_server
only accepted SocketAddr format (e.g., "127.0.0.1:8080"). Now they support both SocketAddr and hostname formats, with hostnames being resolved to IP addresses at runtime when connections are established.Code Changes
crates/kumod/src/egress_source.rs:
SocketAddrOrHostname
enum to support both SocketAddr and hostname formatsEgressSource
struct to useSocketAddrOrHostname
for proxy server fieldsresolve_proxy_protocol
method to handle hostname resolution asynchronouslyDocumentation updates
docs/reference/kumo/make_egress_source/ha_proxy_server.md
: Updated to document hostname support with inline version indicatordocs/reference/kumo/make_egress_source/socks5_proxy_server.md
: Updated to document hostname support with inline version indicatordocs/userguide/operation/proxy.md
: Added examples showing both SocketAddr and hostname usage