Skip to content

Conversation

pankajrathi95
Copy link
Contributor

Summary

This PR adds support for hostname-based proxy server configuration in KumoMTA's egress sources. Previously, ha_proxy_server and socks5_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:

  • Added SocketAddrOrHostname enum to support both SocketAddr and hostname formats
  • Updated EgressSource struct to use SocketAddrOrHostname for proxy server fields
  • Enhanced resolve_proxy_protocol method to handle hostname resolution asynchronously
  • Added comprehensive test coverage for the new functionality

Documentation updates

  • docs/reference/kumo/make_egress_source/ha_proxy_server.md: Updated to document hostname support with inline version indicator
  • docs/reference/kumo/make_egress_source/socks5_proxy_server.md: Updated to document hostname support with inline version indicator
  • docs/userguide/operation/proxy.md: Added examples showing both SocketAddr and hostname usage

@pankajrathi95 pankajrathi95 marked this pull request as draft July 26, 2025 06:53
@pankajrathi95 pankajrathi95 marked this pull request as ready for review July 26, 2025 06:55
@pankajrathi95 pankajrathi95 marked this pull request as draft July 26, 2025 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant