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

Include a way to filter the ipaddresses resolved for the host with a custom func #29

Closed

Conversation

matthewvukomanovic
Copy link
Contributor

This relates the the #28 issue.

This includes a way to filter the addresses returned from DnsAbstraction.GetHostAddresses(host) to the actual address that you want.

It also provides some default classes to provide the filter functions.

NOTE: Until you have merged in #27 I wouldn't check this branch out.
This is because I used the github instructions (instead of the new git instructions) on how to reset end of lines for existing files, and so the files are still getting changed by the .gitattribute settings.

I just wanted your feedback on this for now, if you want changes done I'll do them, but then wait until #27 has been merged before I push up again, so that it's an easier merge.

@drieseng
Copy link
Member

I would prefer to add ctors that take (IP)EndPoint that way the client can take charge of this.

@matthewvukomanovic
Copy link
Contributor Author

While that could be a good solution, it doesn't handle the situation where there is a load balanced server which might change.
Especially if the connection is dropped at some point, and the client reconnects automatically under the covers it doesn't give any opportunity to change the address that might be having issues (since the reconnect is most of the time transparent to the user)

@wolfsoul13
Copy link

Hi Mathew,

I've been working on some adjustments to allow binding of socket to a specific local IPEndPoint (I need this for downloading files using SFTP)

Please let me know if your changes cover this.

Many thanks,

@drieseng
Copy link
Member

@matthewvukomanovic At this moment I'm inclined against such changes.

@drieseng
Copy link
Member

I have no problem at all with introducing overloads that accept an (IP)EndPoint. However, I don't think SSH.NET should provide an address filtering mechanism. That's not to say we can't have a discussion on this to see if we can come up with a extension point to allow the consuming application to take control of this.

For now, I want to focus on hardening SSH.NET and preparing a new stable release.

@Rob-Hague
Copy link
Collaborator

I'll close this as old and unloved

@Rob-Hague Rob-Hague closed this May 23, 2024
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.

4 participants