-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
Subnet range selector, interface fixes #481
Conversation
You done great work, but you want implement several options at one time and it's not convinient for development..
It will increase the chances of appearing in the main branch |
@nebulosa2007 |
@nebulosa2007 is right here. |
The SR is not a purely server-side update. I have to change the UI. As for UX fixes, it's not worth the effort separating it, only for the merger to deal with additional conflicts.
Is it really worth it? I do understand that it might prevent a minor conflict here and there. But it significantly degrades the DX. OR requires a manual "second pass" with all the formatters turned off (which is not particularly convenient to achieve, let alone the process of manually reverting every fmt change). |
#481 (comment) |
We would not ask for it if it wasn't worth it.
It makes reviewing this and any PR painful when we need to separate
formatting from the noise of what's actually important.
Rule: Put them in separate commits, in a separate PR.
Then it's easy for anyone to understand what the PR is supposed to do.
I like the core of this PR, otherwise.
… Is it really worth it? I do understand that it might prevent a minor
conflict here and there. But it significantly degrades the DX. OR requires
a manual "second pass" with all the formatters turned off (which is not
particularly convenient to achieve, let alone the process of manually
reverting every fmt change).
—
Reply to this email directly, view it on GitHub
<#481 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6DULTD6D2VORMI4VMAWLYHS4APAVCNFSM6AAAAAA66W2LKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGU2TCNZZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Also, if for some reason anyone needs to revert this PR, they don't need to
deal with the fallout of formatting unexpectedly removed which affects
commits on top of it also.
So dedicate a PR to running go fmt on the code base. 👌
… Is it really worth it? I do understand that it might prevent a minor
conflict here and there. But it significantly degrades the DX. OR requires
a manual "second pass" with all the formatters turned off (which is not
particularly convenient to achieve, let alone the process of manually
reverting every fmt change).
—
Reply to this email directly, view it on GitHub
<#481 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6DULTD6D2VORMI4VMAWLYHS4APAVCNFSM6AAAAAA66W2LKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGU2TCNZZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sorry, on email.
Could you please keep your answers in their threads?
… |
Are you going to move it later? I can wait and continue later. Or we could continue in the main thread, but I don't think it's a really good idea. Edit: I just noticed you already moved your answers |
Sure thing, for an active repo. Not sure what to do here though. Turn off all the formatters for this repo only?.. |
Agreed on the active repo thing. But prepare the PR and branch such that it could go into our repo 😉 Look at the quality of some of the PRs. Some are messy and a rats nest of dependencies where all commits slipped in and the original idea is lost in noise. |
I resolved the issues. |
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.
<div class="form-group"> | ||
<label for="subnet_ranges" class="control-label">Subnet range</label> | ||
<select id="subnet_ranges" class="select2" | ||
data-placeholder="Select a subnet range" style="width: 100%;"> | ||
</select> | ||
</div> |
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 think we should hide the subnet range input by default if the SUBNET_RANGES
environment variable is not set. Not everyone needs this feature. It will probably confuse new users.
And, the same comment for the dropdown list near the search box.
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 actually intend to place this to "Additional configuration" <summary>
, along with tg userid setting. To hide it, templates or js must be used, which isn't beautiful. It probably isn't necessary if it's already mostly out of the way?
As for dropdown, it's gonna be just default options if no subnet ranges are defined. No change required.
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.
IDK, it was my personal preference. No worries, I can keep it like this and refactor it later.
Leaving it in the "Additional configuration" doesn't seem nice to me as I think it should be part of the IP allocation section.
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.
Then maybe Endpoint should be? It's an uncommon thing.
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.
Endpoint is a standard configuration supported by WireGuard, isn't it?
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.
It is, I mean uncommon by usage. Very useful sometimes, but most of the time it's just server-clients, with only some clients having endpoint config.
fix: free ip search was stopping after no free ip on the first interface fix: toast obstructing the buttons fix: stuck apply config button
If the same subnet range is selected, a different IP is suggested
- Reverted formatting fixes where possible - Clarified the note about updateSearchList() - Fixed a typo - Made SUBNET_RANGES example yaml-friendly - Removed Makefile
01cf84c
to
9e63301
Compare
@ngoduykhanh I rebased on the latest master. Let's decide on subnet ranges input and it's ready for merge. |
@0xCA I replied to your comment and merged this PR. Thanks again! |
Subnet range selector
Reason
This feature is intended for subdivision of large wireguard servers, such as /16 subnets.
I wanted to allocate smaller blocks of the server address space for specific purposes and easier firewalling.
Current IP suggestion is unaware of such blocks, which requires entering each IP manually.
So I made it aware.
Details
SUBNET_RANGES
SR Name| 10.0.1.0/24; SR2| 10.0.2.0/24, 10.0.3.0/24, 2001:0db8::/32
IP suggestion
Subnet range filter
Extra
I also Implemented some interface/UX fixes