libremesh / lime-packages

LibreMesh packages configuring OpenWrt for wireless mesh networking
https://libremesh.org/
GNU Affero General Public License v3.0
277 stars 96 forks source link

derive domain from ap_ssid #887

Open altergui opened 3 years ago

altergui commented 3 years ago

right now, domain defaults to thisnode.info. if this setting is not properly customized (made unique), and two different clouds (different ap_ssid) are connected to each other, they will have a conceptual conflict. they will both consider themselves authoritative for the same domain (thisnode.info) and will have no way to resolve each other hostnames.

my proposal is to derive domain from ap_ssid by default (i.e. it can always be customized, the same way ip addresses default to something derived from ap_ssid but can be hardcoded to something else)

examples:

so:

notably, this proposal will break current usage of browsing to somenode.thisnode.info instead of to somenode/ or http://somenode i personally haven't seen people doing that in the wild, but there's probably someone out there doing such a thing. it happened with .lan https://github.com/libremesh/lime-packages/issues/540#issuecomment-528518075

thisnode.info will still work, of course, for accessing the nearest node, as always.

altergui commented 3 years ago

just to give more context, this proposal is a prerequisite to https://github.com/libremesh/lime-packages/issues/133 that issue is more epic in terms of implementation, but probably no-one would oppose merging such a wonderful feature.

this present issue #887 is trivial to code, but i have the feeling it will instead demand more time to talk about it here.

ilario commented 3 years ago

Two small things:

"thisnode.info" is also hardcoded into anygw here: https://github.com/libremesh/lime-packages/blob/92a98fb6f9f9796bcdf26513efa8f5290ea34b56/packages/lime-proto-anygw/files/usr/lib/lua/lime/proto/anygw.lua#L14

So it will maybe still work (even when changing the domain name) for some of its features (I did not verify which ones).

When using .mesh we hit again #540