Skip to content

Conversation

@xjasonlyu
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the dialing layer from a mutable DefaultDialer with atomic fields into a socket-option registration model, and updates engine/DNS integration to use the new dialer entrypoints.

Changes:

  • Replace DefaultDialer’s per-field configuration (interface/mark) with a SocketOption interface and registration API.
  • Implement WithBindToInterface / WithRoutingMark per-OS using syscall.RawConn control hooks.
  • Update engine and DNS resolver to use dialer.RegisterSockOpt(...) and dialer.DialContext.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
engine/engine.go Switches interface binding + fwmark configuration to socket-option registration.
dns/resolver.go Points the Go DNS resolver dialer at the new dialer.DialContext wrapper.
dialer/dialer.go Introduces option registration, storage, and application via net.Dialer / net.ListenConfig control hooks.
dialer/sockopt.go Adds SocketOption/SocketOptionFunc, an unsupported sentinel, and a shared RawConn.Control helper.
dialer/sockopt_linux.go Adds Linux implementations for bind-to-device and SO_MARK via socket options.
dialer/sockopt_darwin.go Adds Darwin bind-to-interface socket option; routing mark is unsupported.
dialer/sockopt_windows.go Adds Windows bind-to-interface socket option; routing mark is unsupported.
dialer/sockopt_freebsd.go Keeps routing-mark behavior via socket option; bind-to-interface is unsupported.
dialer/sockopt_openbsd.go Keeps routing-mark behavior via socket option; bind-to-interface is unsupported.
dialer/sockopt_others.go Removes the previous non-unix/non-windows no-op implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xjasonlyu xjasonlyu merged commit 9c2ce39 into main Feb 8, 2026
18 checks passed
@xjasonlyu xjasonlyu deleted the dialer branch February 8, 2026 02:35
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