Skip to content

Add IPv4/IPv6 address selection support - #1097

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-shrufg
Oct 25, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-shrufg

Conversation

@oferchen

@oferchen oferchen commented Oct 25, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • extend the CLI to expose --ipv4/--ipv6 flags, thread the parsed address mode through module listing and fallback invocation, and update tests to cover the new arguments
  • teach the core client to filter resolved daemon addresses by the requested family, plumb the address mode through ModuleListOptions/RemoteFallbackArgs, and add unit coverage for the resolver

Testing

  • cargo test

@oferchen
oferchen merged commit cc7ca31 into master Oct 25, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync-shrufg branch October 25, 2025 01:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/core/src/client.rs
Comment on lines 7217 to 7219

let stream = match load_daemon_proxy()? {
Some(proxy) => connect_via_proxy(addr, &proxy, timeout)?,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor address mode when connecting via proxy

The new AddressMode flag is only forwarded to connect_direct, so it never influences connections that go through RSYNC_PROXY. When --ipv4 or --ipv6 is supplied, users expect the client to avoid addresses of the opposite family, regardless of whether a proxy is in use. In the proxy branch we still call TcpStream::connect((proxy.host.as_str(), proxy.port)), which lets the OS pick the family and can still attempt IPv6 despite --ipv4 (or vice‑versa), leading to hangs or connection failures on single‑stack networks. The proxy path should resolve and filter proxy addresses in the same way as connect_direct, or otherwise enforce the selected family.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant