-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Rewrite NetworkManager and incorporate various fixes from open PRs #8147
Conversation
…todiscovery sockets
…r all changed values
🚀 |
There goes the 1 year PR anniversary 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also add constants for the number of bits and bytes in IPv4 and IPv6 addresses
if (i is IPNetAddress nw) | ||
var ipBlock = splitString.Current; | ||
var address = IPAddress.None; | ||
if (negated && ipBlock.StartsWith("!") && IPAddress.TryParse(ipBlock[1..], out var tmpAddress)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (negated && ipBlock.StartsWith("!") && IPAddress.TryParse(ipBlock[1..], out var tmpAddress)) | |
if (negated && ipBlock.StartsWith('!') && IPAddress.TryParse(ipBlock[1..], out var tmpAddress)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work: cannot convert from 'char' to 'System.ReadOnlySpan<char>'
I tried debugging and fixing a problem but didn't understand all the custom code, so I reimplemented the NetworkManager functionality with native .NET
IPAddress
andIPNetwork
and a way more simpler object to hold both (e.g. for interfaces or in case we allow IPs and Subnets in a config)Changes
LocalAddress
resolution inSystem/Info/Public
network.xml
)KnownProxies
UdpSocket
and replaced it with native .NET socketsNotes
Location
prop but a lot of clients do not work with domains, therefore we force IP+portIssues
Related
Fixes #6272
Fixes #9298
Fixes #9300
Partially fixes #8692
Might fix #4442
Might fix #7791
Might fix #9298
Might fix #9445
Might fix #9540
Might fix #9586