Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Dialer for TCP transports #3155

Closed
MarcoPolo opened this issue Jan 24, 2025 · 0 comments · Fixed by #3166
Closed

Custom Dialer for TCP transports #3155

MarcoPolo opened this issue Jan 24, 2025 · 0 comments · Fixed by #3166
Labels
effort/days Estimated to take multiple days, but less than a week effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up

Comments

@MarcoPolo
Copy link
Collaborator

Some environments need to proxy TCP connections. Instead of trying to handle all cases in the library, allow a user to specify a custom interface { DialContext(ctx context.Context, network, address string) (net.Conn, error) } to use.

We should expose a new Option called CustomTCPDialer that accepts a func(remoteAddr multiaddr.Multiaddr) (ContextDialer, error). If set, this function should be used instead of the standard net.Dialer.

cc @parkan (see #3137 (comment) for some more background information)

@MarcoPolo MarcoPolo added effort/days Estimated to take multiple days, but less than a week effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up labels Jan 24, 2025
MarcoPolo added a commit that referenced this issue Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant