-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Local network IP not returned #1153
Comments
FYI, here's the IP stack as seen by a regular user
|
@kelson42 I don't think that it is a regression. |
@kelson42 @rgaudin this works as expected. The As far as the message, for when specifically showing the loopback addresses, I agree can be slightly adjusted. |
@veloman-yunkan @sgourdas The hwlpwr shows 127.0.0.1, it can not be. |
I am not sure I understood correctly. Should we remove the loopback addresses as the last resort binding? |
Don't show (and use) ipv4 loopback if you have an ipv4 IP available on which the system is reachable from the outside (of the system). This is that simple. |
"local network" is a concept which has never been requested to consider regarding that feature. Any IP allowing to reach the computer from an other one is fine. |
So, should we:
|
Why Are we limiting to known prefixes in the first place? Isn't it more logical and reliable to only exclude those that are known to cause issues? |
I am not really sure exactly why the approach is that TBH, it has been like that since previously and #1132 just built on top. It seems to me as well that it would be best to follow that approach, but it may be the case that we are not really sure what can cause issues as well? |
One problematic case that I can think of is virtual network IPs (e.g. created by the |
How is that an issue? Is dockerd removing the interfaces on exit and you are afraid that kiwix-serve lifecycle would be tied to the one of dockerd in that case? |
I am concerned that |
@kelson42 It's not that simple. How do we distinguish between real networks to which the system is connected and virtual networks created by some service like docker running on our system? |
How is that a concern? Should a user want to bind to a specific interface (for preference, control, security, etc), he can specify the interface to use via |
@rgaudin Definitely. But the concern is about the IP address shown to the user in the absence of the 1 when connecting from the corresponding network |
Oh I thought all of them were shown. Is this something that could be rethought? I understand how showing a single one is better in terms of UX… if the one shown is the right one.I think that showing all of them would be simpler and more realistic. I think it would benefit from a bit of sorting: publicly routable IPs first (actual public IP), then the ones that are most-likely user-managed ( I believe most non-tech users would have only one, but indeed, people with complex network stacks would have more… but I think we can consider them able to understand the difference. |
I'm not in favour of showing a helper for all IPs or having listening on all IPs per default because most users will be just lost. This is only a helper. We should keep relying on the heuristic to choose the best IP. If this is not possible to get it working fine for all scenarios, it should at least work fine for the most common. Here we have a very common - difficult to make more simple IMHO - and it fails! So we have a bug. Here we face a normalised (by the IETF) IP range for local networks, please handle it as such: https://www.lookip.net/network/10.211.55. If the way how the code works currently is correct, you should also ensure that you have the full list of the such IP range for local networks. |
@sgourdas @veloman-yunkan Does the expected behaviour is clear enough? |
@kelson42 TBH I am not sure I understand how we want this to work. What do we want displayed in each case? |
@sgourdas I don't want to get |
Sorry for the lack of feedback here. Will try to get back ASAP. |
I chose
bug
andquestion
because this feature is not documented and I thus, as a user, have no idea what I should get.I tried the Windows nightly of kiwix-serve including #1132 (seems to be the one, as the ipv4 issue is gone) and I got the following:
Based on the sentence, I guess I should have received local addresses in addition to the loop back ones (the sentence is false otherwise).
The
getBestPublicIps
function name is not helping I guess and the docstring neither: what's best?The text was updated successfully, but these errors were encountered: