-
Notifications
You must be signed in to change notification settings - Fork 99
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
[Feature request] Adding the ability to add port range #11
Comments
This suggestion will be included in the next version plan, but may not be updated in the near future. You can follow this Issue to get notifications. Thanks for your feedback. |
I created a fork that allows adding ranges; give it a shot if still interested. |
@blackwind our 2 projects are mutually exclusive (too many changes/additions in my repo to realistically merge the 2), but the port range feature is already in mine if you want to grab it. |
Thanks for waiting. I looked at @STaRDoGG project and I think our goals are not the same. It integrates more functions, but I want to be simpler. It's worth pointing out that range rules are a necessary feature. But we still have some unresolved issues. We're creating a data structure ( Interval<T> ) for computing ranges, but it hasn't passed all the unit tests yet. With this structure, we are able to convert single-point rules (from system) into range rules. var ports = new[] { 5000, 5001, 5002, 6000, 6001 };
var portRanges = new Interval<int>{ ports };
portRanges.Dump();
Next, we can determine whether the rules set by the user have been fully covered. var userRules = new Interval<int>
{
(5000, 5001),
(6000, 6002),
};
//TODO: optimizable
var results =
from userRule in userRules
let covered = portRanges.Any(x => x.Start <= userRule.Start && userRule.End <= x.End)
select new
{
UserRule = userRule.ToString(),
HasCovered = covered,
};
results.Dump();
We also need to fix the following issues before releasing a new version.
|
Thanks for this project.
I suggest to work on port range registration.
It seems that netsh does not support port range for this purpose.
I asked ChatGPT and it suggested a script that might be used in the project (:
Image:
The text was updated successfully, but these errors were encountered: