headscale/hscontrol/types
Motiejus Jakštys c6336adb01
config: loosen up BaseDomain and ServerURL checks (#2248)
* config: loosen up BaseDomain and ServerURL checks

Requirements [here][1]:

> OK:
> server_url: headscale.com, base: clients.headscale.com
> server_url: headscale.com, base: headscale.net
>
> Not OK:
> server_url: server.headscale.com, base: headscale.com
>
> Essentially we have to prevent the possibility where the headscale
> server has a URL which can also be assigned to a node.
>
> So for the Not OK scenario:
>
> if the server is: server.headscale.com, and a node joins with the name
> server, it will be assigned server.headscale.com and that will break
> the connection for nodes which will now try to connect to that node
> instead of the headscale server.

Fixes #2210

[1]: https://github.com/juanfont/headscale/issues/2210#issuecomment-2488165187

* server_url and base_domain: re-word error message, fix a one-off bug and add a test case for the bug.

* lint

* lint again
2024-11-22 13:21:44 +01:00
..
testdata config: loosen up BaseDomain and ServerURL checks (#2248) 2024-11-22 13:21:44 +01:00
api_key.go Split code into modules 2023-05-26 12:24:50 +02:00
common.go use gorm serialiser instead of custom hooks (#2156) 2024-10-02 11:41:58 +02:00
config.go config: loosen up BaseDomain and ServerURL checks (#2248) 2024-11-22 13:21:44 +01:00
config_test.go config: loosen up BaseDomain and ServerURL checks (#2248) 2024-11-22 13:21:44 +01:00
const.go improve testing of route failover logic 2024-04-15 12:31:53 +02:00
node.go #2140 Fixed reflection of hostname change (#2199) 2024-10-17 09:45:33 -06:00
node_test.go #2140 Fixed reflection of hostname change (#2199) 2024-10-17 09:45:33 -06:00
policy.go feat: implements apis for managing headscale policy (#1792) 2024-07-18 07:38:25 +02:00
preauth_key.go denormalise PreAuthKey tags (#2155) 2024-09-29 13:00:27 +02:00
routes.go use gorm serialiser instead of custom hooks (#2156) 2024-10-02 11:41:58 +02:00
routes_test.go use gorm serialiser instead of custom hooks (#2156) 2024-10-02 11:41:58 +02:00
users.go add new user fields to grpc and list command (#2202) 2024-10-18 14:20:03 +00:00