Kristoffer Dalby
2dc2f3b3f0
users: harden, test, and add cleaner of identifier ( #2593 )
...
* users: harden, test, and add cleaner of identifier
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* db: migrate badly joined provider identifiers
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-14 16:45:14 +02:00
Kristoffer Dalby
d7a503a34e
changelog: entry for 0.26 ( #2594 )
...
* changelog: entry for 0.26
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* docs: bump version
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-14 16:32:56 +02:00
jasonrepos
62b489dc68
fix: change FormatUint base from 64 to 10 in preauthkeys list command ( #2588 )
2025-05-13 18:40:17 +00:00
nblock
8c7e650616
Remove map_legacy_users from example configuration ( #2590 )
2025-05-13 21:38:52 +03:00
Kristoffer Dalby
43943aeee9
bring back last_seen in database ( #2579 )
...
* db: add back last_seen to the database
Fixes #2574
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: ensure last_seen is set
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-10 09:49:08 +02:00
nblock
d81b0053e5
Simplify policy migration ( #2582 )
...
These steps are easier to accomplish and require only Headscale 0.26.
They also work when a user has already upgraded the database.
See: #2567
2025-05-10 08:04:42 +02:00
nblock
dd0cbdf40c
Add migration steps when policy is stored in the database ( #2581 )
...
Fixes : #2567
2025-05-09 23:30:39 +02:00
Kristoffer Dalby
37dc0dad35
policy/v2: separate exit node and 0.0.0.0/0 routes ( #2578 )
...
* policy: add tests for route auto approval
Reproduce #2568
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: separate exit node and 0.0.0.0/0 routes
Fixes #2568
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-09 23:20:04 +02:00
Kristoffer Dalby
377b854dd8
cli: policy check, dont require config or log ( #2580 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-09 23:19:47 +02:00
Kristoffer Dalby
56db4ed0f1
policy/v2: validate that no undefined group or tag is used ( #2576 )
...
* policy/v2: allow Username as ssh source
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: validate that no undefined group or tag is used
Fixes #2570
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: fixup tests which violated tag constraing
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-09 11:51:30 +02:00
nblock
833e0f66f1
Remove subnet router visibility workaround from docs ( #2569 )
...
Previous Headscale versions required a dedicated rule to make a subnet
router visible to clients. This workaround is no longer required.
2025-05-05 15:24:59 +02:00
Kristoffer Dalby
1dddd3e93b
app: throw away not found body ( #2566 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-04 22:06:44 +02:00
nblock
9a86ffc102
Misc doc fixes ( #2562 )
...
* Link to stable and development docs in the README
* Add Tailscale SSH and autogroup:nonroot to features page
* Use @ when referencing users in policy
* Remove unmaintained headscale-webui
The project seems to be unmaintained (last commit: 2023-05-08) and it
only supports Headscale 0.22 or earlier.
* Use full image URL in container docs
This makes it easy to switch the container runtime from docker <->
podman.
* Remove version from docker-compose.yml example
This is now deprecated and yields a warning.
2025-05-04 21:55:08 +02:00
Kristoffer Dalby
45e38cb080
policy: reduce routes sent to peers based on packetfilter ( #2561 )
...
* notifier: use convenience funcs
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: reduce routes based on policy
Fixes #2365
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hsic: more helper methods
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: more test cases
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: add route with filter acl integration test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: correct route reduce test, now failing
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* mapper: compare peer routes against node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hs: more output to debug strings
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* types/node: slice.ContainsFunc
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: more reduce route test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog: add entry for route filter
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-04 21:52:47 +02:00
Kristoffer Dalby
b9868f6516
Make more granular SSH tests for both Policies ( #2555 )
...
* policy/v1: dont consider empty if ssh has rules
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: replace time.Duration with model.Duration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: add autogroup and ssh validation
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: replace time.Duration with model.Duration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: replace old ssh tests with more granular test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: skip v1 tests expected to fail (missing error handling)
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: skip v1 group tests, old bugs wont be fixed
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: user valid policy for ssh
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Changelog, add ssh section
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* nix update
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-04 12:05:41 +00:00
Kristoffer Dalby
f317a85ab4
go.mod: update rest of deps ( #2559 )
...
* flake: update go hash
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* go.mod: update more deps
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-03 16:36:08 +02:00
Alexey Tarasov
53d9c95160
Update container.md
2025-05-03 12:51:46 +02:00
Jacob Yundt
03a91693ac
feat: Create headscale user and group as system user/groups ( #2322 )
...
When creating the headscale user and group, create both as system groups
rather than creating them as 'user' groups.
FIXES #2278
2025-05-03 09:13:54 +00:00
nblock
cb7c0173ec
Fix deprecation warnings ( #2558 )
...
See https://goreleaser.com/deprecations/#archivesformat and
https://goreleaser.com/deprecations/#nfpmsbuilds
2025-05-03 10:18:49 +02:00
nblock
18d21d3585
Add documentation for routes ( #2496 )
...
* Add documentation for routes
* Rename exit-node to routes and add redirects
* Add a new section on subnet routers
* Extend the existing exit-node documentation
* Describe auto approvers for subnet routers and exit nodes
* Provide ACL examples for subnet routers and exit nodes
* Describe HA and its current limitations
* Add a troubleshooting section with IP forwarding
* Update features page for 0.26
Add auto approvers and link to our documentation if available.
* Prefer the console lexer when commandline and output mixed
2025-05-03 10:16:45 +02:00
Kristoffer Dalby
e7d2d79134
update capmap and deps for release ( #2522 )
...
* generate new capver map
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* replace old sort func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* nix: flake update
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* capgen: update
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* capgen: update
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* go.mod: update tailscale
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* go.mod: update other deps
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-02 22:12:29 +02:00
Kristoffer Dalby
d810597414
policy/matcher: fix bug using contains instead of overlap ( #2556 )
...
* policy/matcher: slices.ContainsFunc
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/matcher: slices.ContainsFunc, correct contains vs overlap
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: add tests to validate fix for 2181
Fixes #2181
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-02 22:08:56 +02:00
Kristoffer Dalby
93afb03f67
cmd: add policy check command ( #2553 )
2025-05-02 13:58:30 +03:00
Kristoffer Dalby
e4d10ad964
policy/v2: validate autogroup:interet only in dst ( #2552 )
2025-05-02 13:58:12 +03:00
Janne Johansson
7dc86366b4
Update source.md
...
If we assume someone doesn't already have the required go package, they might also not have the required git package installed either, so pkg_add both of them.
2025-05-02 10:43:56 +02:00
Kristoffer Dalby
c923f461ab
error on undefined host in policy ( #2490 )
...
* add testcases
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: add validate to do post marshal validation
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-01 14:30:52 +02:00
Kristoffer Dalby
a4a203b9a3
cli/nodes: filter nodes without any routes ( #2551 )
2025-05-01 13:27:54 +03:00
aergus-tng
4651d06fa8
Make matchers part of the Policy interface ( #2514 )
...
* Make matchers part of the Policy interface
* Prevent race condition between rules and matchers
* Test also matchers in tests for Policy.Filter
* Compute `filterChanged` in v2 policy correctly
* Fix nil vs. empty list issue in v2 policy test
* policy/v2: always clear ssh map
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: Aras Ergus <aras.ergus@tngtech.com >
Co-authored-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-01 07:06:30 +02:00
Kristoffer Dalby
eb1ecefd9e
auth: ensure that routes are autoapproved when the node is stored ( #2550 )
...
* integration: ensure route is set before node joins, reproduce
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* auth: ensure that routes are autoapproved when the node is stored
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-01 07:05:42 +02:00
Kristoffer Dalby
6b6509eeeb
notify nodes after owner change ( #2543 )
...
* proto: user id as identifier for move node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* gen: regenr
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* grpc: move, use userid, one tx, send update
Updates #2467
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: update move cli tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 18:33:38 +02:00
Kristoffer Dalby
cfe9bbf829
oidc: try to get username from userinfo ( #2545 )
...
* oidc: try to get username from userinfo
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 11:54:13 +02:00
Kristoffer Dalby
8f9fbf16f1
types/authkey: include user object in response ( #2542 )
...
* types/authkey: include user object, not string
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make preauthkeys use id
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: wire up user id for auth keys
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 11:45:08 +02:00
Kristoffer Dalby
f1206328dc
fix webauth + autoapprove routes ( #2528 )
...
* types/node: add helper funcs for node tags
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* types/node: add DebugString method for node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: add String func to AutoApprover interface
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: simplify, use slices.Contains
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: debug, use nodes.DebugString
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v1: fix potential nil pointer in NodeCanApproveRoute
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v1: slices.Contains
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration/tsic: fix diff in login commands
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: fix webauth running with wrong scenario
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: move common oidc opts to func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: require node count, more verbose
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* auth: remove uneffective route approve
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* .github/workflows: fmt
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration/tsic: add id func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: remove call that might be nil
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: test autoapprovers against web/authkey x group/tag/user
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: unique network id per scenario
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Revert "integration: move common oidc opts to func"
This reverts commit 7e9d165d4a900c304f1083b665f1a24a26e06e55.
* remove cmd
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: clean docker images between runs in ci
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: run autoapprove test against differnt policy modes
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration/tsic: append, not overrwrite extra login args
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* .github/workflows: remove polv2
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 07:54:04 +02:00
Kristoffer Dalby
57861507ab
integration: remove failing resolvconf tests ( #2549 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 07:52:23 +02:00
Kristoffer Dalby
2b38f7bef7
policy/v2: make default ( #2546 )
...
* policy/v2: make default
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: do not run v1 tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy/v2: fix potential nil pointers
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* mapper: fix test failures in v2
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-29 16:27:41 +02:00
github-actions[bot]
9a4d0e1a99
flake.lock: Update ( #2518 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/18dd725c29603f582cf1900e0d25f9f1063dbf11?narHash=sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38%3D' (2025-04-13)
→ 'github:NixOS/nixpkgs/ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c?narHash=sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs%3D' (2025-04-17)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-24 11:02:09 +00:00
Kristoffer Dalby
30539b2e26
config: disallow same server url and base_domain ( #2544 )
...
* config: disallow same server url and base_domain
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-23 16:24:38 +02:00
Kristoffer Dalby
098ab0357c
add casbin user test ( #2474 )
...
* add casbin user test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Delete double slash
* types/users: use join url on iss that are ursl
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2025-04-23 13:21:51 +02:00
Relihan Myburgh
56d085bd08
Fix panic on fast reconnection of node ( #2536 )
...
* Fix panic on fast reconnection of node
* Use parameter captured in closure as per review request
2025-04-23 11:52:24 +02:00
Relihan Myburgh
92e587a82c
Fix goroutine leak in EphemeralGC on node cancel ( #2538 )
...
* Fix goroutine leak in EphemeralGC on node cancel
* Deal with timer firing whilst the GC is shutting down. Fix typos.
2025-04-23 11:44:24 +02:00
Pamplemousse
f3a1e693f2
Mention "Network flow logs" as a missing feature
2025-04-22 11:28:41 +02:00
Kristoffer Dalby
f783555469
integration: clean up unreferenced hs- networks ( #2534 )
2025-04-18 12:06:28 +02:00
Kristoffer Dalby
710d75367e
policy/v2: fix host validation, consistent pattern ( #2533 )
2025-04-18 11:35:04 +02:00
Kristoffer Dalby
c30e3a4762
flake: add golang-lint lsp ( #2507 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-18 11:15:02 +02:00
alteriks
3287aa8bba
Update oidc.md
...
Authelia docs
2025-04-18 10:16:08 +02:00
Kristoffer Dalby
8e7e52cf3a
some clarifications for tags ( #2531 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-18 09:33:02 +02:00
nblock
1e0516b99d
Restore support for "Override local DNS" ( #2438 )
...
Tailscale allows to override the local DNS settings of a node via
"Override local DNS" [1]. Restore this flag with the same config setting
name `dns.override_local_dns` but disable it by default to align it with
Tailscale's default behaviour.
Tested with Tailscale 1.80.2 and systemd-resolved on Debian 12.
With `dns.override_local_dns: false`:
```
Link 12 (tailscale0)
Current Scopes: DNS
Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 100.100.100.100
DNS Domain: tn.example.com ~0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa [snip]
```
With `dns.override_local_dns: true`:
```
Link 12 (tailscale0)
Current Scopes: DNS
Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 100.100.100.100
DNS Domain: tn.example.com ~.
```
[1] https://tailscale.com/kb/1054/dns#override-local-dns
Fixes : #2256
2025-04-17 17:16:59 +02:00
Kristoffer Dalby
0fbe392499
more wait, more retry ( #2532 )
2025-04-16 12:42:26 +02:00
Nick
109989005d
ensure final dot on node name ( #2503 )
...
* ensure final dot on node name
This ensures that nodes which have a base domain set, will have a dot appended to their FQDN.
Resolves: https://github.com/juanfont/headscale/issues/2501
* improve OIDC TTL expire test
Waiting a bit more than the TTL of the OIDC token seems to remove some flakiness of this test. This furthermore makes use of a go func safe buffer which should avoid race conditions.
2025-04-11 12:39:08 +02:00
Enkelmann
0d3134720b
Only read relevant nodes from database in PeerChangedResponse ( #2509 )
...
* Only read relevant nodes from database in PeerChangedResponse
* Rework to ensure transactional consistency in PeerChangedResponse again
* An empty nodeIDs list should return an empty nodes list
* Add test to ListNodesSubset
* Link PR in CHANGELOG.md
* combine ListNodes and ListNodesSubset into one function
* query for all nodes in ListNodes if no parameter is given
* also add optional filtering for relevant nodes to ListPeers
2025-04-08 14:56:44 +02:00
Christoph
d2a6356d89
Add unraid-headscale-admin web UI to docs ( #2515 )
...
* Add unraid-headscale-admin link
2025-04-02 20:54:32 +02:00
Kristoffer Dalby
5a18e91317
fix auto approver on register and new policy ( #2506 )
...
* fix issue auto approve route on register bug
This commit fixes an issue where routes where not approved
on a node during registration. This cause the auto approval
to require the node to readvertise the routes.
Fixes #2497
Fixes #2485
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hsic: only set db policy if exist
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: calculate changed based on policy and filter
v1 is a bit simpler than v2, it does not pre calculate the auto approver map
and we cannot tell if it is changed.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-31 15:55:07 +02:00
Kristoffer Dalby
e3521be705
allow users to be defined with @ in v1 ( #2495 )
...
* allow users to be defined with @ in v1
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove integration test rewrite hack
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove test rewrite hack
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add @ to integration tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* a bit to agressive removeals
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix last test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-30 11:19:05 +00:00
github-actions[bot]
f52f15ff08
flake.lock: Update ( #2510 )
2025-03-30 06:18:37 +00:00
Kristoffer Dalby
cbc99010f0
populate serving from primary routes ( #2489 )
...
* populate serving from primary routes
Depends on #2464
Fixes #2480
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* also exit
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix route update outside of connection
there was a bug where routes would not be updated if
they changed while a node was connected and it was not part of an
autoapprove.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update expected test output, cli only shows service node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-28 13:22:15 +01:00
Benjamin Staffin
b5953d689c
OIDC: Fetch UserInfo to get EmailVerified if necessary ( #2493 )
2025-03-27 10:39:29 +01:00
github-actions[bot]
badbb68217
flake.lock: Update ( #2468 )
2025-03-23 08:34:03 +00:00
Kristoffer Dalby
603f3ad490
Multi network integration tests ( #2464 )
2025-03-21 11:49:32 +01:00
Florian Preinstorfer
707438f25e
Mention that private keys generated if needed
2025-03-19 06:12:14 +01:00
Florian Preinstorfer
24ad235917
Explicitly handle /headscale/{config,lib,run} in container docs
...
Fixes : #2304
2025-03-19 06:12:14 +01:00
Oleksii Samoliuk
00d5d647ed
add third-party tool headscale-pf
2025-03-17 13:20:24 +01:00
Florian Preinstorfer
cbce8f6011
Remove coderabbit
...
It is no longer available for free and didn't do anything in the past
months.
2025-03-16 14:02:33 +01:00
Florian Preinstorfer
05202099f7
Set content-type to JSON for some debug endpoints
...
Some endpoints in /debug send JSON data as string. Set the Content-Type
header to "application/json" which renders nicely in Firefox.
Mention the /debug route in the example configuration.
2025-03-16 14:02:12 +01:00
Kristoffer Dalby
800456018a
update bug template with debug ( #2481 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-16 13:43:13 +01:00
Florian Preinstorfer
586a20fbff
Add a FAQ entry about two nodes seeing each other
...
See: #2431
See: #2174
2025-03-14 18:48:44 +01:00
Kristoffer Dalby
818046f240
add faq section on scaling/performance ( #2476 )
...
* add faq section on scaling/performance
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Apply suggestions from code review
Co-authored-by: nblock <nblock@users.noreply.github.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: nblock <nblock@users.noreply.github.com >
2025-03-14 17:09:30 +00:00
nblock
fe06a00d45
Container images are also available on GHCR ( #2470 )
...
Fixes : #2456
2025-03-11 06:54:05 +01:00
Kristoffer Dalby
0b5c29e875
remove policy handling for old capver ( #2429 )
...
* remove policy handling for old capver
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-10 18:19:25 +00:00
Florian Preinstorfer
0a243b4162
Remove leftover printf
2025-03-10 16:52:29 +01:00
Florian Preinstorfer
29ba29478b
Add usage example to routes flag
2025-03-10 16:52:29 +01:00
Florian Preinstorfer
e52f1e87ce
Drop routes table
2025-03-10 16:52:29 +01:00
Kristoffer Dalby
87326f5c4f
Experimental implementation of Policy v2 ( #2214 )
...
* utility iterator for ipset
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* split policy -> policy and v1
This commit split out the common policy logic and policy implementation
into separate packages.
policy contains functions that are independent of the policy implementation,
this typically means logic that works on tailcfg types and generic formats.
In addition, it defines the PolicyManager interface which the v1 implements.
v1 is a subpackage which implements the PolicyManager using the "original"
policy implementation.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use polivyv1 definitions in integration tests
These can be marshalled back into JSON, which the
new format might not be able to.
Also, just dont change it all to JSON strings for now.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* formatter: breaks lines
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove compareprefix, use tsaddr version
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove getacl test, add back autoapprover
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use policy manager tag handling
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* rename display helper for user
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* introduce policy v2 package
policy v2 is built from the ground up to be stricter
and follow the same pattern for all types of resolvers.
TODO introduce
aliass
resolver
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* wire up policyv2 in integration testing
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* split policy v2 tests into seperate workflow to work around github limit
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add policy manager output to /debug
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-10 16:20:29 +01:00
github-actions[bot]
b6fbd37539
flake.lock: Update ( #2454 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/dad564433178067be1fbdfcce23b546254b6d641?narHash=sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g%3D' (2025-02-20)
→ 'github:NixOS/nixpkgs/199169a2135e6b864a888e89a2ace345703c025d?narHash=sha256-igS2Z4tVw5W/x3lCZeeadt0vcU9fxtetZ/RyrqsCRQ0%3D' (2025-03-01)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-02 19:59:44 +00:00
Kristoffer Dalby
7891378f57
Redo route code ( #2422 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-26 16:22:55 +01:00
Kristoffer Dalby
16868190c8
fix double login URL with OIDC ( #2445 )
...
* factor out login url parser
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* move to not trigger test gen checker
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* return regresp or err after waiting for registration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-25 18:16:07 +01:00
Kristoffer Dalby
da2ca054b1
fix routes not being saved when new nodes registers ( #2444 )
...
* add test to validate exitnode propagation
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* save routes on register
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* no nil
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add missing integration tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-23 23:10:25 +01:00
Kristoffer Dalby
bcff0eaae7
handle register auth errors ( #2435 )
...
* handle register auth errors
This commit handles register auth errors as the
Tailscale clients expect. It returns the error as
part of a tailcfg.RegisterResponse and not as a
http error.
In addition it fixes a nil pointer panic triggered
by not handling the errors as part of this chain.
Fixes #2434
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-23 17:02:46 +01:00
github-actions[bot]
b220fb7d51
flake.lock: Update ( #2440 )
2025-02-23 01:23:16 +00:00
github-actions[bot]
2cce3a99eb
flake.lock: Update ( #2430 )
2025-02-16 20:40:20 +00:00
Kristoffer Dalby
bbe57f6cd4
use tailscale version in all unsupported errs ( #2426 )
2025-02-14 13:43:33 +01:00
Kristoffer Dalby
604f7f6282
update to go 1.24 ( #2427 )
2025-02-14 10:56:03 +01:00
badsmoke
c61fbe9c5f
activate json logs ( #2424 )
...
Co-authored-by: jan.sulimma <jan.sulimma@zigpos.com >
2025-02-12 15:31:24 +01:00
Kristoffer Dalby
b943cce868
set 0.25.0 changelog date ( #2423 )
...
* date in changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update docs version
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-11 16:25:53 +01:00
Kristoffer Dalby
6403c8d5d2
use tsweb debugger ( #2420 )
...
This PR switches the homegrown debug endpoint to using tsweb.Debugger, a neat toolkit with batteries included for pprof and friends, and making it easy to add additional debug info:
I've started out by adding a bunch of "introspect" endpoints
image
So users can see the acl, filter, config, derpmap and connected nodes as headscale sees them.
2025-02-11 11:18:59 +01:00
github-actions[bot]
b3fa16fbda
flake.lock: Update ( #2419 )
2025-02-09 08:45:06 +00:00
Kristoffer Dalby
1f0110fe06
use helper function for constructing state updates ( #2410 )
...
This helps preventing messages being sent with the wrong update type
and payload combination, and it is shorter/neater.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 13:49:59 +01:00
Kristoffer Dalby
b92bd3d27e
remove oidc migration ( #2411 )
...
* remove oidc migration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 13:49:45 +01:00
Kristoffer Dalby
3bf7d5a9c9
add git hash to binary, print on startup ( #2415 )
...
* add git hash to binary, print on startup
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 13:49:34 +01:00
Kristoffer Dalby
1d65865425
make version info in bug template more explicit ( #2413 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 11:36:00 +01:00
Kristoffer Dalby
c53ff2ce00
update changelog ( #2414 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 11:32:01 +01:00
Kristoffer Dalby
b4ac8cd9a3
hscontrol/db: add migration setting non existing pak on nodes to null ( #2412 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-07 10:22:23 +01:00
Nbelles
22277d1fc7
Spell check
2025-02-05 17:29:30 +01:00
Kristoffer Dalby
9ae3570154
drop versions older than 1.62 ( #2405 )
2025-02-05 12:02:32 +01:00
Florian Preinstorfer
f12cb2e048
Headscale now updates the user profile
2025-02-05 11:05:03 +01:00
Florian Preinstorfer
8c09afe20c
Headscale implements a single tailnet
...
Separate the term "tailnet" from user and be more explicit about
providing a single tailnet.
Also be more explicit about users. Refer to "headscale users" when
mentioning commandline invocations and use the term "local users" when
discussing unix accounts.
Fixes : #2335
2025-02-05 11:05:03 +01:00
Kristoffer Dalby
8b92c017ec
add 1.80 to capver and update deps ( #2394 )
2025-02-05 07:17:51 +01:00
github-actions[bot]
9a7890d56b
flake.lock: Update ( #2402 )
2025-02-02 07:58:12 +00:00
Kristoffer Dalby
45752db0f6
Return better web errors to the user ( #2398 )
...
* add dedicated http error to propagate to user
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* classify user errors in http handlers
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* move validation of pre auth key out of db
This move separates the logic a bit and allow us to
write specific errors for the caller, in this case the web
layer so we can present the user with the correct error
codes without bleeding web stuff into a generic validate.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-01 15:25:18 +01:00
Kristoffer Dalby
1c7f3bc440
no edit of oidc users, minimum hostname length ( #2393 )
...
* return an error when renaming users from OIDC
* set minimum hostname length of 2
2025-02-01 09:40:37 +00:00
Kristoffer Dalby
9bd143852f
do not allow preauth keys to be deleted if assigned to node ( #2396 )
...
* do not allow preauth keys to be deleted if assigned to node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-01 10:31:13 +01:00
Kristoffer Dalby
d57a55c024
Rewrite authentication flow ( #2374 )
2025-02-01 09:16:51 +00:00
Kristoffer Dalby
e172c29360
initial capver packet tracking version ( #2391 )
...
* initial capver packet tracking version
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Log the minimum version as client version, not only capver
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove old versions
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use capver for integration tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* patch through m and n key
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-30 21:49:09 +00:00
Kristoffer Dalby
cd3b8e68ff
clean up handler methods, common logging ( #2384 )
...
* clean up handler methods, common logging
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* streamline http.Error calls
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-30 22:40:29 +01:00
nblock
f44b1d37c4
Remove routes without a node_id ( #2386 )
...
The routes table has a NOT NULL constraint on node_id.
Fixes : #2376
2025-01-30 14:57:06 +01:00
Kristoffer Dalby
7ba6ad3489
simplify findUserByToken in ACL, add missing testcases ( #2388 )
...
* update users doc on unique constraints
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* simplify finduser func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add initial tests for findUserFromToken
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-30 11:35:49 +01:00
Kristoffer Dalby
2c279e0a7b
create and rename usernames validated by new func ( #2381 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-27 22:58:10 +01:00
Kristoffer Dalby
4c8e847f47
use dedicated registration ID for auth flow ( #2337 )
2025-01-26 22:20:11 +01:00
github-actions[bot]
97e5d95399
flake.lock: Update ( #2378 )
2025-01-26 15:33:51 +00:00
Kristoffer Dalby
d1dbe4ece9
fix panic if derp update is 0 ( #2368 )
...
* fix panic if derp update is 0
Fixes #2362
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-23 16:16:12 +01:00
Kristoffer Dalby
9e3f945eda
fix postgres migration issue with 0.24 ( #2367 )
...
* fix postgres migration issue with 0.24
Fixes #2351
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add postgres migration test for 2351
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-23 14:58:42 +01:00
Kristoffer Dalby
615ee5df75
make it harder to insert invalid routes ( #2371 )
...
* make it harder to insert invalid routes
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* dont panic if node is not available for route
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-23 13:40:23 +01:00
Kristoffer Dalby
c1f42cdf4b
relax user validation to allow emails, add tests from various oidc providers ( #2364 )
...
* relax user validation to allow emails, add tests from various oidc providers
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-22 18:10:15 +01:00
github-actions[bot]
aa76980b43
flake.lock: Update ( #2353 )
2025-01-19 09:59:29 +00:00
Kristoffer Dalby
5b986ed0a7
set oidc.map_legacy_users false ( #2350 )
2025-01-17 14:44:04 +00:00
Kristoffer Dalby
8076c94444
Release docs 0.24 ( #2349 )
...
* correct changelog date
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update docs version and copyright
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix deprecated goreleaser key and DRY
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-17 12:57:13 +00:00
Kristoffer Dalby
e88406e837
set changelog date ( #2347 )
2025-01-17 12:01:06 +01:00
Kristoffer Dalby
e4a3dcc3b8
use headscale server url as domain instead of base_domain ( #2338 )
2025-01-16 18:05:20 +01:00
Kristoffer Dalby
caad5c613d
fix nil pointer deref ( #2339 )
2025-01-16 18:05:05 +01:00
Kristoffer Dalby
38aef77e54
allow @ and Log if OIDC username is not consider valid ( #2340 )
2025-01-16 18:04:54 +01:00
Dmitry Gordin
1ab7b315a2
Update apple.md for latest version of iOS ( #2321 )
...
The official iOS app now has a simpler login process for custom instances, directly within the app.
2025-01-13 12:09:53 +00:00
github-actions[bot]
610597bfb7
flake.lock: Update ( #2342 )
2025-01-12 18:54:59 +00:00
Stefan Majer
ede4f97a16
Fix typos
2025-01-09 10:38:25 +01:00
Kristoffer Dalby
fa641e38b8
Set CSRF cookies for OIDC ( #2328 )
...
* set state and nounce in oidc to prevent csrf
Fixes #2276
* try to fix new postgres issue
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-01-08 16:29:37 +01:00
github-actions[bot]
41bad2b9fd
flake.lock: Update ( #2324 )
2025-01-05 07:35:18 +00:00
github-actions[bot]
f9bbfa5eab
flake.lock: Update ( #2320 )
2024-12-29 11:41:52 +00:00
Rorical
b81420bef1
feat: Add PKCE Verifier for OIDC ( #2314 )
...
* feat: add PKCE verifier for OIDC
* Update CHANGELOG.md
2024-12-22 16:46:36 +00:00
github-actions[bot]
9313e5b058
flake.lock: Update ( #2313 )
2024-12-22 07:07:26 +00:00
Kristoffer Dalby
770f3dcb93
fix tags not resolving to username if email is present ( #2309 )
...
* ensure valid tags is populated on user gets too
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* ensure forced tags are added
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove unused envvar in test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* debug log auth/unauth tags in policy man
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* defer shutdown in tags test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add tag test with groups
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add email, display name, picture to create user
Updates #2166
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add ability to set display and email to cli
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add email to test users in integration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix issue where tags were only assigned to email, not username
Fixes #2300
Fixes #2307
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* expand principles to correct login name
and if fix an issue where nodeip principles might not expand to all
relevant IPs instead of taking the first in a prefix.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix ssh unit test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update cli and oauth tests for users with email
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* index by test email
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix last test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-19 13:10:10 +01:00
Kristoffer Dalby
af4508b9dc
bump deps ( #2308 )
...
* Bump go crypto
Closes #2281
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* upgrade tailscale
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* upgrade rest
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* nix: flake update
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-17 15:35:42 +01:00
Florian Preinstorfer
bbc93a90a2
Set title for code listings
2024-12-17 14:08:34 +01:00
Florian Preinstorfer
0acb2b5647
Misc doc updates
2024-12-17 14:08:34 +01:00
Florian Preinstorfer
3269cfdca0
Mention reload and SIGHUP when editing the ACL policy file
...
Fixes : #2284
2024-12-17 14:08:34 +01:00
Florian Preinstorfer
319ce67c87
Update DNS documentation for dns.extra_records_path
...
* Describe both ways to add extra DNS records
* Use "extra" instead of "custom" to align with the configuration file
* Include dns.extra_records_path in the configuration file
2024-12-17 14:08:34 +01:00
Florian Preinstorfer
47b405d6c6
Changelog: support client verify for DERP
...
and fix some links
Ref: #2304
2024-12-17 14:08:34 +01:00
Florian Preinstorfer
65304a0ce7
Remove sealos documentation
...
The referenced version is outdated (0.23.0-beta1) and seems
unmaintained.
2024-12-17 14:08:34 +01:00
Dongjun Na
e270169c13
Add -race Flag to GitHub Action and Fix Data Race in CreateTailscaleNodesInUser ( #2038 )
...
* Add -race flag to Makefile and integration tests; fix data race in CreateTailscaleNodesInUser
* Fix data race in ExecuteCommand by using local buffers and mutex
Signed-off-by: Dongjun Na <kmu5544616@gmail.com >
* lint
Signed-off-by: Dongjun Na <kmu5544616@gmail.com >
---------
Signed-off-by: Dongjun Na <kmu5544616@gmail.com >
2024-12-17 14:06:57 +01:00
Shaw Drastin
7d937c6bd0
Correct macOS GUI connect guide because there's no ALT key on a mac ( #2306 )
...
* Correct macOS GUI connect guide because there's no ALT key on a mac
* also correct macOS GUI connect in hscontrol text
2024-12-17 12:11:27 +00:00
Kristoffer Dalby
ccc895b4c6
fixes to extra-record file watcher ( #2298 )
...
* Fix excess error message during writes
Fixes #2290
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* retry filewatcher on removed files
This should handled if files are deleted and added again, and for rename
scenarios.
Fixes #2289
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* test more write and remove in filewatcher
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-16 11:26:56 +01:00
Kristoffer Dalby
5345f19693
fix issue where some oidc claim bools are sent as string ( #2297 )
...
Jumpcloud send invalid json, so we need to handle it.
Fixes #2293
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-16 11:26:32 +01:00
Kristoffer Dalby
ec8729b772
fix sighup issue with empty acl ( #2296 )
...
Fixes #2291
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-16 07:48:19 +01:00
github-actions[bot]
e00b9d9a91
flake.lock: Update ( #2294 )
2024-12-15 06:46:14 +00:00
Kristoffer Dalby
58d089ce0a
fix deletion of exit routes without nodes ( #2286 )
...
Fixes #2259
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-13 20:15:24 +01:00
Kristoffer Dalby
76d26a7eec
update oidc part of changelog for 0.24.0 ( #2285 )
2024-12-13 12:35:24 +00:00
Kristoffer Dalby
380fcdba17
Add worker reading extra_records_path from file ( #2271 )
...
* consolidate scheduled tasks into one goroutine
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* rename Tailcfg dns struct
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add dns.extra_records_path option
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* prettier lint
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* go-fmt
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-13 07:52:40 +00:00
Florian Preinstorfer
89a648c7dd
Remove use_username_in_magic_dns option
...
Upgrade the use of dns.use_username_in_magic_dns or
dns_config.use_username_in_magic_dns to a fatal error and remove the
option from the example configuration and integration tests.
Fixes : #2219
2024-12-11 18:39:35 +01:00
Vitalij Dovhanyc
697d80d5a8
chore: configure some actions to be skipped for forks ( #2005 )
...
* chore: configure some actions to be skipped for forks
* chore: build docs only when it changes
2024-12-11 16:44:37 +01:00
Kristoffer Dalby
757defa2f2
run cross compile of headscale as part of build ( #2270 )
2024-12-10 16:26:53 +01:00
Kristoffer Dalby
64fd1f9483
restructure command/api to use stable IDs ( #2261 )
2024-12-10 16:23:55 +01:00
Kristoffer Dalby
08bd4b9bc5
fix docker network caps ( #2273 )
...
Docker releases a patch release which changed the required permissions to be able to do tun devices in containers, this caused all containers to fail in tests causing us to fail all tests. This fixes it, and adds some tools for debugging in the future.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-12-09 16:15:38 +00:00
github-actions[bot]
26d91ae513
flake.lock: Update ( #2266 )
2024-12-08 09:10:42 +00:00
Florian Preinstorfer
75e74117db
Add FAQ entry on which database to use
...
Fixes : #2257
2024-12-04 06:08:44 +01:00
Florian Preinstorfer
d2a86b1ef2
Fix broken indent
2024-12-04 06:08:44 +01:00
Florian Preinstorfer
0d3cf74098
Fix README links to point to the stable version
2024-12-04 06:08:44 +01:00
Florian Preinstorfer
44456497b0
Add versioned documentation
...
Setup mike to provide versioned builds of the documentation.
The goal is to have versioned docs for stable releases (0.23.0, 0.24.0)
and development docs that can progress along with the code. This allows
us to tailor docs to the next upcoming version as we no longer need to
care about diversion between rendered docs and the latest release.
Versions:
* development (alias: unstable) on each push to the main branch
* MAJOR.MINOR.PATCH (alias: stable, latest for the newest version)
* for each "final" release tag
* for each push to doc maintenance branches: doc/MAJOR.MINOR.PATCH
The default version should the current stable version. The doc
maintenance branches may be used to update the version specific
documentation when issues arise after a release.
2024-12-02 16:51:50 +01:00
Florian Preinstorfer
7512e236d6
Bump deprecated github actions
2024-11-27 09:52:08 +01:00
Kristoffer Dalby
f7b0cbbbea
wrap policy in policy manager interface ( #2255 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-26 15:16:06 +01:00
github-actions[bot]
2c1ad6d11a
flake.lock: Update ( #2254 )
2024-11-24 09:42:22 +00:00
Kristoffer Dalby
fffd23602b
Resolve user to stable unique ID in policy ( #2205 )
2024-11-24 00:13:27 +01:00
Kristoffer Dalby
3a2589f1a9
rename dockerfile to integration to avoid confusion ( #2225 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:36 +00:00
Kristoffer Dalby
f6276ab9d2
fix postgres constraints, add postgres testing
...
This commit fixes the constraint syntax so it is both valid for
sqlite and postgres.
To validate this, I've added a new postgres testing library and a
helper that will spin up local postgres, setup a db and use it in
the constraints tests. This should also help testing db stuff in
the future.
postgres has been added to the nix dev shell and is now required
for running the unit tests.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
7d9b430ec2
fix constraints
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
3780c9fd69
fix nil in test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
281025bb16
fix constraints
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
5e7c3153b9
nits
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
7ba0c3d515
use userID instead of username everywhere
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
4b58dc6eb4
make preauthkey tags test stable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
4dd12a2f97
fix oidc test, add tests for migration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
2fe65624c0
restore strip_email_domain for migration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
35b669fe59
add iss to identifier, only set email if verified
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
dc07779143
add @ to end of username if not present
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
d72663a4d0
remove log print
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
0a82d3f17a
update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
78214699ad
Harden OIDC migration and make optional
...
This commit hardens the migration part of the OIDC from
the old username based approach to the new sub based approach
and makes it possible for the operator to opt out entirely.
Fixes #1990
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-23 21:14:55 +01:00
Kristoffer Dalby
64bb56352f
make configurable wal auto checkpoint ( #2242 )
2024-11-23 21:03:48 +01:00
nblock
dc17b4d378
Documentation dependencies ( #2252 )
...
* Use a trailing slash
recommended by mkdocs-material
* Update doc requirements
Let mkdocs-material resolve its imaging dependencies (cairosvg and
pillow) and fix a dependabot warning along the way.
Reference compatible versions by major.minor.
2024-11-22 16:52:36 +00:00
Kristoffer Dalby
a6b19e85db
more linter fixups ( #2212 )
...
* linter fixes
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* conf
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update nix hash
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-22 15:54:58 +00:00
ArcticLampyrid
edf9e25001
feat: support client verify for derp (add integration tests) ( #2046 )
...
* feat: support client verify for derp
* docs: fix doc for integration test
* tests: add integration test for DERP verify endpoint
* tests: use `tailcfg.DERPMap` instead of `[]byte`
* refactor: introduce func `ContainsNodeKey`
* tests(dsic): use string builder for cmd args
* ci: fix tests order
* tests: fix derper failure
* chore: cleanup
* tests(verify-client): perfer to use `CreateHeadscaleEnv`
* refactor(verify-client): simplify error handling
* tests: fix `TestDERPVerifyEndpoint`
* refactor: make `doVerify` a seperated func
---------
Co-authored-by: 117503445 <t117503445@gmail.com >
2024-11-22 13:23:05 +01:00
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
enoperm
5fbf3f8327
Websocket derp test fixes ( #2247 )
...
* integration testing: add and validate build-time options for tailscale head
* fixup! integration testing: add and validate build-time options for tailscale head
integration testing: comply with linter
* fixup! fixup! integration testing: add and validate build-time options for tailscale head
integration testing: tsic.New must never return nil
* fixup! fixup! fixup! integration testing: add and validate build-time options for tailscale head
* minor fixes
2024-11-22 11:57:01 +01:00
Nathan Sweet
6275399327
Update tls.md to mention using the full cert chain ( #2243 )
2024-11-18 06:12:12 +00:00
nblock
29119bb7f4
Misc doc fixes ( #2240 )
...
* Link back to node registration docs
* adjust wording in apple docs
* Mention client specific page to check if headscale works
Ref: #2238
2024-11-18 05:46:58 +01:00
github-actions[bot]
93ba21ede5
flake.lock: Update ( #2239 )
2024-11-17 19:38:50 +00:00
nblock
a7874af3d0
Use discord server invite link ( #2235 )
...
Replace channel links with links to discord invite link and remove
channel list.
Fixes : #1521
2024-11-16 07:06:15 +01:00
nblock
e7245856c5
Refresh remote CLI documentation ( #2216 )
...
* Document to either use a minimal configuration file or environment
variables to connect with a remote headscale instance.
* Document a workaround specific for headscale 0.23.0.
* Remove reference to ancient headscale version.
* Use `cli.insecure: true` or `HEADSCALE_CLI_INSECURE=1` to skip
certificate verification.
* Style and typo fixes
Ref: #2193
2024-11-13 18:35:42 +01:00
nblock
2345c38e1e
Add a page for third-party tools ( #2217 )
...
* Remove status from web-ui docs
Rename the title to indicate that there multiple web interfaces
available. Do not track the status of each web interface here as their
status is subject to change over time.
* Add page for third-party tools and scripts
2024-11-12 16:53:30 +01:00
github-actions[bot]
8cfaa6bdac
flake.lock: Update ( #2222 )
2024-11-12 13:27:49 +00:00
docgalaxyblock
4e44d57bf7
fix: missing stable-debug tag ( #2232 )
...
Fixes #2171
2024-11-11 06:06:44 +00:00
Philip Henning
0089ceaf1d
Feature tvos documentation ( #2226 )
...
* Add usage documentation for tvOS
* lint and format
* Change admonition to mkdocs flavoured style
* fix typos
* Update hscontrol/templates/apple.go
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
* change outer quoting for where quoting in-text is used
---------
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2024-11-07 14:56:18 +00:00
nblock
9a46c5763c
Handle /derp/latency-check ( #2227 )
...
According to 15fc6cd966
the routes `/derp/probe` and `/derp/latency-check` are the same and
different versions of the tailscale client use one or the other
endpoint.
Also handle /derp/latency-check
Fixes : #2211
2024-11-06 15:59:38 +01:00
Kristoffer Dalby
a71a933705
add nblock to doc owners ( #2207 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-11-04 10:12:50 -06:00
github-actions[bot]
0c98d09783
Update flake.lock ( #2195 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/e2f08f4d8b3ecb5cf5c9fd9cb2d53bb3c71807da?narHash=sha256-CAZF2NRuHmqTtRTNAruWpHA43Gg2UvuCNEIzabP0l6M%3D' (2024-10-05)
→ 'github:NixOS/nixpkgs/41dea55321e5a999b17033296ac05fe8a8b5a257?narHash=sha256-WvLXzNNnnw%2BqpFOmgaM3JUlNEH%2BT4s22b5i2oyyCpXE%3D' (2024-10-25)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-29 14:16:10 +00:00
Kristoffer Dalby
e2d5ee0927
cleanup linter warnings ( #2206 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-23 10:45:59 -05:00
Kristoffer Dalby
028d9aab73
add new user fields to grpc and list command ( #2202 )
...
Updates #2166
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-18 14:20:03 +00:00
hopleus
b6dc6eb36c
#2140 Fixed reflection of hostname change ( #2199 )
...
* #2140 Fixed updating of hostname and givenName when it is updated in HostInfo
* #2140 Added integration tests
* #2140 Fix unit tests
* Changed IsAutomaticNameMode to GivenNameHasBeenChanged. Fixed errors in files according to golangci-lint rules
2024-10-17 09:45:33 -06:00
Goran Draganić
45c9585b52
feat: derpmap field in config ( #1823 )
2024-10-17 05:34:20 -06:00
hopleus
cc42fc394a
#2177 Added conversion of 'Hostname' to 'givenName' in a node with FQDN rules applied ( #2198 )
2024-10-15 18:33:03 +02:00
hopleus
52a3b54ba2
Fixed loginUrl with "WithTLS()" used. Added "WithTLS()" to scenario integration tests ( #2187 )
2024-10-15 14:38:43 +02:00
Pepper
0602304cea
Add headplane
...
Add headplane to the list of UI's
2024-10-11 16:32:33 +02:00
nblock
8c7d8ee34f
Restructure headscale documentation ( #2163 )
...
* Setup mkdocs-redirects
* Restructure existing documentation
* Move client OS support into the documentation
* Move existing Client OS support table into its own documentation page
* Link from README.md to the rendered documentation
* Document minimum Tailscale client version
* Reuse CONTRIBUTING.md" in the documentation
* Include "CONTRIBUTING.md" from the repository root
* Update FAQ and index page and link to the contributing docs
* Add configuration reference
* Add a getting started page and explain the first steps with headscale
* Use the existing "Using headscale" sections and combine them into a
single getting started guide with a little bit more explanation.
* Explain how to get help from the command line client.
* Remove duplicated sections from existing installation guides
* Document requirements and assumptions
* Document packages provided by the community
* Move deb install guide to official releases
* Move manual install guide to official releases
* Move container documentation to setup section
* Move sealos documentation to cloud install page
* Move OpenBSD docs to build from source
* Simplify DNS documentation
* Add sponsor page
* Add releases page
* Add features page
* Add help page
* Add upgrading page
* Adjust mkdocs nav
* Update wording
Use the term headscale for the project, Headscale on the beginning of a
sentence and `headscale` when refering to the CLI.
* Welcome to headscale
* Link to existing documentation in the FAQ
* Remove the goal header and use the text as opener
* Indent code block in OIDC
* Make a few pages linter compatible
Also update ignored files for prettier
* Recommend HTTPS on port 443
Fixes : #2164
* Use hosts in acl documentation
thx @efficacy38 for noticing this
Ref: #1863
* Use mkdocs-macros to set headscale version once
2024-10-10 15:24:04 +02:00
hopleus
b3cda08af6
#2178 Fixed processing of fields in post request in MoveNode rpc ( #2179 )
...
* #2178 Fixed processing of fields in post request in MoveNode rpc
* #2178 Updated CHANGELOG.md
2024-10-09 09:36:47 +02:00
github-actions[bot]
101ca7f4a2
Update flake.lock ( #2173 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/b5b2fecd0cadd82ef107c9583018f381ae70f222?narHash=sha256-k6YxGj08voz9NvuKExojiGXAVd69M8COtqWSKr6sQS4%3D' (2024-09-28)
→ 'github:NixOS/nixpkgs/e2f08f4d8b3ecb5cf5c9fd9cb2d53bb3c71807da?narHash=sha256-CAZF2NRuHmqTtRTNAruWpHA43Gg2UvuCNEIzabP0l6M%3D' (2024-10-05)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-06 12:00:59 +00:00
Amha Mersha
24e7851a40
Changed all the html into go using go-elem ( #2161 )
...
* Changed all the HTML into go using go-elem
Created templates package in ./hscontrol/templates.
Moved the registerWebAPITemplate into the templates package as a function to be called.
Replaced the apple and windows html files with go-elem.
* update flake
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-04 11:39:24 +00:00
Kristoffer Dalby
9515040161
make reauth test compat with tailscale head ( #2167 )
...
* make reauth test compat with tailscale head
tailscale/tailscale@1eaad7d broke our reauth test as it makes the client
retry with https/443 if it reconnects within 2 minutes.
This commit fixes this by running the test as a two part,
- with https, to confirm instant reconnect works
- with http, and a 3 min wait, to check that it work without.
The change is not a general consern as headscale in prod is ran
with https.
Updates #2164
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* sort test for stable order
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-03 12:01:48 +02:00
Kristoffer Dalby
e16ea2ee69
set hostinfo,ipv* columns explicitly ( #2165 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-02 18:12:25 +02:00
Kristoffer Dalby
218138afee
Redo OIDC configuration ( #2020 )
...
expand user, add claims to user
This commit expands the user table with additional fields that
can be retrieved from OIDC providers (and other places) and
uses this data in various tailscale response objects if it is
available.
This is the beginning of implementing
https://docs.google.com/document/d/1X85PMxIaVWDF6T_UPji3OeeUqVBcGj_uHRM5CI-AwlY/edit
trying to make OIDC more coherant and maintainable in addition
to giving the user a better experience and integration with a
provider.
remove usernames in magic dns, normalisation of emails
this commit removes the option to have usernames as part of MagicDNS
domains and headscale will now align with Tailscale, where there is a
root domain, and the machine name.
In addition, the various normalisation functions for dns names has been
made lighter not caring about username and special character that wont
occur.
Email are no longer normalised as part of the policy processing.
untagle oidc and regcache, use typed cache
This commits stops reusing the registration cache for oidc
purposes and switches the cache to be types and not use any
allowing the removal of a bunch of casting.
try to make reauth/register branches clearer in oidc
Currently there was a function that did a bunch of stuff,
finding the machine key, trying to find the node, reauthing
the node, returning some status, and it was called validate
which was very confusing.
This commit tries to split this into what to do if the node
exists, if it needs to register etc.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-02 14:50:17 +02:00
Kristoffer Dalby
bc9e83b52e
use gorm serialiser instead of custom hooks ( #2156 )
...
* add sqlite to debug/test image
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* test using gorm serialiser instead of custom hooks
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-02 11:41:58 +02:00
Kristoffer Dalby
3964dec1c6
use tsaddr library and cleanups ( #2150 )
...
* resuse tsaddr code instead of handrolled
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* ensure we dont give out internal tailscale IPs
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use prefix instead of string for routes
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove old custom compare func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* trim unused util code
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-10-02 09:06:09 +02:00
Jacob Yundt
63035cdb5a
Update headscale user creation settings in .deb ( #2134 )
...
* Update headscale user creation settings in .deb
Update the headscale user settings to:
- shell = /usr/sbin/nologin
- home-dir = /var/lib/headscale
This syncs the .deb installation behavior with the current Linux docs:
fe68f50328/docs/running-headscale-linux-manual.md (L39-L45)
Fixes juanfont/headscale#2133
* slight refactor to use existing variables.
* Fixup for HOME_DIR var
2024-09-29 11:00:52 +00:00
Kristoffer Dalby
5eda9c8d2d
denormalise PreAuthKey tags ( #2155 )
...
this commit denormalises the Tags related to a Pre auth key
back onto the preauthkey table and struct as a string list.
There was not really any real normalisation here as we just added
a bunch of duplicate tags with new IDs and preauthkeyIDs, lots of
GORM cermony but no actual advantage.
This work is the start to fixup tags which currently are not working
as they should.
Updates #1369
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-29 13:00:27 +02:00
github-actions[bot]
49ce5734fc
flake.lock: Update ( #2158 )
2024-09-29 08:24:08 +00:00
Hazel Atkinson
204a102389
Add ouroboros to web ui list ( #2154 )
2024-09-27 09:16:18 +02:00
Robert Schütz
2c974dd72d
MagicDNS no longer requires nameservers ( #1681 )
...
According to https://tailscale.com/kb/1081/magicdns#accessing-devices-over-magicdns ,
> MagicDNS does not require a DNS nameserver if running Tailscale v1.20 or later.
2024-09-26 19:09:19 +00:00
nblock
e367454745
Add -it to docker exec ( #2148 )
...
Some commands such as `nodes delete` require user interaction and they
fail if `-it` is no supplied to `docker exec`. Use `docker exec -it` in
documentation examples to also make them work in interactive commands.
2024-09-25 09:52:28 +02:00
Kristoffer Dalby
4f2fb65929
remove versions older than 1.56 ( #2149 )
...
* remove versions older than 1.56
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove code no longer needed for new clients
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-24 18:34:20 +02:00
David Mell
07b596d3cc
Allow nodes to use SSH agent forwarding ( #2145 )
2024-09-23 11:59:16 +02:00
github-actions[bot]
f3fca8302a
flake.lock: Update ( #2143 )
2024-09-22 09:46:04 +00:00
enoperm
1e61084898
Add compatibility with only websocket-capable clients ( #2132 )
...
* handle control protocol through websocket
The necessary behaviour is already in place,
but the wasm build only issued GETs, and the handler was not invoked.
* get DERP-over-websocket working for wasm clients
* Prepare for testing builtin websocket-over-DERP
Still needs some way to assert that clients are connected through websockets,
rather than the TCP hijacking version of DERP.
* integration tests: properly differentiate between DERP transports
* do not touch unrelated code
* linter fixes
* integration testing: unexport common implementation of derp server scenario
* fixup! integration testing: unexport common implementation of derp server scenario
* dockertestutil/logs: remove unhelpful comment
* update changelog
---------
Co-authored-by: Csaba Sarkadi <sarkadicsa@tutanota.de >
2024-09-21 12:05:36 +02:00
Kristoffer Dalby
10a72e8d54
update changelog for 0.23 release ( #2138 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-18 09:43:08 +01:00
Kristoffer Dalby
ed78ecda12
add shutdown that asserts if headscale had panics ( #2126 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-17 11:44:55 +02:00
github-actions[bot]
6cbbcd859c
flake.lock: Update ( #2135 )
2024-09-16 06:15:45 +00:00
nblock
e9d9c0773c
Exclude irrelevant files from mkdocs rendering ( #2136 )
2024-09-16 06:13:45 +00:00
nblock
fe68f50328
Use headscale.example.com ( #2122 )
2024-09-11 16:46:06 +00:00
nblock
c3ef90a7f7
Update documentation for Apple ( #2117 )
...
* Rename docs/ios-client.md to docs/apple-client.md. Add instructions
for macOS; those are copied from the /apple endpoint and slightly
modified. Fix doc links in the README.
* Move infoboxes for /apple and /windows under the "Goal" section to the
top. Those should be seen by users first as they contain *their*
specific headscale URL.
* Swap order of macOS and iOS to move "Profiles" further down.
* Remove apple configuration profiles
* Remove Tailscale versions hints
* Mention /apple and /windows in the README along with their docs
See: #2096
2024-09-11 18:43:59 +02:00
Kristoffer Dalby
064c46f2a5
move logic for validating node names ( #2127 )
...
* move logic for validating node names
this commits moves the generation of "given names" of nodes
into the registration function, and adds validation of renames
to RenameNode using the same logic.
Fixes #2121
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix double arg
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-11 18:27:49 +02:00
Kristoffer Dalby
64319f79ff
make stream shutdown if self-node has been removed ( #2125 )
...
* add shutdown that asserts if headscale had panics
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add test case producing 2118 panic
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make stream shutdown if self-node has been removed
Currently we will read the node from database, and since it is
deleted, the id might be set to nil. Keep the node around and
just shutdown, so it is cleanly removed from notifier.
Fixes #2118
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-11 12:00:32 +02:00
Kristoffer Dalby
4b02dc9565
make cli mode respect log.level ( #2124 )
...
Fixes #2119
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-11 10:43:22 +02:00
Kristoffer Dalby
7be8796d87
dont override golangci go ( #2116 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-09 14:29:09 +02:00
curlwget
99f18f9cd9
chore: fix some comments ( #2069 )
2024-09-09 14:17:25 +02:00
github-actions[bot]
c3b260a6f7
flake.lock: Update ( #2111 )
2024-09-09 14:16:35 +02:00
Kristoffer Dalby
60b94b0467
Fix slow shutdown ( #2113 )
...
* rearrange shutdown
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* http closed is fine
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* logging while shutting
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-09 14:10:22 +02:00
nblock
bac7ea67f4
Simplify windows setup instructions ( #2114 )
...
* Simplify /windows to the bare minimum. Also remove the
/windows/tailscale.reg endpoint as its generated file is no longer
valid for current Tailscale versions.
* Update and simplify the windows documentation accordingly.
* Add a "Unattended mode" section to the troubleshooting section
explaining how to enable "Unattended mode" in the via the Tailscale
tray icon.
* Add infobox about /windows to the docs
Tested on Windows 10, 22H2 with Tailscale 1.72.0
Replaces: #1995
See: #2096
2024-09-09 13:18:16 +02:00
nblock
5597edac1e
Remove version and update setup instructions for Android ( #2112 )
2024-09-09 06:57:50 +00:00
Kristoffer Dalby
8a3a0fee3c
Only load needed part of configuration ( #2109 )
2024-09-07 09:23:58 +02:00
Kristoffer Dalby
f368ed01ed
2068 AutoApprovers tests ( #2105 )
...
* replace old suite approved routes test with table driven
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add test to reproduce issue
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add integration test for 2068
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-05 16:46:20 +02:00
Kristoffer Dalby
adc084f20f
add no stalebot exception ( #2107 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-05 14:00:36 +02:00
Kristoffer Dalby
42d2c27853
fix goreleaser warnings ( #2106 )
...
* add version to goreleaser config
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* rename deprected setting
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-05 14:00:19 +02:00
nblock
1c34101e72
Remove outdated proposals ( #2104 )
...
Fixes : #2101
2024-09-05 11:50:10 +00:00
greizgh
6609f60938
actually lint file on CI ( #2018 )
...
* replace deprecated golangci-lint output format
CI was producing this kind of messages:
> [config_reader] The output format `github-actions` is deprecated, please use `colored-line-number`
* Actually lint files on CI
2024-09-05 13:37:05 +02:00
nblock
35bfe7ced0
Add support for service reload and sync service file ( #2102 )
...
* Add support for service reload and sync service file
* Copy the systemd.service file to the manual linux docs and adjust the
path to the headscale binary to match with the previous documentation
blocks. Unfortunately, there seems to be no easy way to include a
file in mkdocs.
* Remove a redundant "deprecation" block. The beginning of the
documentation already states that.
* Add `ExecReload` to the systemd.service file.
Fixes : #2016
* Its called systemd
* Fix link to systemd homepage
2024-09-05 10:08:50 +00:00
nblock
e43d6a0361
Move flags after the command ( #2100 )
...
The built-in help also shows flags to given after the command. Align
documentation examples accordingly.
2024-09-04 12:38:38 +00:00
Kristoffer Dalby
f039caf134
update godeps ( #2098 )
2024-09-04 07:55:16 +02:00
nblock
d66c5e144f
Update documentation for 0.23 ( #2096 )
...
* docs/acl: fix path to policy file
* docs/exit-node: fixup for 0.23
* Add newlines between commands to improve readability
* Use nodes instead on name
* Remove query parameter from link to Tailscale docs
* docs/remote-cli: fix formatting
* Indent blocks below line numbers to restore numbering
* Fix minor typos
* docs/reverse-proxy: remove version information
* Websocket support is always required now
* s/see detail/see details
* docs/exit-node: add warning to manual documentation
* Replace the warning section with a warning admonition
* Fix TODO link back to the regular linux documentation
* docs/openbsd: fix typos
* the database is created on-the-fly
* docs/sealos: fix typos
* docs/container: various fixes
* Remove a stray sentence
* Remove "headscale" before serve
* Indent line continuation
* Replace hardcoded 0.22 with <VERSION>
* Fix path in debug image to /ko-app/headscale
Fixes : #1822
aa
2024-09-03 11:04:20 +00:00
Mike Poindexter
3101f895a7
Fix 764 ( #2093 )
...
* Fix KeyExpiration when a zero time value has a timezone
When a zero time value is loaded from JSON or a DB in a way that
assigns it the local timezone, it does not roudtrip in JSON as a
value for which IsZero returns true. This causes KeyExpiry to be
treated as a far past value instead of a nilish value.
See https://github.com/golang/go/issues/57040
* Fix whitespace
* Ensure that postgresql is used for all tests when env var is set
* Pass through value of HEADSCALE_INTEGRATION_POSTGRES env var
* Add option to set timezone on headscale container
* Add test for registration with auth key in alternate timezone
2024-09-03 09:22:17 +02:00
nblock
aa0f3d43cc
Fix typo in example config ( #2095 )
2024-09-02 06:18:16 +00:00
nblock
ed71d230eb
Remove references to tests/acls from the documentation ( #2088 )
2024-09-01 13:09:47 +00:00
github-actions[bot]
976cbfa630
flake.lock: Update ( #2078 )
2024-09-01 13:08:57 +00:00
nblock
a9a1a07e37
Use dns: as config key ( #2092 )
2024-09-01 13:08:06 +00:00
Kristoffer Dalby
1193a50e9e
oldest client supported, not latest ( #2086 )
2024-08-30 16:59:37 +02:00
Kristoffer Dalby
cb0e2e4476
various doc updates in prep for 0.23 ( #2091 )
...
* various doc updates in prep for 0.23
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add note discouraging postgresql
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Update docs/faq.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* remove entry for glossary in doc
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix typo
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-08-30 16:59:24 +02:00
Kristoffer Dalby
2b5e52b08b
validate policy against nodes, error if not valid ( #2089 )
...
* validate policy against nodes, error if not valid
this commit aims to improve the feedback of "runtime" policy
errors which would only manifest when the rules are compiled to
filter rules with nodes.
this change will in;
file-based mode load the nodes from the db and try to compile the rules on
start up and return an error if they would not work as intended.
database-based mode prevent a new ACL being written to the database if
it does not compile with the current set of node.
Fixes #2073
Fixes #2044
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* ensure stderr can be used in err checks
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* test policy set validation
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add new integration test to ghaction
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add back defer for cli tst
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-08-30 16:58:29 +02:00
Roman Zabaluev
fffd9d7ee9
Update ACLs file format docs ( #2066 )
2024-08-30 07:20:07 +00:00
Mike Poindexter
76515d12d6
Fix self notification on expiry update via oidc relogin ( #2080 )
2024-08-30 08:20:29 +02:00
Mike Poindexter
34361c6f82
Fix FKs on sqlite migrations ( #2083 )
2024-08-30 08:08:54 +02:00
Thomas Gautvedt
f4427dd29e
fix: correct a small spelling mistake ( #2081 )
2024-08-28 07:50:09 +00:00
Kristoffer Dalby
cf6a606d74
fix route table migration wiping routes 0.22 -> 0.23 ( #2076 )
2024-08-27 18:54:28 +02:00
dragon2611
827e3e83ae
Issue 2045, Feature Request ( #2071 )
...
Requiring someone to write a design doc/contribute to the feature shouldn't be a requirement for raising a feature request as users may lack the skills required to do this.
2024-08-27 11:03:51 +02:00
Kristoffer Dalby
9c4c286696
fix warning errs from beta2 ( #2075 )
...
* remove default false for use usernames causing warning
Fixes #2065
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Ensure DoH warnings are only emitted if err
Fixes #2064
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-08-23 17:17:37 +02:00
Kristoffer Dalby
a68854ac33
upgrade go (1.23) and tailscale (1.72.1) ( #2077 )
2024-08-23 15:28:54 +02:00
github-actions[bot]
9bed76d481
flake.lock: Update ( #2059 )
2024-08-19 11:05:43 +00:00
Kristoffer Dalby
84cb5d0aed
make acl_policy_path fatal if policy.path is not set ( #2041 )
2024-08-19 13:03:01 +02:00
Kristoffer Dalby
f99497340b
add coderabbit config ( #2060 )
...
Code Rabbit is one of these new fancy LLM code review tools. I am skeptical
but we can try it for free and it might provide us with some value to let
people get feedback while waiting for other people.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-08-19 10:06:55 +00:00
nadongjun
fdc034e8ae
Integrate GORM Logger with Zerolog and Add Configuration Options for Logging and Performance ( #2040 )
...
* Integrate GORM logger with zerolog and add custom GORM configuration options
* Add GormConfig struct to group GORM-related settings
* Update debug mode instruction in config-example.yaml
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
---------
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2024-08-19 11:47:52 +02:00
Kristoffer Dalby
ac8491efec
Redo DNS configuration ( #2034 )
...
this commit changes and streamlines the dns_config into a new
key, dns. It removes a combination of outdates and incompatible
configuration options that made it easy to confuse what headscale
could and could not do, or what to expect from ones configuration.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-08-19 11:41:05 +02:00
Chuangbo Li
022fb24cd9
Fix command get policy works with relative policy path ( #2051 )
2024-08-12 12:11:59 +02:00
github-actions[bot]
fcd1183805
flake.lock: Update ( #2052 )
2024-08-11 05:48:15 +00:00
Kristoffer Dalby
ece907d878
test embedded derp with derp updater, check client health ( #2030 )
2024-08-11 07:44:59 +02:00
github-actions[bot]
948d53f934
flake.lock: Update ( #2042 )
2024-08-04 06:35:46 +00:00
github-actions[bot]
06f07053eb
flake.lock: Update ( #2035 )
2024-07-28 08:42:38 +00:00
nadongjun
4ad3f3c484
Fix data race issues in EphemeralGarbageCollector tests ( #2023 )
...
* Fix data race issues in EphemeralGarbageCollector tests
* Add defer for mutex unlock in TestEphemeralGarbageCollectorOrder
* Fix mutex unlock order in closure by updating defer placement
2024-07-22 15:11:57 +00:00
Steven Honson
db7a4358e9
config-example.yaml: Remove reference to yaml for policy files ( #2022 )
2024-07-22 13:38:42 +00:00
github-actions[bot]
b799245f1e
flake.lock: Update ( #2021 )
2024-07-22 08:56:21 +02:00
greizgh
8571513e3c
reformat code ( #2019 )
...
* reformat code
This is mostly an automated change with `make lint`.
I had to manually please golangci-lint in routes_test because of a short
variable name.
* fix start -> strategy which was wrongly corrected by linter
2024-07-22 08:56:00 +02:00
Kristoffer Dalby
ca47d6f353
small cleanups ( #2017 )
2024-07-19 09:21:14 +02:00
Kristoffer Dalby
11fde62b8c
remove custom contains funcs for slices.Contains ( #2015 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-07-19 09:04:04 +02:00
Kristoffer Dalby
9e523d4687
move userprofiles into method on user struct ( #2014 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-07-19 09:03:18 +02:00
Kristoffer Dalby
7e62031444
replace ephemeral deletion logic ( #2008 )
...
* replace ephemeral deletion logic
this commit replaces the way we remove ephemeral nodes,
currently they are deleted in a loop and we look at last seen
time. This time is now only set when a node disconnects and
there was a bug (#2006 ) where nodes that had never disconnected
was deleted since they did not have a last seen.
The new logic will start an expiry timer when the node disconnects
and delete the node from the database when the timer is up.
If the node reconnects within the expiry, the timer is cancelled.
Fixes #2006
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use uint64 as authekyid and ptr helper in tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add test db helper
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add list ephemeral node func
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* schedule ephemeral nodes for removal on startup
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix gorm query for postgres
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add godoc
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-07-18 10:01:59 +02:00
Pallab Pain
58bd38a609
feat: implements apis for managing headscale policy ( #1792 )
2024-07-18 07:38:25 +02:00
Rubens Peculis
00ff288f0c
fix(1996): Implement register method enum converter ( #2013 )
...
Added a new function `RegisterMethodToV1Enum()` to Node, converting the internal register method string to the corresponding V1 Enum value. Included corresponding unit test in `node_test.go` to ensure correct conversion for various register methods.
2024-07-17 13:12:16 +02:00
greizgh
8823778d05
Add gofumpt to dev dependencies ( #2010 )
2024-07-17 13:12:02 +02:00
greizgh
74d27ee5fa
Remove deprecated linters from golangci-lint ( #2009 )
...
When running lints, golangci-lint complained about removed
linters (which were already disabled).
This removes the relevant warnings.
2024-07-17 10:08:41 +02:00
github-actions[bot]
3f60ab23a6
Update flake.lock ( #2011 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb?narHash=sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8%3D' (2024-07-05)
→ 'github:NixOS/nixpkgs/8b5a3d5a1d951344d683b442c0739010b80039db?narHash=sha256-po3TZO9kcZwzvkyMJKb0WCzzDtiHWD34XeRaX1lWXp0%3D' (2024-07-12)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-14 06:20:22 +00:00
github-actions[bot]
eb1591df35
flake.lock: Update ( #2000 )
2024-07-07 06:16:36 +00:00
github-actions[bot]
89ada557bc
flake.lock: Update ( #1991 )
2024-07-01 05:46:33 +00:00
Kristoffer Dalby
14a3f94f0c
fix search domains and remove username from magicdns ( #1987 )
2024-06-26 13:44:40 +02:00
Kristoffer Dalby
4a34cfc4a6
Make write-ahead-log default and configurable for sqlite ( #1985 )
...
* correctly enable WAL log for sqlite
this commit makes headscale correctly enable write-ahead-log for
sqlite and adds an option to turn it on and off.
WAL is enabled by default and should make sqlite perform a lot better,
even further eliminating the need to use postgres.
It also adds a couple of other useful defaults.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-06-23 22:06:59 +02:00
Kristoffer Dalby
8f8f469c0a
Remove allocations of lists before use ( #1989 )
...
* policy: remove allocs before appends in acls
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* notifier: make batcher tests stable/non-flaky
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* {db,derp,mapper}: dont allocate until append
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-06-23 22:06:50 +02:00
Lars Kiesow
69c33658f6
Fix android docs ( #1976 )
...
The current Tailscale app for Android looks and behaves differently.
This patch updates the documentation for that.
2024-06-23 00:52:23 +02:00
Kyhwana Pardus
99e91a9d8a
Update reverse-proxy.md ( #1986 )
...
Add blurb about how cloudflare proxy/tunnels is not supported/will not work
2024-06-23 00:47:26 +02:00
github-actions[bot]
dfc089ed6a
flake.lock: Update ( #1979 )
2024-06-16 20:24:08 +00:00
Lars Kiesow
51676c668b
Make registration screen easier to use ( #1975 )
2024-06-15 09:40:49 +02:00
github-actions[bot]
1f4b59566a
flake.lock: Update ( #1958 )
2024-06-09 07:23:16 +00:00
Dongjun Na
5f9c26930c
fixed typo and path ( #1960 )
2024-05-28 16:11:39 +00:00
Kristoffer Dalby
5a4e52b727
remove last_successful_update error check ( #1959 )
...
most of the time we dont even check this error and checking
the string for particular errors is very flake as different
databases (sqlite and psql) use different error messages, and
some users might have it in other languages.
Fixes #1956
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-27 11:53:37 +01:00
github-actions[bot]
51b56ba447
Update flake.lock ( #1952 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/b3fcfcfabd01b947a1e4f36622bbffa3985bdac6?narHash=sha256-iJYnKMtLi5u6hZhJm94cRNSDG5Rz6ZzIkGbhPFtDRm0%3D' (2024-05-15)
→ 'github:NixOS/nixpkgs/02923630b89aa1ab36ef8e422501a6f4fd4b2016?narHash=sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA%3D' (2024-05-18)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-24 10:30:11 +01:00
Kristoffer Dalby
c8ebbede54
Simplify map session management ( #1931 )
...
This PR removes the complicated session management introduced in https://github.com/juanfont/headscale/pull/1791 which kept track of the sessions in a map, in addition to the channel already kept track of in the notifier.
Instead of trying to close the mapsession, it will now be replaced by the new one and closed after so all new updates goes to the right place.
The map session serve function is also split into a streaming and a non-streaming version for better readability.
RemoveNode in the notifier will not remove a node if the channel is not matching the one that has been passed (e.g. it has been replaced with a new one).
A new tuning parameter has been added to added to set timeout before the notifier gives up to send an update to a node.
Add a keep alive resetter so we wait with sending keep alives if a node has just received an update.
In addition it adds a bunch of env debug flags that can be set:
- `HEADSCALE_DEBUG_HIGH_CARDINALITY_METRICS`: make certain metrics include per node.id, not recommended to use in prod.
- `HEADSCALE_DEBUG_PROFILING_ENABLED`: activate tracing
- `HEADSCALE_DEBUG_PROFILING_PATH`: where to store traces
- `HEADSCALE_DEBUG_DUMP_CONFIG`: calls `spew.Dump` on the config object startup
- `HEADSCALE_DEBUG_DEADLOCK`: enable go-deadlock to dump goroutines if it looks like a deadlock has occured, enabled in integration tests.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-24 10:15:34 +02:00
Stefan Majer
8185a70dc7
Fix typos ( #1860 )
...
* Fix typos
* trigger GitHub actions
* remove kdiff3 orig files
* fix unicode
* remove unnecessary function call
* remove unnecessary comment
* remove unnecessary comment
---------
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-05-19 23:49:27 +02:00
ohdearaugustin
2dc62e981e
move debug image to distroless ( #1950 )
2024-05-19 11:17:37 +02:00
Kristoffer Dalby
5ad0aa44cb
update tailscale go dep ( #1948 )
...
* update tailscale go dep
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update gorm go dep
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update grpc go dep
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update golang.org go dep
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update rest of go dep
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-17 08:58:33 -04:00
github-actions[bot]
723a0408a3
flake.lock: Update ( #1897 )
2024-05-16 14:01:34 +00:00
dependabot[bot]
30986c29cd
Bump github.com/docker/docker ( #1947 )
2024-05-16 04:42:53 +00:00
dependabot[bot]
faa57ddc28
Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 ( #1945 )
2024-05-16 03:02:12 +00:00
dependabot[bot]
fff229f4f6
Bump github.com/jackc/pgx/v5 from 5.5.3 to 5.5.4 ( #1946 )
2024-05-16 03:01:18 +00:00
dependabot[bot]
fd4f921281
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 ( #1944 )
2024-05-16 02:15:41 +00:00
dependabot[bot]
151f224a98
Bump golang.org/x/net from 0.22.0 to 0.23.0 ( #1943 )
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 01:22:02 +00:00
Sandro
a9763c9692
Initialize log config earlier to prevent trace messages being printed early on ( #1939 )
...
like TRC DNS configuration loaded dns_config={....}
2024-05-15 20:40:30 -04:00
MichaelKo
7fd2485000
Restore foreign keys and add constraints ( #1562 )
...
* fix #1482 , restore foregin keys, add constraints
* #1562 , fix tests, fix formatting
* #1562 : fix tests
* #1562 : fix local run of test_integration
2024-05-15 20:40:14 -04:00
Dan Pastusek
2bac80cfbf
[DOCS] Make linux installation instructions more clear ( #1927 )
...
* Make linux installation instructions more clear
* Update running-headscale-linux.md
2024-05-06 20:06:30 +02:00
Michael Savage
93a915c096
Update OpenBSD installation docs for 2024 ( #1915 )
2024-05-06 20:03:21 +02:00
Kristoffer Dalby
622aa82da2
ensure expire routines are cleaned up ( #1924 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-02 15:57:53 +00:00
Kristoffer Dalby
a9c568c801
trace log and notifier shutdown ( #1922 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-02 13:39:19 +02:00
Kristoffer Dalby
1c6bfc503c
fix preauth key logging in as previous user ( #1920 )
...
* add test case to reproduce #1885
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix preauth key issue logging in as wrong user
Fixes #1885
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add test to gh
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-02 11:53:16 +02:00
Kristoffer Dalby
55b35f4160
fix issue preveting get node when disco is missing ( #1919 )
...
Fixed #1816
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-05-01 17:06:42 +02:00
Kristoffer Dalby
d5ed8bc074
error if no prefix is configured ( #1918 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-30 11:11:29 +02:00
Kristoffer Dalby
87e2ae4d52
add autogroup:internet, fix reduce filter rules ( #1917 )
2024-04-30 07:23:16 +02:00
Juan Font
ff427ccb78
Apply suggestions from code review
...
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-29 23:04:02 +02:00
Juan Font
39277844dd
Apply suggestions from code review
...
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-29 23:04:02 +02:00
Juan Font
50a7d15769
Update CONTRIBUTING.md
...
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-29 23:04:02 +02:00
Juan Font
d740ee489e
Update CONTRIBUTING.md
...
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-29 23:04:02 +02:00
Juan Font
10e37ec28d
Add contributing document
2024-04-29 23:04:02 +02:00
Kristoffer Dalby
cb0b495ea9
batch updates in notifier ( #1905 )
2024-04-27 10:47:39 +02:00
Juan Font
fef8261339
Do not access node ID when node is not found ( #1912 )
2024-04-24 07:44:35 +02:00
Kristoffer Dalby
c62d5570f2
remove multistep build, build go last, allowing cached build layers ( #1903 )
2024-04-24 07:44:07 +02:00
Kristoffer Dalby
318d5d2b21
replace issue templates with github issue forms
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-22 23:10:34 +02:00
Kristoffer Dalby
9229d17bbe
remove examples/, and kustomize ( #1906 )
...
this directory is unmaintained and not verified, if it should be restored, it should end up
under the community docs effort.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-22 21:21:38 +02:00
Juan Font
aba4b36030
Clarify relation with Tailscale ( #1908 )
2024-04-22 20:37:59 +02:00
Juan Font
bd047928f7
Move pprof to metrics router ( #1902 )
2024-04-21 22:08:59 +02:00
ChengenH
9375b09206
chore: use errors.New to replace fmt.Errorf with no parameters will much better
...
Signed-off-by: ChengenH <hce19970702@gmail.com >
2024-04-21 20:23:25 +02:00
Kristoffer Dalby
ba614a5e6c
metrics, tuning in tests, db cleanups, fix concurrency issue ( #1895 )
2024-04-21 18:28:17 +02:00
oftenoccur
7d8178406d
chore: fix function names in comment ( #1866 )
...
* chore: fix function names in comment
Signed-off-by: oftenoccur <ezc5@sina.com >
---------
Signed-off-by: oftenoccur <ezc5@sina.com >
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-21 18:19:38 +02:00
ohdearaugustin
8394208856
fix prettier
2024-04-21 17:32:41 +02:00
Arnaud Dezandee
803269a64c
docs(readme): change contributors section ( #1889 )
2024-04-21 16:48:33 +02:00
Carson Yang
d6ec31c4e0
docs: Add docs for running headscale on sealos ( #1666 )
...
* docs: Add docs for running headscale on sealos
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com >
* run prettier
---------
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com >
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-21 16:43:31 +02:00
Juan Font
68503581a0
Add test stage to docs ( #1893 )
...
* Add test stage to docs
Add new file with docs tets
Run only in pulls
* set explicit python version
* Revert "set explicit python version"
This reverts commit 4dd7b81f26 .
* docs/requirements: update mkdocs-material
---------
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-21 16:33:22 +02:00
Juan Font
e2afd30b1c
Add the latest UI to the website
2024-04-18 14:55:59 +02:00
Juan Font
c906aaf927
Allow to remove forced tags of a node
...
Set as empty StringList
2024-04-18 09:55:55 +02:00
Juan Font
580f96ce83
Remove unused node check interval
2024-04-17 20:20:44 +02:00
Juan Font
c4c8cfe5ea
Fix crash when a prefix family was empty
2024-04-17 15:28:06 +02:00
Kristoffer Dalby
40953727cf
fix ip migration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-17 12:36:12 +02:00
Cas de Reuver
d4af0c386c
Log available update as warning ( #1877 )
2024-04-17 11:22:53 +02:00
Kristoffer Dalby
2ce23df45a
Migrate IP fields in database to dedicated columns ( #1869 )
2024-04-17 07:03:06 +02:00
Sergey Aksenov
85cef84e17
use newer fork of termcolor ( #1842 )
...
jagottsicher's fork fixed a bug in Windows implementation. While Windows may be not intended as a target platform,
some contributors may prefer it for development.
Also ran go mod tidy, thus two more unnecessary packages are removed from go.sum
2024-04-16 23:48:51 +02:00
Kristoffer Dalby
7d62e9fce5
move "embedded derp" settings into With options for integration tests ( #1872 )
2024-04-16 21:37:25 +02:00
Kristoffer Dalby
60f0cf908c
more log.Error -> fmt.Errorf cleanup
2024-04-15 12:31:53 +02:00
Kristoffer Dalby
1704977e76
improve testing of route failover logic
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-15 12:31:53 +02:00
Kristoffer Dalby
bf4fd078fc
clean up use of log.Error where errors could be wrapped
...
Replace a lot of occurences of log.Error with fmt.Errorf,
bubbling the error up the chain instead.
2024-04-15 12:31:53 +02:00
Kristoffer Dalby
58c94d2bd3
Rework map session
...
This commit restructures the map session in to a struct
holding the state of what is needed during its lifetime.
For streaming sessions, the event loop is structured a
bit differently not hammering the clients with updates
but rather batching them over a short, configurable time
which should significantly improve cpu usage, and potentially
flakyness.
The use of Patch updates has been dialed back a little as
it does not look like its a 100% ready for prime time. Nodes
are now updated with full changes, except for a few things
like online status.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-04-15 12:31:53 +02:00
github-actions[bot]
dd693c444c
flake.lock: Update ( #1848 )
2024-04-14 06:46:44 +00:00
Brandon Schneider
2858ab402a
Add new shasum for flake.nix
2024-04-11 08:01:26 +02:00
Brandon Schneider
7bea885b8c
Updated dependencies, fixing segfault for OpenBSD
...
Fixes #1857
2024-04-11 08:01:26 +02:00
Riezebos
84de1854f8
Run prettier
2024-04-10 22:19:47 +02:00
Riezebos
6efc50789d
Update docs/faq.md
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2024-04-10 22:19:47 +02:00
Riezebos
0fcfd643fa
More concise
2024-04-10 22:19:47 +02:00
Riezebos
bdf54e802e
Update answer based on comment
2024-04-10 22:19:47 +02:00
Riezebos
dbe32829a1
Update docs/faq.md
...
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-04-10 22:19:47 +02:00
Riezebos
2fb7428ba9
Add FAQ question about using the same machine as server and client
2024-04-10 22:19:47 +02:00
Daniel Lo Nigro
8a8e25a8d1
[docs] Use modern Apt command to install package ( #1420 )
2024-03-22 20:32:01 +01:00
Maja Bojarska
4d9021047f
Fix/improve documentation formatting ( #1575 )
...
* Fix docs formatting
* .prettierignore add docu
---------
Co-authored-by: ohdearaugustin <ohdearaugustin@users.noreply.github.com >
2024-03-22 19:55:20 +01:00
ohdearaugustin
74ff14eb30
update docs workflow ( #1832 )
2024-03-22 19:50:35 +01:00
Sandro
c1d4fef194
Downgrade update sent to debug ( #1843 )
2024-03-22 09:28:10 +00:00
George Pchelkin
785b150467
Fix typo in docs - DB file path ( #1546 )
2024-03-19 22:43:43 +01:00
github-actions[bot]
20bf3777d3
docs(README): update contributors ( #1834 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-19 22:39:43 +01:00
github-actions[bot]
c29eddded3
flake.lock: Update ( #1833 )
2024-03-17 09:01:57 +01:00
zx
b477e5f366
Update docker related doc ( #1421 )
2024-03-14 23:01:33 +01:00
Sandro
95004de5e8
docs/reverse-proxy: use standard map, correct X-Forwarded-Proto variable for nginx ( #1790 )
2024-03-14 22:56:55 +01:00
Vitalij Dovhanyc
ef26f58085
update gh workflow actions ( #1809 )
2024-03-13 13:43:06 +01:00
github-actions[bot]
1d3eae8861
Update flake.lock ( #1657 )
...
Flake lock file updates:
• Updated input 'flake-utils':
'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
→ 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/442d407992384ed9c0e6d352de75b69079904e4e' (2024-02-09)
→ 'github:NixOS/nixpkgs/0e7f98a5f30166cbed344569426850b21e4091d4' (2024-03-09)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-10 12:40:31 +01:00
Juan Font
a244eabd03
Ephemeral keys can now be reusable and non-reusable
...
Fixes the issue reported in #1712 . In Tailscale SaaS, ephemeral keys can be single-user or reusable. Until now, our ephemerals were only reusable. This PR makes us adhere to the .com behaviour.
2024-03-03 12:37:37 +01:00
Vitalij Dovhanyc
e15a08326c
simplify integration testing with matrix jobs ( #1799 )
...
* simplify integration testing with matrix jobs
* check if all of the integration tests are in the test-integration workflow
2024-03-02 22:36:38 +01:00
Kristoffer Dalby
c9966ba6c2
fix postgres migration ( #1802 )
2024-03-01 19:11:46 +01:00
Kristoffer Dalby
7a920ee701
move debug inside if in docker goreleaser tag ( #1783 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-19 14:03:31 +01:00
Kristoffer Dalby
8b2c31aabc
fix ifs in goreleaser gotemplate ( #1781 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-19 10:50:52 +01:00
Kristoffer Dalby
5dbd59ca55
Get integration test netmap from watch-ipn command ( #1729 )
2024-02-18 23:22:18 +01:00
Kristoffer Dalby
3f162c212c
drop unused last_successful_update field from node table ( #1754 )
2024-02-18 23:22:07 +01:00
Kristoffer Dalby
384ca03208
new IP allocator and add postgres to integration tests. ( #1756 )
2024-02-18 19:31:29 +01:00
Kristoffer Dalby
f581d4d9c0
replace linter actions with nix to ensure consistent version ( #1773 )
2024-02-18 13:33:40 +01:00
Kristoffer Dalby
b60ee9db54
improve errors for missing directories ( #1765 )
...
* improve errors for missing directories
Fixes #1761
Updates #1760
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update container docs
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog with /var changes
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-17 13:36:19 +01:00
Kristoffer Dalby
c73e8476b9
make database configuration change breaking ( #1766 )
...
A lot of things are breaking in 0.23 so instead of having this
be a long process, just rip of the plaster.
Updates #1758
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-17 13:18:15 +01:00
Kristoffer Dalby
6055d0b397
rollback gorm, broke migration #1755 ( #1762 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-17 13:17:16 +01:00
Kristoffer Dalby
1904d79e90
rework docker tags ( #1763 )
...
* rework docker tags
This commit tries to align the new docker tags with the old schema
A prerelease will end up with the following tags:
- unstable
- v0.23.0-alpha3
- 0.23.0.alpha3
- sha-1234adsfg
A release will end up with:
- latest
- stable
- v0.23.0
- v0.23
- v0
- 0.23.0
- 0.23
- 0
- sha-1234adsfg
All of the builds will also have a `-debug` version.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-17 13:15:31 +01:00
Sandro
1b01b9e14f
Reduce poll logging to debug ( #1746 )
...
Before this logged ~10 messages every few seconds and quite spamming the
log.
2024-02-16 10:32:23 +01:00
Calvin Figuereo-Supraner
5717c8255a
Use result of fmt.Errorf call ( #1668 )
2024-02-15 11:02:54 +01:00
Kristoffer Dalby
c42f25bd72
fix ko dockerhub builds ( #1751 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-15 10:23:01 +01:00
Stepan
82c64f682c
Docs: fix path to nologin shell ( #1610 )
2024-02-15 08:43:50 +01:00
Linus
7afc2fd180
TLS documentation updates ( #1733 )
...
* TLS documentation updates
Move "Bring your own certificates" to the top
since the letsencrypt section is now much longer, it seems wrong to
keep such a short section way down at the bottom.
Restructure "Challenge types" into separate sections
Add technical description of letsencrypt renewals
this aims to answer:
- what can be expected in terms of renewals
- what logs can be expected (none)
- how to validate that renewal happened successfully
- the reason for some of the 'acme/autocert' logs, or at least
some best-effort assumptions
* +prettier
2024-02-15 08:43:01 +01:00
Kristoffer Dalby
5109af94a3
login to docker registries ( #1744 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-12 16:01:56 +01:00
Kristoffer Dalby
905fdaa409
remove quotes from command ( #1742 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-12 15:09:19 +01:00
Kristoffer Dalby
0333e97630
Build docker images with ko (goreleaser) ( #1716 )
...
* make dockerfiles testing only note
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* setup ko image builder for goreleaser
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove release-docker
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove non-debug Dockerfile
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Comments and lint
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
* build debug images based on debian
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
* remove debug flag for goreleaser
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2024-02-12 14:53:07 +01:00
DeveloperDragon
e3553aae50
Allow when user has only a subnet route ( #1734 )
...
* Add test because of issue 1604
* Add peer for routes
* Revert previous change to try different way to add peer
* Add traces
* Remove traces
* Make sure tests have IPPrefix comparator
* Get allowedIps before loop
* Remove comment
* Add composite literals :)
2024-02-12 11:44:37 +01:00
Pallab Pain
47405931c6
✨ feat(apikey): adds command to delete api keys ( #1702 )
...
We currently do not have a way to clean up api keys. There may be cases
where users of headscale may generate a lot of api keys and these may
end up accumulating in the database. This commit adds the command to
delete an api key given a prefix.
2024-02-12 11:31:21 +01:00
foosinn
c4beb0b8af
document setting oidc client secret cia env ( #1649 )
2024-02-12 09:20:31 +01:00
Kristoffer Dalby
3f2b238a46
Upgrade to Go 1.22 and update deps ( #1728 )
...
* go 1.22
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* upgrade tailscale
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
* add script for getting nix sri for go
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update deps and only build headscale
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
* add script to update all deps
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
* get golines and golangci from upstream nix
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2024-02-12 09:11:33 +01:00
Kristoffer Dalby
68a8ecee7a
Prepare notify channel before sending first update ( #1730 )
...
* create channel before sending first update
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* do not notify on register, wait for connect
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-12 09:11:17 +01:00
lööps
c3257e2146
docs(windows-client): add Windows registry command ( #1658 )
...
Add Windows registry command to create the `Tailscale IPN` path before setting properties.
2024-02-09 19:16:17 +01:00
Pallab Pain
9047c09871
✨ feat: add pqsql configs for open and idle connections ( #1583 )
...
When Postgres is used as the backing database for headscale,
it does not set a limit on maximum open and idle connections
which leads to hundreds of open connections to the Postgres
server.
This commit introduces the configuration variables to set those
values and also sets default while opening a new postgres connection.
2024-02-09 17:34:28 +01:00
Kristoffer Dalby
91bb85e7d2
Update bug_report.md ( #1672 )
2024-02-09 07:27:13 +01:00
Kristoffer Dalby
94b30abf56
Restructure database config ( #1700 )
2024-02-09 07:27:00 +01:00
Kristoffer Dalby
00e7550e76
Add assert func for verifying status, netmap and netcheck ( #1723 )
2024-02-09 07:26:41 +01:00
Kristoffer Dalby
83769ba715
Replace database locks with transactions ( #1701 )
...
This commits removes the locks used to guard data integrity for the
database and replaces them with Transactions, turns out that SQL had
a way to deal with this all along.
This reduces the complexity we had with multiple locks that might stack
or recurse (database, nofitifer, mapper). All notifications and state
updates are now triggered _after_ a database change.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-02-08 17:28:19 +01:00
DeveloperDragon
cbf57e27a7
Login with OIDC after having been logged out ( #1719 )
2024-02-05 10:45:35 +01:00
derelm
4ea12f472a
Fix failover to disabled route #1706 ( #1707 )
...
* fix #1706 - failover should disregard disabled routes during failover
* fixe tests for failover; all current tests assume routes to be enabled
* add testcase for #1706 - failover to disabled route
2024-02-03 15:30:15 +01:00
danielalvsaaker
b4210e2c90
Trim client secret after reading from file ( #1697 )
...
Reading from file will include a line break, which results in a mismatching client secret
compared to reading directly from the config.
2024-01-25 09:53:34 +01:00
dyz
a369d57a17
fix node expire error due to type in gorm model Update ( #1692 )
...
Fixes #1674
Signed-off-by: fortitude.zhang <fortitude.zhang@gmail.com >
2024-01-21 17:38:24 +01:00
Kristoffer Dalby
1e22f17f36
node selfupdate and fix subnet router when ACL is enabled ( #1673 )
...
Fixes #1604
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-01-18 17:30:25 +01:00
Kristoffer Dalby
65376e2842
ensure renabled auto-approve routes works ( #1670 )
2024-01-18 16:36:47 +01:00
Alexander Halbarth
7e8bf4bfe5
Add Customization Options to DERP Map entry of integrated DERP server ( #1565 )
...
Co-authored-by: Alexander Halbarth <alexander.halbarth@alite.at >
Co-authored-by: Bela Lemle <bela.lemle@alite.at >
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2024-01-16 16:04:03 +01:00
Kristoffer Dalby
3b103280ef
implement selfupdate and pass expiry ( #1647 )
2024-01-05 10:41:56 +01:00
Kristoffer Dalby
a592ae56b4
fix issue where advertise tags causes hang ( #1669 )
...
Fixes #1665
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-01-04 21:26:49 +01:00
Kristoffer Dalby
054b06d45d
add 1.54 and 1.56 to integration tests ( #1652 )
...
* add 1.54 and 1.56 to integration tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix bug where we tested random versions, now sorted
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-01-02 10:41:40 +01:00
Kristoffer Dalby
55ca078f22
embed (hidden) tailsql for debugging ( #1663 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2023-12-20 21:47:48 +01:00
Kristoffer Dalby
6049ec758c
add versioned migrations ( #1644 )
2023-12-10 15:46:14 +01:00
Kristoffer Dalby
ac910fd44c
make stale shorter ( #1646 )
2023-12-10 15:30:30 +01:00
Kristoffer Dalby
9982ae5f09
add breaking entry of derp priv key ( #1641 )
2023-12-10 15:23:23 +01:00
Kristoffer Dalby
cf8ffea154
turn off grpc communication logging ( #1640 )
2023-12-10 15:22:59 +01:00
Kristoffer Dalby
790bbe5e8d
fix hostinfo db column spelling ( #1642 )
2023-12-10 15:22:26 +01:00
github-actions[bot]
2c8fc9b061
Update flake.lock ( #1632 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-10 09:50:39 +01:00
github-actions[bot]
b359939812
docs(README): update contributors ( #1639 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-10 08:56:01 +01:00
Kristoffer Dalby
f65f4eca35
ensure online status and route changes are propagated ( #1564 )
2023-12-09 18:09:24 +01:00
Kristoffer Dalby
0153e26392
upgrade go dependencies ( #1628 )
2023-11-30 14:41:31 +01:00
Andrei Pechkurov
6c9c55774b
Update xsync to v3.0.2 ( #1597 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-11-29 15:47:14 +01:00
github-actions[bot]
2f558bee80
Update flake.lock ( #1598 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-29 15:11:28 +01:00
Azamat H. Hackimov
4c608a4b58
Fix Github Actions docs pipeline ( #1622 )
2023-11-29 15:11:00 +01:00
JesseBot
f13cf64578
Docs: Update running-headscale-container.md - fix link to example config ( #1618 )
2023-11-29 15:10:21 +01:00
MichaelKo
85e92db505
Enhance pipeline stability and automatically retry unstable tests ( #1566 )
...
* add test retry to action
* add test retry to action
2023-11-27 18:32:52 +01:00
Kristoffer Dalby
a59aab2081
Remove support for non-noise clients (pre-1.32) ( #1611 )
2023-11-23 08:31:33 +01:00
Kristoffer Dalby
b918aa03fc
move to use tailscfg types over strings/custom types ( #1612 )
...
* rename database only fields
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use correct endpoint type over string list
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* remove HostInfo wrapper
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* wrap errors in database hooks
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-11-21 18:20:06 +01:00
Kristoffer Dalby
ed4e19996b
Use tailscale key types instead of strings ( #1609 )
...
* upgrade tailscale
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make Node object use actualy tailscale key types
This commit changes the Node struct to have both a field for strings
to store the keys in the database and a dedicated Key for each type
of key.
The keys are populated and stored with Gorm hooks to ensure the data
is stored in the db.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use key types throughout the code
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make sure machinekey is concistently used
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use machine key in auth url
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix web register
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* use key type in notifier
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* fix relogin with webauth
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-11-19 22:37:04 +01:00
Kristoffer Dalby
c0fd06e3f5
remove the use key stripping and store the proper keys ( #1603 )
2023-11-16 17:55:29 +01:00
github-actions[bot]
2af71c9e31
docs(README): update contributors ( #1592 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-06 14:07:35 +01:00
Lucalux
42b7f8f65a
redundant line removed from systemd.service ( #1587 )
2023-11-06 13:45:34 +01:00
github-actions[bot]
48c7d763d5
Update flake.lock ( #1589 )
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/e12483116b3b51a185a33a272bf351e357ba9a99' (2023-09-21)
→ 'github:NixOS/nixpkgs/a0b3b06b7a82c965ae0bb1d59f6e386fe755001d' (2023-11-05)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-06 12:57:06 +01:00
Kristoffer Dalby
d0d6438337
Add workflow to autoupdate flake.lock deps ( #1588 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-11-06 12:48:52 +01:00
Kristoffer Dalby
fb4ed95ff6
Upgrade Go 1.21, Tailscale 1.50 and add Capability version support ( #1563 )
2023-09-28 12:33:53 -07:00
Kristoffer Dalby
01b85e5232
remove readonly case for mapresponse, dont think it is used ( #1556 )
2023-09-25 14:27:24 -07:00
Kristoffer Dalby
64c0a6523f
Set online status in lite requests ( #1555 )
2023-09-25 14:27:14 -07:00
Kristoffer Dalby
84fbca97f7
add note about db backup to changelog ( #1560 )
2023-09-25 14:27:03 -07:00
Kristoffer Dalby
56cf4b082e
Add github stale action ( #1559 )
2023-09-25 09:33:31 -05:00
github-actions[bot]
6cd0f77511
docs(README): update contributors ( #1558 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-24 14:34:53 -07:00
Kristoffer Dalby
b27e8ab5a1
add 0.23.0 changelog entry ( #1557 )
2023-09-24 14:18:19 -07:00
Juan Font
0030af3fa4
Rename Machine to Node ( #1553 )
2023-09-24 06:42:05 -05:00
Kristoffer Dalby
096ac31bb3
handle route updates correctly
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
c957f893bd
Return simple responses immediatly
...
This commit rearranges the poll handler to immediatly accept
updates and notify its peers and return, not travel down the
function for a bit. This reduces the DB calls and other
holdups that isnt necessary to send a "lite response", a
map response without peers, or accepting an endpoint update.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
217ccd6540
improve debug logging, rw lock for notifier
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
3bef63bb80
Remove LastSuccessfulUpdate from Machine
...
This field is no longer used, it was used in our old state
"algorithm" to determine if we should send an update.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
591ff8d347
add pprof endpoint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
14f8c1ba34
order path
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
ca4a48afbb
gitignore infolder tailscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
9ccf87c566
add lock around saving ts clients
...
Closes #1544
Co-Authored-By: Patrick Huang <huangxiaoman@gmail.com >
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
4c12c02e71
Upgrade go and debian in headscale docker
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
2434d76ade
give ci more tollerance for timeouts
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
432e975a7f
move MapResponse peer logic into function and reuse
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
387aa03adb
Remove database from Mapper
...
This commit changes the internals of the mapper to
track all the changes to peers over its lifetime.
This means that it no longer depends on the database
and this should hopefully help with locks and timing issues.
When the mapper is created, it needs the current list of peers,
the world view, when the polling session was started. Then as
update changes are called, it tracks the changes and generates
responses based on its internal list.
As a side, the types.Machines and types.MachinesP, as well as
types.Machine being passed as a full struct and pointer has been
changed to always be pointers, everywhere.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
3b0749a320
Update packetfilter when peers change
...
Previously we did not update the packet filter
when nodes changed, which would cause new nodes
to be missing from packet filters of old nodes.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
a8079a2096
rearrange poll, lock, notify
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
593b3ad981
filter out peers without endpoints
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
e90a669951
remove retries for pings in tsic
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
9c5301ee2e
add maprequest to all mapper calls
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
13a7285658
fix lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
e55fe0671a
only send lite map responses when omitpeers
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
e0ba325b3b
additional debug logging, use mapper pointer
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
eff529f2c5
introduce rw lock for db, ish...
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
a1a3ff4ba8
disable online map by default for now
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
78268d78a0
add debug option to save all map responses
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
f73172fb21
add less/jq to hs debug container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
b7c6e0ec88
add annoying linter to golangci
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
2d87085cbc
rearrange channel closing defers
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
13fe4ec91b
add script to run integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
53a9e28faf
Add missing return in shutdown
...
Co-Authored-By: Jason <armooo@armooo.net >
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
4b65cf48d0
Split up MapResponse
...
This commits extends the mapper with functions for creating "delta"
MapResponses for different purposes (peer changed, peer removed, derp).
This wires up the new state management with a new StateUpdate struct
letting the poll worker know what kind of update to send to the
connected nodes.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
66ff1fcd40
Replace the timestamp based state system
...
This commit replaces the timestamp based state system with a new
one that has update channels directly to the connected nodes. It
will send an update to all listening clients via the polling
mechanism.
It introduces a new package notifier, which has a concurrency safe
manager for all our channels to the connected nodes.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
056d3a81c5
format with prettier 3.0
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-19 10:20:21 -05:00
Kristoffer Dalby
7edc953d35
Update tsic.go
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
12a04f9459
fix relogin test, pass accept route flag
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
1766e6b5df
General fixups discovered by checking errors
...
There was a lot of tests that actually threw a lot of errors and that did
not pass all the way because we didnt check everything. This commit should
fix all of these cases.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
f8a58aa15b
introduce a version subset we must test against
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
b4a4d0f760
Handle errors in integration test setups
...
Thanks @kev-the-dev
Closes #1460
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
63caf9a222
update flake, fix prettier lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
47255d267e
add script to run integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Juan Font
e3acc95859
Send logs to stderr, rather than stdout
2023-08-11 20:59:38 +02:00
qzydustin
fb203a2e45
Format code
2023-07-23 23:46:02 +02:00
qzydustin
6567af7730
Fix IP Address Order Bug
2023-07-23 23:46:02 +02:00
Kristoffer Dalby
23a3adf8d2
use cmp.Diff instead of reflect.DeepEqual
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-07-01 21:55:47 +02:00
Kristoffer Dalby
665a3cc666
add generic logerr func to shorten code
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-07-01 08:35:04 +01:00
Kristoffer Dalby
fe75b71620
use nix caching and docker caching in CI
...
Also bumps tailscale version to trigger build and fixes a CLI test
that had the wrong capitalisation
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-29 12:49:36 +01:00
Kristoffer Dalby
19dc0ac702
rename acl "get" funcs to "expand" for consistency
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
155cc072f7
migrate last acl tests away from database
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
e2c08db3b5
reduce filter rules at the end, so we filter nodes correctly
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
fcdc7a6f7d
remove redundant tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
88ca2501d1
only send relevant filterrules to nodes
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
2675ff4b94
make parse destination string into a func
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
717abe89c1
remove "stripEmailDomain" argument
...
This commit makes a wrapper function round the normalisation requiring
"stripEmailDomain" which has to be passed in almost all functions of
headscale by loading it from Viper instead.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
161243c787
make generateFilterRules take machine and peers
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
9c425a1c08
Finish SSH
...
This commit allows SSH rules to be assigned to each relevant not and
by doing that allow SSH to be rejected, completing the initial SSH
support.
This commit enables SSH by default and removes the experimental flag.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
db6cf4ac0a
make GenerateFilterRules take machine and peers
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Kristoffer Dalby
35770278f7
upgrade tailscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-21 10:31:48 +02:00
Viacheslav Sychov
36c9b5ce74
Adjust the template for the OIDC callback login page
2023-06-14 18:08:49 +02:00
Kristoffer Dalby
0562260fe0
rename handler files
...
This commit renames a bunch of files to try to make it a bit less confusing;
protocol_ is now auth as they contained registration, auth and login/out flow
protocol_.*_poll is now poll.go
api.go and other generic handlers are now handlers.go
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
c1218ad3c2
move reminder of dns funcs to util
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
d36336a572
fix lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
80ea87c032
move derp_server to derp server module
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
8c4c4c8633
move derp.go to derp module
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
2289a2acbf
move Config definitions into types
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Viacheslav Sychov
c72401a99b
Fix IPv6 in ACLs
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
725bbd7408
Remove variables and leftovers of pregenerated ACL content
...
Prior to the code reorg, we would generate rules from the Policy and
store it on the global object. Now we generate it on the fly for each node
and this commit cleans up the old variables to make sure we have no
unexpected side effects.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
084d1d5d6e
Add initial test for mapresponse
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
f9f6e1557a
Remove complicated testcase obsoleated by tailNode test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
5bad48a24e
remove DB dependency of tailNode conversion, add test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
bce8427423
Map route into machine
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
Kristoffer Dalby
f7f472ae07
introduce mapper package
...
The mapper package contains functions related to creating and marshalling
reponses to machines.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-06-08 16:34:15 +02:00
github-actions[bot]
699655a93f
docs(README): update contributors
2023-05-27 16:21:42 +02:00
Kristoffer Dalby
feb15365b5
Split code into modules
...
This is a massive commit that restructures the code into modules:
db/
All functions related to modifying the Database
types/
All type definitions and methods that can be exclusivly used on
these types without dependencies
policy/
All Policy related code, now without dependencies on the Database.
policy/matcher/
Dedicated code to match machines in a list of FilterRules
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-26 12:24:50 +02:00
Kristoffer Dalby
14e29a7bee
create DB struct
...
This is step one in detaching the Database layer from Headscale (h). The
ultimate goal is to have all function that does database operations in
its own package, and keep the business logic and writing separate.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-26 12:24:50 +02:00
Juan Font
b01f1f1867
Clean apt
2023-05-12 10:09:36 +02:00
Juan Font
c027ef0f6c
Added changelog for 0.22.3
2023-05-12 10:09:36 +02:00
Six
db97a7ab10
Add ca-certificates to Dockerfile
2023-05-12 09:24:55 +02:00
Kristoffer Dalby
252342a0a5
update nix hash
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
cdf3c47d63
changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
61a2915f17
port reminder of integrationv1 test to v2
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
a16f0c9f60
clean up unused legacy stuff
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
52ad138c32
update dependency path for integration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
d2413d0a2f
move swagger to root for now
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
51dc0d5784
update dependency path for cmd
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
2d365c8c9c
inline old acl hujson tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
f2c1d1b8f9
regenerate gen
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
2d6356fa13
move templates
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
3bfc598ccc
move generated files
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
3683d3e82f
rename package name to hscontrol
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Kristoffer Dalby
4a7921ead5
move all go files from root to hscontrol
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-10 20:47:51 +02:00
Juan Font
22e397e0b6
Use common path in unix_socket default setting
2023-05-10 18:18:04 +02:00
Juan Font
c7db99d6ca
Update changelog + prepare for 0.22.2
2023-05-10 18:18:04 +02:00
Juan Font
f73354b4f4
Create default sock path in Docker
2023-05-10 18:18:04 +02:00
Juan Font
4c8f8c6a1c
Ditch distroless for Docker image
...
distroless has proven a mantenance burden for us, and it has caused headaches for user when trying to debug issues in the container.
And in 2023, 20MB of extra disk space are neglectible.
2023-05-10 18:18:04 +02:00
Juan Font
997e93455d
Added web ui section
...
Added discord
2023-05-10 16:16:12 +02:00
Juan Font
9f381256c4
Update config.go
2023-05-10 14:25:13 +02:00
Juan Font
f60c5a1398
Fix socket location in config.go
2023-05-10 14:25:13 +02:00
Juan Font
5706f84cb0
Revert "Revert unix_socket to default value"
...
This reverts commit ca54fb9f56 .
2023-05-10 14:25:13 +02:00
Juan Font
9478c288f6
Added missing file
2023-05-10 10:26:21 +02:00
Juan Font
6043ec87cf
Update mkdocs.yml
2023-05-10 09:49:13 +02:00
Juan Font
dcf2439c61
Improved website
...
More docs
2023-05-10 09:49:13 +02:00
Kristoffer Dalby
ba45d7dbd3
update readme and templates to clarify scope ( #1437 )
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2023-05-10 08:03:13 +01:00
Juan Font
bab4e14828
Further clarification on unsupported ranges in config example
2023-05-08 12:47:08 +02:00
Juan Font
526e568e1e
Update changelog
2023-05-07 15:27:30 +02:00
Juan Font
02ab0df2de
Disable and Delete route must affect both exit routes (IPv4 and IPv6)
...
Fixed linting
2023-05-07 15:27:30 +02:00
Juan Font
7338775de7
Give a warning when users have set an unsupported prefix
...
Fix minor log issue
Removed debug meessage
2023-05-07 13:14:32 +02:00
Sebastian Muszytowski
00c514608e
Add IP forwarding requirement to documentation
...
I propose to add the information, that IP forwarding needs to be enabled in order to use a node as an exit-node.
2023-05-06 21:48:59 +02:00
Maja Bojarska
6c5723a463
Update CHANGELOG.md
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2023-05-04 22:54:32 +02:00
Maja Bojarska
57fd5cf310
Update CHANGELOG.md
2023-05-04 22:54:32 +02:00
Maja Bojarska
f113cc7846
Add missing GH releases page link
2023-05-04 22:54:32 +02:00
ohdearaugustin
ca54fb9f56
Revert unix_socket to default value
2023-05-03 20:16:04 +02:00
Kristoffer Dalby
735b185e7f
use IPSet in acls instead of string slice
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
1a7ae11697
Add basic testcases for Machine.canAccess
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
644be822d5
move matcher to separate file
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
56b63c6e10
use netipx.IPSet for matcher
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
ccedf276ab
add a filter case with really large destination set #1372
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
10320a5f1f
lint and nolint tailscale borrowed func
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
ecd62fb785
remove terrible filter code
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
0d24e878d0
update flake hash
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
889d5a1b29
testing without that horrible filtercode
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
1700a747f6
outline tests for full filter generate
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
200e3b88cc
make generateFilterRule a pol struct func
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
5bbbe437df
clear up the acl function naming
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
6de53e2f8d
simplify expandAlias function, move seperate logic out
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-05-03 18:43:57 +02:00
Kristoffer Dalby
b23a9153df
trim dockerfiles, script to rebuild test images ( #1403 )
2023-05-02 10:51:30 +01:00
Juan Font
80772033ee
Improvements on Noise implementation ( #1379 )
2023-05-02 08:15:33 +02:00
Juan Font
a2b760834f
Fix extra space
2023-04-30 23:28:16 +02:00
loprima-l
493bcfcf18
Update mkdocs.yml
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2023-04-30 23:28:16 +02:00
loprima-l
df72508089
Fix : Change master branch to main
...
This fix should change the edit branch to main in the documentation
2023-04-30 23:28:16 +02:00
loprima-l
0f8d8fc2d8
Fix : Updating the doc path
...
Updating the doc path to be the doc website url as it's a better documentation tool
2023-04-30 22:56:38 +02:00
Jonathan Wright
744e5a11b6
Update CHANGELOG.md
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2023-04-30 18:25:43 +02:00
Jonathan Wright
3ea1750ea0
Update CHANGELOG.md
2023-04-30 18:25:43 +02:00
Jonathan Wright
a45777d22e
Put systemd service file in proper location
2023-04-30 18:25:43 +02:00
Kristoffer Dalby
56dd734300
Add go profiling flag, and enable on integration tests ( #1382 )
2023-04-27 16:57:11 +02:00
Philipp Krivanec
d0113732fe
optimize generateACLPeerCacheMap ( #1377 )
2023-04-26 06:02:54 +02:00
Kristoffer Dalby
6215eb6471
update flake hash ( #1376 )
2023-04-24 15:52:15 +02:00
Juan Font
1d2b4bca8a
Remove legacy DERP tests
2023-04-24 12:35:29 +02:00
Juan Font
96f9680afd
Reuse Ping function for DERP ping
2023-04-24 12:17:24 +02:00
Juan Font
b465592c07
Do not use host networking in embedded DERP tests
...
fixed linting
2023-04-24 12:17:24 +02:00
Juan Font
991ff25362
Added workflow for embedded derp
2023-04-24 12:17:24 +02:00
Juan Font
eacd687dbf
Added DERP integration tests
...
Linting fixes
Set listen addr to :8443
2023-04-24 12:17:24 +02:00
Juan Font
549f5a164d
Expand surface of hsic for better TLS support
2023-04-24 12:17:24 +02:00
Juan Font
bb07aec82c
Expand tsic to offer PingViaDerp
2023-04-24 12:17:24 +02:00
Kristoffer Dalby
a5afe4bd06
Add more capabilities for systemd
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 15:53:19 +02:00
Kristoffer Dalby
a71cc81fe7
fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 12:05:57 +02:00
Kristoffer Dalby
679305c3e4
Add version to binary release
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 12:05:57 +02:00
Kristoffer Dalby
c0680f34f1
fix issue where binaries are not released
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 11:10:27 +02:00
Kristoffer Dalby
64ebe6b0c8
change date in changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 08:13:38 +02:00
Kristoffer Dalby
e6b26499f7
release source code with vendored dependencies
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-20 08:13:38 +02:00
Kristoffer Dalby
977eb1dee3
Update flakes, add some quality of life improvements ( #1346 )
2023-04-20 07:56:53 +02:00
Kristoffer Dalby
b2e2b02210
set release date
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:47:31 +02:00
Kristoffer Dalby
2abff4bb08
update changelog for #1339
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:45:27 +02:00
Kristoffer Dalby
54c00645d1
update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
cad5ce0ebd
lint fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
b12a167fa2
remove rpm, might add back later
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
667295e15e
add new documentation on how to install on debian/ubuntu
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
bea52678e3
move current linux documentation into "manual"
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
307cfc3304
add systemd enable to postinstall script
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-19 20:04:58 +02:00
Kristoffer Dalby
5e74ca9414
Fix IPv6 in ACLs ( #1339 )
2023-04-16 12:26:35 +02:00
Juan Font
9836b097a4
Make sure all clients of a user are ready ( #1335 )
2023-04-12 09:25:51 +02:00
Juan Font
d0b3b1bfc4
Fix binary releases
2023-04-08 09:21:27 +02:00
Juan Font
6eea96eabc
Added 1.38.4 in the new tests
2023-04-07 19:45:46 +02:00
github-actions[bot]
d08fee78c3
docs(README): update contributors ( #1325 )
2023-04-07 17:31:29 +02:00
Andriy Kushnir (Orhideous)
bb5f0d456c
Change primary color for light mode to white
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
c186c49e25
Removed custom accents, going with defaults
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
4ec6894773
Build with strict mode
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
dd9b4b1cb7
Move examples out of docs/ directory
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
a43bb9c958
Replace placeholder link with actual one
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
ba905ff6fc
Add GHA CI to build and deploy docs
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
99bd09f688
Add new index page
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
a6bc792a61
Move admonitions to relevant sections
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
6381d3660a
Add admonitions marking community-provided docs
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
66c5f74d78
Add admonitions marking community-provided docs
2023-04-07 15:24:13 +02:00
Andriy Kushnir (Orhideous)
1723a6bf40
Configure MkDocs Material scaffold
2023-04-07 15:24:13 +02:00
Juan Font
353f191e4f
Update changelog
2023-04-07 13:25:34 +02:00
Juan Font
8d865bb61b
Target Go 1.20 in flake.nix
2023-04-07 13:25:34 +02:00
Juan Font
c6815c5334
Target Go 1.20 and Tailscale 1.38
2023-04-07 13:25:34 +02:00
Kristoffer Dalby
b684ac0668
Simplify goreleaser, package deb and rpm
...
This commit simplifies the goreleaser configuration and then adds nfpm
support which allows us to build .deb and .rpm for each of the ARCH we
support.
The deb and rpm packages adds systemd services and users, creates
directories etc and should in general give the user a working
environment. We should be able to remove a lot of the complicated,
PEBCAK inducing documentation after this.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-04-07 11:06:42 +02:00
Juan Font
dfc5d861c7
Fix CIDR calculation in expandACLPeerAddr
2023-04-05 09:44:46 +02:00
Juan Font
50b706eeed
Remove deprecated linters + one casuing issues with imports
2023-04-04 22:37:27 +02:00
Sean Reifschneider
036ff1cbb9
Adding Powershell commands to Windows instructions ( #1299 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2023-04-04 08:58:32 +02:00
Kristoffer Dalby
ceeef40cdf
Add tests to verify "Hosts" aliases in ACL ( #1304 )
2023-04-03 10:08:48 +02:00
Julien Zweverink
681c86cc95
ACL Doc's ( #1288 )
2023-03-28 18:41:23 +02:00
Kristoffer Dalby
c7b459b615
Fix issue where ACL * would filter out returning connections ( #1279 )
2023-03-27 19:19:32 +02:00
Gabe Cook
56a7b1e349
Add SVG logos ( #1286 )
2023-03-27 15:33:25 +02:00
Antonio Fernandez
f1eee841cb
updated to ACL doc ( #1278 )
2023-03-27 11:25:55 +02:00
Stefan Majer
45fbd34480
Do not use yaml.v2 and yaml.v3 as direct dependency ( #1281 )
2023-03-27 10:48:39 +02:00
Juan Font
248abcf353
Add missing entry to changelog and prepare for 0.22
...
Add missing entry to changelog
2023-03-20 13:48:56 +01:00
Kurnia D Win
2560c32378
adding some sleep on re-registration after machine expired ( #1256 )
2023-03-20 11:14:34 +01:00
Kristoffer Dalby
e38efd3cfa
Add ACL test for limiting a single port. ( #1258 )
2023-03-20 08:52:52 +01:00
Moritz Poldrack
d12f247490
document running exit nodes
...
Currently the only kind-of documentation is #210 which is outdated. To remedy
this, add a document describing the process.
2023-03-19 11:02:01 +01:00
nicholas-yap
003036a779
Update iOS compatibility and added iOS docs ( #1264 )
2023-03-17 15:56:15 +01:00
github-actions[bot]
ed79f977a7
docs(README): update contributors ( #1262 )
2023-03-17 10:07:39 +01:00
Kristoffer Dalby
8012e1cbd2
Add instructions on how to login to iOS ( #1261 )
2023-03-15 11:31:38 +00:00
Kristoffer Dalby
a5562850a7
MapResponse optimalisations, peer list integration tests ( #1254 )
...
Co-authored-by: Allen <979347228@qq.com >
2023-03-06 17:50:26 +01:00
Stefan Majer
bb786ac8e4
github.com/gofrs/uuid/v5 is now go modules compatible, use it ( #1224 )
2023-03-06 09:54:24 +01:00
Juan Font
ea82035222
Allow to delete routes ( #1244 )
2023-03-06 09:05:40 +01:00
Albert Copeland
c9ecdd6ef1
Add Graphical Control Panels section to README ( #1226 )
2023-03-03 19:05:12 +01:00
Juan Font
54f5c249f1
Fix various linting issues + golang-lint upgrade ( #1245 )
2023-03-03 18:22:47 +01:00
dnaq
a82a603db6
Return 404 on unmatched routes ( #1201 )
2023-03-03 17:14:30 +01:00
Sean Reifschneider
f49930c514
Add "configtest" CLI command. ( #1230 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
Fixes https://github.com/juanfont/headscale/issues/1229
2023-03-03 14:55:29 +01:00
Kristoffer Dalby
2baeb79aa0
changelog: prep for 0.21 ( #1246 )
2023-03-03 13:42:45 +01:00
Kristoffer Dalby
b3f78a209a
Post PR comment when nix vendor sum breaks
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-03-02 18:17:59 +01:00
Josh Taylor
5e6868a858
Run prettier
2023-02-27 10:28:49 +01:00
Josh Taylor
5caf848f94
Add steps for Google OAuth for OIDC
2023-02-27 10:28:49 +01:00
Juan Font
3e097123bf
Target ts 1.36 in integration tests
2023-02-26 15:35:27 +01:00
Juan Font
74447b02e8
Target Tailscale 1.36 when building
2023-02-26 15:35:27 +01:00
Juan Font
20e96de963
Update dependencies 20230226
2023-02-26 14:39:37 +01:00
Juan Font
7c765fb3dc
Update prettier action
...
Update prettier action
2023-02-26 13:54:30 +01:00
Michael Savage
dcc246c869
Fix OpenBSD build docs
...
- OpenBSD 7.2 installs go 1.19 by default
- Doubt you can run nix so skip the makefile/nix build and just go build directly
2023-02-26 12:54:47 +01:00
Àlex Torregrosa
cf7767d8f9
Add css to the /windows and /apple templates ( #1211 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2023-02-09 08:49:05 -05:00
Maxim Gajdaj
61c578f82b
Update running-headscale-linux.md
...
Option WorkingDirectory for headscale.service added
2023-02-09 08:17:28 -05:00
Kristoffer Dalby
6950ff7841
Add list of talks to the readme
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-07 17:04:14 +01:00
Kristoffer Dalby
e65ce17f7b
Add documentation to integration test framework
...
so tsic, hsic and scenario
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 16:25:58 +01:00
Kristoffer Dalby
b190ec8edc
Add section about running locally
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 16:25:58 +01:00
Kristoffer Dalby
c39085911f
Add node expiry test
...
This commits adds a test to verify that nodes get updated if a node in
their network expires.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
3c20d2a178
Update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
9187e4287c
Remove unused components from old integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
2b7bcb77a5
Stop using deprecated string function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
97a909866d
Use pingAll helper for all integration pinging
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
feeb5d334b
Populate the tags field on node
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
a840a2e6ee
Sort tailcfg.Node creation as upstream
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
4183345020
Do not collect services, we dont support it
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
50fb7ad6ce
Add TODOs for only sending patch updates
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
88a9f4b44c
Send control time in map response
...
This gives all the nodes the same constant time to work from
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-03 09:26:22 +01:00
Kristoffer Dalby
00fbd8dd93
Remove all tests before generating new ones
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-02 17:55:19 +01:00
Kristoffer Dalby
ce587d2421
Update test workflows
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-01 10:58:37 +01:00
Kristoffer Dalby
e1eb30084d
Remove new line at start of test template
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-01 10:58:37 +01:00
Kristoffer Dalby
673638afe7
Use ripgrep to find list of tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-02-01 10:58:37 +01:00
Kristoffer Dalby
da48cf64b3
Set OpenID Connect Expiry
...
This commit adds a default OpenID Connect expiry to 180d to align with
Tailscale SaaS (previously infinite or based on token expiry).
In addition, it adds an option use the expiry time from the Token sent
by the OpenID provider. This will typically cause really short expiry
and you should only turn on this option if you know what you are
desiring.
This fixes #1176 .
Co-authored-by: Even Holthe <even.holthe@bekk.no >
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-31 18:55:16 +01:00
Dominic Bevacqua
385fd93e73
Update changelog
2023-01-31 00:15:48 +01:00
Dominic Bevacqua
26edf24477
Allow split DNS configuration without requiring global nameservers
...
Align behaviour of dns_config.restricted_nameservers to tailscale.
Tailscale allows split DNS configuration without requiring global nameservers.
In addition, as per [the docs](https://tailscale.com/kb/1054/dns/#using-dns-settings-in-the-admin-console ):
> These nameservers also configure search domains for your devices
This commit aligns headscale to tailscale by:
* honouring dns_config.restricted_nameservers regardless of whether any global resolvers are configured
* adding a search domain for each restricted_nameserver
2023-01-31 00:15:48 +01:00
Kristoffer Dalby
83a538cc95
Rename IP specific function, add missing test case
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-30 15:56:38 +01:00
Kristoffer Dalby
cffa040474
Cancel old builds if new commits appear
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-30 14:57:10 +01:00
Kristoffer Dalby
727d95b477
Improve generated integration tests
...
- Save logs from control(headscale) on every run to tmp
- Upgrade nix-actions
- Cancel builds if new commit is pushed
- Fix a sorting bug in user command test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-30 14:43:03 +01:00
Juan Font
640bb94119
Do not show IsPrimary field as false in exit nodes
2023-01-29 14:54:09 +01:00
Juan Font
0f65918a25
Update tests
...
Fixed linting
2023-01-29 12:25:37 +01:00
Juan Font
3ac2e0b253
Enable both exit node routes (IPv4 and IPv6) at the same time.
...
As indicated by bradfitz in https://github.com/juanfont/headscale/issues/804#issuecomment-1399314002 ,
both routes for the exit node must be enabled at the same time. If a user tries to enable one of the exit node routes,
the other gets activated too.
This commit also reduces the API surface, making private a method that didnt need to be exposed.
2023-01-29 12:25:37 +01:00
Juan Font
b322cdf251
Updated changelog for v0.20.0
2023-01-29 11:46:37 +01:00
Johan Siebens
e128796b59
use smallzstd and sync pool
2023-01-27 12:03:24 +01:00
Kristoffer Dalby
6d669c6b9c
Migrate namespace_id to user_id column in machine and pak
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-26 11:07:26 +01:00
Kristoffer Dalby
8dadb045cf
Mark -n and --namespace as deprecated
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-26 10:22:38 +01:00
Christian Heusel
9f6e546522
modify the test to reflect the changes on the webinterface
...
related to 2d44a1c99c17
Signed-off-by: Christian Heusel <christian@heusel.eu >
2023-01-26 08:33:44 +01:00
Juan Font
9714900db9
Target Tailscale 1.36.0
2023-01-26 07:50:03 +01:00
Jan Hartkopf
cb25f0d650
Add hint for reverse proxying with Apache
2023-01-23 15:51:20 +01:00
caelansar
9c2e580ab5
put Where before Find
2023-01-20 10:50:29 +01:00
Christian Heusel
0ffff2c994
Update the node join instruction to reference "username"
...
related to https://github.com/juanfont/headscale/pull/1144
Signed-off-by: Christian Heusel <christian@heusel.eu >
2023-01-20 09:50:49 +01:00
Christian Heusel
c720af66d6
permalink in the limitations section to tailscale
...
The relative link was broken after one commit to the file
Signed-off-by: Christian Heusel <christian@heusel.eu >
2023-01-20 09:19:26 +01:00
Kristoffer Dalby
86a7129027
Update changelog, more explicit backup note
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-19 12:54:34 +01:00
Kristoffer Dalby
9eaa8dd049
Migrate DB: rename table is plural, order matters
...
The calls to AutoMigrate to other classes that refer to users will
create the table and it will break, it needs to be done before
everything else.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-19 12:54:34 +01:00
Kristoffer Dalby
81441afe70
update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
f19e8aa7f0
Fix failing tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
90287a6735
gofumpt
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
fb3e2dcf10
Rename namespace to user in docs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
bf0b85f382
Rename acl test file
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
5da0963aac
Migrate DB: rename namespace, automigrate user
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
da5c051d73
Lint fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
b98bf199dd
Regenerate go from proto
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
428d7c86ce
Rename namespace in protobuf files
...
While this truly breaks the point of the backwards compatible stuff with
protobuf, it does not seem worth it to attempt to glue together a
compatible API.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
af1ec5a593
Rename .go namespace files
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
e3a2593344
Rename [Nn]amespace -> [Uu]ser in go code
...
Use gopls, ag and perl to rename all occurances of Namespace
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Motiejus Jakštys
bafb6791d3
oidc: allow reading the client secret from a file
...
Currently the most "secret" way to specify the oidc client secret is via
an environment variable `OIDC_CLIENT_SECRET`, which is problematic[1].
Lets allow reading oidc client secret from a file. For extra convenience
the path to the secret will resolve the environment variables.
[1]: https://systemd.io/CREDENTIALS/
2023-01-14 17:03:57 +01:00
Motiejus Jakštys
6edac4863a
Makefile: remove a missing target
...
test_integration_oidc was removed in 0525bea593
2023-01-14 13:42:48 +01:00
Even Holthe
e27e01c09f
nodes list: expose expiration time
2023-01-12 13:43:21 +01:00
Even Holthe
dd173ecc1f
Refresh machines with correct new expiry
2023-01-12 13:43:21 +01:00
Kristoffer Dalby
8ca0fb7ed0
update ip_prefixes docs
...
we cant actually have arbitrary ip ranges, add a note about that.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-12 11:39:39 +01:00
Juan Font
6c714e88ee
Added entry for performance improvements in ACLs
2023-01-11 08:58:03 +01:00
Allen
a6c8718a97
ToStringSlice will lead to high CPU usage, early conversion can reduce cpu usage
2023-01-11 08:45:54 +01:00
Even Holthe
26282b7a54
Fix SIGSEGV crash related to map of state changes
...
See https://github.com/juanfont/headscale/issues/1114#issuecomment-1373698441
2023-01-10 22:26:21 +01:00
Kristoffer Dalby
93aca81c1c
Read integration test config from Env
...
This commit sets the Headscale config from env instead of file for
integration tests, the main point is to make sure that when we add per
test config, it properly replaces the config key and not append it or
something similar.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 23:06:43 +01:00
Kristoffer Dalby
81254cdf7a
Limit run regex for generated workflows
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 18:36:31 +01:00
Kristoffer Dalby
b3a0c4a63b
Add integration readme
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 12:32:24 +01:00
Kristoffer Dalby
376235c9de
make prettier ignore generated test flows
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 12:32:24 +01:00
Kristoffer Dalby
7274fdacc6
Generate github action jobs for integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 12:32:24 +01:00
Kristoffer Dalby
91c1f54b49
Remove "run all v2 job"
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 12:32:24 +01:00
Kristoffer Dalby
efd0f79fbc
Add script to generate integration test gitjobs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-06 12:32:24 +01:00
Juan Font
2084464225
Update CHANGELOG.md
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2023-01-05 14:59:02 +01:00
Juan Font
66ebbf3ecb
Preload AuthKey in machine getters
2023-01-05 14:59:02 +01:00
Juan Font
55a3885614
Added integration tests for ephemeral nodes
...
Fetch the machines from headscale
2023-01-05 14:59:02 +01:00
Juan Font
afae1ff7b6
Delete ephemeral machines on logout
...
Update changelog
Use dedicated method to delete
2023-01-05 14:59:02 +01:00
Juan Font
4de49f5f49
Add isEphemeral() method to Machine
2023-01-05 14:59:02 +01:00
Even Holthe
6db9656008
oidc: update changelog
2023-01-04 09:23:52 +01:00
Even Holthe
fecb13b24b
oidc: add basic docs
2023-01-04 09:23:52 +01:00
Even Holthe
23a595c26f
oidc: add test for expiring nodes after token expiration
2023-01-04 09:23:52 +01:00
Even Holthe
085912cfb4
expire machines after db expiry
2023-01-04 09:23:52 +01:00
Even Holthe
7157e14aff
add expiration from OIDC token to machine
2023-01-04 09:23:52 +01:00
Allen
4e2c4f92d3
reflect.DeepEqual is a value copy that causes golang to continuously allocate memory
2023-01-03 18:09:18 +01:00
Juan Font
893b0de8fa
Added tests on allowedip field for routing
2023-01-03 13:34:55 +01:00
Juan Font
9b98c3b79f
Send in AllowedIPs both primary routes AND enabled exit routes
2023-01-03 13:34:55 +01:00
Even Holthe
6de26b1d7c
Remove Tailscale v1.18.2 from test matrix
2023-01-02 16:06:12 +01:00
Christian Heusel
1f1931fb00
fix spelling mistakes
2023-01-01 22:45:16 +01:00
Christian Heusel
1f4efbcd3b
add changelog entry
2023-01-01 22:45:16 +01:00
Christian Heusel
711fe1d806
enumerate the config
2023-01-01 22:45:16 +01:00
Christian Heusel
e2c62a7b0c
document how to add new DNS records via extra_records
2023-01-01 22:45:16 +01:00
Christian Heusel
ab6565723e
add the possibility for custom DNS records
...
related to https://github.com/juanfont/headscale/issues/762
Co-Authored-By: Jamie Greeff <jamie@greeff.me >
Signed-off-by: Christian Heusel <christian@heusel.eu >
2023-01-01 22:45:16 +01:00
John Axel Eriksson
7bb6f1a7eb
domains/restricted_nameservers: check dnsConfig.Resolvers instead of dnsConfig.Nameservers
2022-12-31 19:06:32 +01:00
Avirut Mehta
549b82df11
Add Caddy instructions to reverse_proxy.md
2022-12-27 23:08:34 +01:00
Marc
036cdf922f
templates: fix typo "custm" -> "custom"
2022-12-27 12:02:33 +01:00
jimyag
b4ff22935c
update macos check
2022-12-25 15:45:45 +01:00
ma6174
5feadbf3fc
fix goroutine leak
2022-12-25 14:11:16 +01:00
Juan Font
3e9ee816f9
Add integration tests for logout with authkey
2022-12-22 20:02:18 +01:00
Juan Font
2494e27a73
Make WaitForTailscaleLogout a Scenario method
2022-12-22 20:02:18 +01:00
Juan Font
8e8b65bb84
Add ko-fi sponsor button
2022-12-22 17:25:49 +01:00
Juan Font
b7d7fc57c4
Add logout method to tsic
2022-12-22 00:09:21 +01:00
Juan Font
b54c0e3d22
Add integration tests that check logout and relogin
2022-12-21 20:52:08 +01:00
Juan Font
593040b73d
Run the Noise handlers under a new struct so we can access the noiseConn from the handlers
...
In TS2021 the MachineKey can be obtained from noiseConn.Peer() - contrary to what I thought before,
where I assumed MachineKey was dropped in TS2021.
By having a ts2021App and hanging from there the TS2021 handlers, we can fetch again the MachineKey.
2022-12-21 20:52:08 +01:00
Juan Font
6e890afc5f
Minor linting fixes
2022-12-21 08:28:53 +01:00
Fatih Acar
2afba0233b
fix(routes): ensure routes are correctly propagated
...
When using Tailscale v1.34.1, enabling or disabling a route does not
effectively add or remove the route from the node's routing table.
We must restart tailscale on the node to have a netmap update.
Fix this by refreshing last state change so that a netmap diff is sent.
Also do not include secondary routes in allowedIPs, otherwise secondary
routes might be used by nodes instead of the primary route.
Signed-off-by: Fatih Acar <facar@scaleway.com >
2022-12-20 15:39:59 +01:00
Anoop Sundaresh
91900b7310
Update remote-cli.md
...
Fixing the local binary path
2022-12-19 19:16:48 +01:00
Juan Font
55b198a16a
Clients are offline when expired
2022-12-19 15:56:12 +01:00
Juan Font
ca37dc6268
Update changelog
2022-12-15 00:13:53 -08:00
Juan Font
000c02dad9
Show online in CLI & API when isOnline() reports so
2022-12-15 00:13:53 -08:00
Juan Font
4532915be1
Refresh autogenerated grpc stuff
2022-12-15 00:13:53 -08:00
Juan Font
4b8d6e7c64
Include online field in proto for machine
2022-12-15 00:13:53 -08:00
Kristoffer Dalby
579c5827b3
regenerate proto with new plugin
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-14 00:05:29 -08:00
Kristoffer Dalby
01628f76ff
upgrade grpc-gateway plugin
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-14 00:05:29 -08:00
Kristoffer Dalby
53858a32f1
dont fail docker if nothing to delete
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-13 23:13:23 -08:00
Juan Font Alonso
2bf576ea8a
Disable Tailscale 1.16 in integration tests
2022-12-09 19:11:24 +01:00
github-actions[bot]
1faac0b3d7
docs(README): update contributors
2022-12-07 15:18:37 +01:00
Kristoffer Dalby
134c72f4fb
Set db_ssl to false by default, fixes #1043
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-07 14:58:47 +01:00
Zachary Newell
70f2f5d750
Added an OIDC AllowGroups option for authorization.
2022-12-07 08:53:16 +01:00
Kristoffer Dalby
4453728614
Murder docker container and network before run
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-06 08:52:21 +01:00
Juan Font
34107f9a0f
Updated changelog
2022-12-06 08:17:14 +01:00
Juan Font
52862b8a22
Port integration tests routes CLI to v2
...
Fix options signature
2022-12-06 08:17:14 +01:00
Juan Font
946d38e5d7
Minor linting fixes
...
Remove magic number (base10...)
2022-12-06 08:17:14 +01:00
Juan Font
78819be03c
Use the new routes API from the CLI
2022-12-06 08:17:14 +01:00
Juan Font
34631dfcf5
Refactored route grpc glue code
2022-12-06 08:17:14 +01:00
Juan Font
8fa9755b55
Updated generated pb code
...
Update swagger
2022-12-06 08:17:14 +01:00
Juan Font
1b557ac1ea
Update protobuf definitions + support methods for the API
...
Add more logging
Updated protos with new routes API
2022-12-06 08:17:14 +01:00
Juan Font
8170f5e693
Removed unused code and linting fixes
...
Another bunch of gosec/golint related fixes
Remove method no longer used
2022-12-06 08:17:14 +01:00
Juan Font
a506d0fcc8
Run handlePrimarySubnetFailover() with a ticker when Serve
2022-12-06 08:17:14 +01:00
Juan Font
6718ff71d3
Added helper methods for subnet failover + unit tests
...
Added method to perform subnet failover
Added tests for subnet failover
2022-12-06 08:17:14 +01:00
Juan Font
b62acff2e3
Refactor machine.go, and move functionality to routes.go + unit tests
...
Port routes tests to new model
Mark as primary the first instance of subnet + tests
In preparation for subnet failover, mark the initial occurrence of a subnet as the primary one.
2022-12-06 08:17:14 +01:00
Juan Font
ac8bff716d
Call processMachineRoutes when a new Map is received
2022-12-06 08:17:14 +01:00
Juan Font
fba77de4eb
Add Route DB model and migration from existing field
...
Add migration from Machine.EnabledRoutes to the new Route table
Cleanup route.go and add helper methods to process HostInfo
2022-12-06 08:17:14 +01:00
github-actions[bot]
d1bca105ef
docs(README): update contributors
2022-12-05 22:05:25 +01:00
Juan Font
6c2d6fa302
Do not explicitly set the protocols when ommited in ACL
2022-12-05 21:45:18 +01:00
Kristoffer Dalby
1015bc3e02
Upgrade to Tailscale 1.34.0
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
68c72d03b5
Prep changelog for new release
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
bd4b2da06e
Add changelog entry to correct version
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
7b8cf5ef1a
Add 1.34.0 to integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
638a3d48ec
fix nix run
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
4de676c64e
Add instructions for macOS GUI
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
a58a552f0e
Update macos/windows doc
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
0db16c7bbe
Update nix deps, get go 1.19.3 in
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 10:40:17 +01:00
Kristoffer Dalby
06f7e7cfd8
Tag dockerfiles to minor version so we dont have to care about patch
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 10:40:17 +01:00
Kristoffer Dalby
19f12f94c0
Make goreleaser use Nix
...
Eliminate one more place to make sure we use the same go version
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 10:40:17 +01:00
Kristoffer Dalby
95d3062c21
Add github action updater
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 10:40:17 +01:00
Kristoffer Dalby
86fa136a63
Upgrade go dependencies
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-05 10:40:17 +01:00
Juan Font
89c12072ba
added changelog for 0.17.1
2022-12-03 16:34:23 +01:00
Juan Font
54f701ff92
generateACLPolicy() no longer a Headscale method
2022-12-03 15:43:40 +01:00
Juan Font
5a70ea7326
Correct typo on standalone ( fixes #1021 )
2022-12-01 17:01:20 +01:00
Kristoffer Dalby
63cd3122e6
Add breaking change about noise private path
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-01 14:47:19 +01:00
Kristoffer Dalby
6f4c6c1876
Ignore tparallel where it doesnt make sense
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-12-01 14:45:11 +01:00
Kristoffer Dalby
eb072a1a74
mark some changes as more important
...
Signed-off-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-11-26 12:01:12 +01:00
Kristoffer Dalby
36b8862e7c
Add notes about current ssh status
...
Signed-off-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-11-26 11:53:31 +01:00
Even Holthe
d4e3bf184b
Add experimental flag to unit test
2022-11-26 11:53:31 +01:00
Even Holthe
c28ca27133
Add SSH ACL to changelog
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
c02e105065
Mark the flag properly experimental
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
22da5bfc1d
Enable SSH for tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
c6d31747f7
Add feature flag for SSH, and warning
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
91ed6e2197
Allow WithEnv to be passed multiple times
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
d71aef3b98
Mark all tests with Parallel
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
8a79c2e7ed
Do not retry on permission denied in ssh
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
f34e7c341b
Strip newline from hostname
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
e28d308796
Add negative tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Even Holthe
f610be632e
SSH: add test between namespaces
2022-11-26 11:53:31 +01:00
Even Holthe
fd6d25b5c1
SSH: Lint and typos
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
3695284286
Make simple initial test case
...
This commit makes the initial SSH test a bit simpler:
- Use the same pattern/functions for all clients as other tests
- Only test within _one_ namespace/user to confirm the base case
- Use retry function, same as taildrop, there is some funky going on
there...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
cfaa36e51a
Add method to expose container id
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
d207c30949
Ensure we have ssh in container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-26 11:53:31 +01:00
Even Holthe
519f22f9bf
SSH integration test setup
2022-11-26 11:53:31 +01:00
Even Holthe
52a323b90d
Add SSH capability advertisement
...
Advertises the SSH capability, and parses the SSH ACLs to pass to the
tailscale client. Doesn’t support ‘autogroup’ ACL functionality.
Co-authored-by: Daniel Brooks <db48x@headline.com >
2022-11-26 11:53:31 +01:00
github-actions[bot]
91559d0558
docs(README): update contributors
2022-11-25 08:58:13 +01:00
Orville Q. Song
25195b8d73
Update CHANGELOG.md
2022-11-24 16:13:47 +01:00
Orville Q. Song
e69176e200
Tweak
2022-11-24 16:13:47 +01:00
Orville Q. Song
d29d0222af
Add a note about the db_ssl field in the example config file
2022-11-24 16:13:47 +01:00
Orville Q. Song
72b9803a08
Change DBssl to string
2022-11-24 16:13:47 +01:00
Kristoffer Dalby
99e33181b2
Make displayName include basedomain if set
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-22 19:16:58 +01:00
Kristoffer Dalby
e7f322b9b6
Mark all tests to run in parallel
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-22 13:18:58 +01:00
Juan Font
1d36e1775f
Remove OIDC action
2022-11-21 22:07:27 +01:00
Juan Font
0525bea593
Remove legacy OIDC tests
2022-11-21 22:07:27 +01:00
Juan Font
2770c7cc07
Initial proposal for better routing
2022-11-21 21:58:22 +01:00
Juan Font
1b0e80bb10
Add OIDC integration tests
...
* Port OIDC integration tests to v2
* Move Tailscale old versions to TS2019 list
* Remove Alpine Linux container
* Updated changelog
* Releases: use flavor to set the tag suffix
* Added more debug messages in OIDC registration
* Added more logging
* Do not strip nodekey prefix on handle expired
* Updated changelog
* Add WithHostnameAsServerURL option func
* Reduce the number of namespaces and use hsic.WithHostnameAsServerURL
* Linting fix
* Fix linting issues
* Wait for ready outside the up goroutine
* Minor change in log message
* Add prefix to env var
* Remove unused env var
Co-authored-by: Juan Font <juan.font@esa.int >
Co-authored-by: Steven Honson <steven@honson.id.au >
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2022-11-21 21:51:54 +01:00
Kristoffer Dalby
4ccc528d96
Remove some very verbose error outputs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-21 14:37:50 +01:00
Juan Font
6a311f4ab6
Remove broken renovatebot
2022-11-20 17:19:50 +01:00
manju-rn
a49a405413
Correction in the sample config file
...
Added the db_type in the sample config.yaml Without this entry, the container throws Unsupported DB error
`db_type: sqlite3`
2022-11-20 17:12:13 +01:00
Juan Font
24f946e2e9
Fix completion issues ( fixes #839 )
2022-11-20 13:57:38 +01:00
Juan Font
c3cdb340de
Increase integration tests timeout to 120m
2022-11-20 12:56:07 +01:00
Juan Font
935319a218
Remove mTLS from doc and config example
2022-11-19 19:50:34 +01:00
Juan Font
4c7e15a7ce
Remove mTLS config from integration config
2022-11-19 19:50:34 +01:00
Juan Font
d461097247
Remove mTLS stuff from code
2022-11-19 19:50:34 +01:00
Juan Font
f90a3c196c
Move TS WaitForReady outside up goroutine
2022-11-19 17:16:08 +01:00
Juan Font Alonso
751cc173d4
Fix issue when CLI is configured in config file
2022-11-18 19:19:56 +01:00
Juan Font Alonso
ff134f2b8e
Fix remote CLI when there is no config file present
2022-11-18 19:19:56 +01:00
Arnar Gauti Ingason
6d3ede1367
Add support for NextDNS resolver
2022-11-18 09:38:46 +01:00
Steven Honson
c0884f94b8
Release: tag every release with develop
2022-11-17 16:52:12 +01:00
Kristoffer Dalby
3d8dd68b14
default to localhost, not listen on all
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-16 17:37:35 +01:00
Kristoffer Dalby
b02e88364e
Fix test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-16 17:37:35 +01:00
Kristoffer Dalby
9790831afb
Make config example "local dev first"
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-16 17:37:35 +01:00
Juan Font Alonso
2d79179141
Updated changelog
2022-11-15 21:28:26 +01:00
Juan Font Alonso
275cc28193
Do not strip nodekey prefix on handle expired
2022-11-15 21:28:26 +01:00
Juan Font
c5ba7552c5
Added more logging
2022-11-15 21:28:26 +01:00
Juan Font
8909f801bb
Added more debug messages in OIDC registration
2022-11-15 21:28:26 +01:00
Steven Honson
3d4af52b3a
Releases: use flavor to set the tag suffix
2022-11-15 11:36:38 +01:00
Juan Font
6391555dab
Updated changelog
2022-11-15 08:42:29 +01:00
Juan Font
8cc5b2174b
Remove Alpine Linux container
2022-11-15 08:42:29 +01:00
Juan Font
9269dd01f5
Move Tailscale old versions to TS2019 list
2022-11-14 23:06:30 +01:00
Juan Font
ef68f17a96
Return the correct error on cache miss
2022-11-14 18:34:27 +01:00
Juan Font
f74266f8f8
OIDC code cleanup and harmonize with regular web auth
2022-11-14 18:34:27 +01:00
Kristoffer Dalby
46df219ed3
Add testname identifier to hs container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
835288d864
Remove unused variable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
93d56362af
Lock and unify headscale start/get method
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
4799859be0
Fix renamed method
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
8e44596171
less verbose command output
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
d479234058
Split ts versions into 2019/2021 for dedicated tests later
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
3fc5866de0
Remove duplicate function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
f3c40086ac
Make TLS setup work automatically
...
This commit injects the per-test-generated tls certs into the tailscale
container and makes sure all can ping all. It does not test any of the
DERP isolation yet.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
09ed21edd8
Remove duplicate function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
456479eaa1
Rename and move wait for headscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
cb87852825
Add nolint to gosec stuff that doesnt matter because test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
69440058bb
Clean up cert function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
9bc6ac0f35
Make TLS setup work automatically
...
This commit injects the per-test-generated tls certs into the tailscale
container and makes sure all can ping all. It does not test any of the
DERP isolation yet.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Juan Font Alonso
89ff5c83d2
Add web flow auth integration tests
2022-11-14 08:47:02 +01:00
Juan Font Alonso
0a47d694be
Return the real port of the container
2022-11-14 08:47:02 +01:00
Juan Font Alonso
73c84d4f6a
Print hostname of the machine registered
2022-11-14 08:47:02 +01:00
Juan Font Alonso
a9251d6652
Fixed linter issues
2022-11-13 22:33:41 +01:00
Juan Font Alonso
f9c44f11d6
Added method to run tailscale up without authkey
2022-11-13 22:33:41 +01:00
Juan Font Alonso
1f8bd24a0d
Return stderr in tsic.Execute
2022-11-13 22:33:41 +01:00
Juan Font Alonso
7bf2eb3d71
Update Tailscale interface with new Execute signature
2022-11-13 22:33:41 +01:00
Juan Font Alonso
f5a5437917
disable interfacebloat linter
2022-11-13 18:30:00 +01:00
Juan Font Alonso
9989657c0f
Wait for tailscale client to be ready after tailscale up
2022-11-13 18:30:00 +01:00
Juan Font Alonso
cb2790984f
Added WaitForReady() to Tailscale interface
...
When using running `tailscale up` in the AuthKey flow process, the tailscale client immediately enters PollMap after registration - avoiding a race condition.
When using the web auth (up -> go to the Control website -> CLI `register`) the client is polling checking if it has been authorized. If we immediately ask for the client IP, as done in CreateHeadscaleEnv() we might have the client in NotReady status.
This method provides a way to wait for the client to be ready.
Signed-off-by: Juan Font Alonso <juanfontalonso@gmail.com >
2022-11-13 18:30:00 +01:00
Juan Font Alonso
18c0009a51
Fix oidc.go linting issues
...
Signed-off-by: Juan Font Alonso <juanfontalonso@gmail.com >
2022-11-13 15:42:54 +01:00
Juan Font Alonso
d038df2a88
Added ts2019 buildtag to CI config
...
Otherwise we are getting utils.go:119:6: `decode` is unused (deadcode)
Signed-off-by: Juan Font Alonso <juanfontalonso@gmail.com >
2022-11-13 15:42:54 +01:00
Mesar Hameed
d8e9d95a3b
config-example.yaml: fix typos and improve english.
2022-11-10 15:52:57 +00:00
Grigoriy Mikhalkin
0e405c7ce0
remove private key constant errors from NewHeadscale
2022-11-10 15:35:22 +00:00
Anton Schubert
21f0e089b6
fix noise mapResponse updates, fixes #838
2022-11-10 14:44:44 +00:00
kyra
cfda804726
Provide LoginName when registering with pre-auth key
2022-11-06 19:09:52 +01:00
github-actions[bot]
d6b383dd2f
docs(README): update contributors
2022-11-05 16:03:17 +01:00
LiuHanCheng
07f92e647c
fix bug in #912 ( #914 )
2022-11-05 09:07:22 +01:00
LiuHanCheng
bf87b33292
feat: add information to the /apple page for the macOS standalone client user ( #915 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc >
2022-11-04 12:27:23 +01:00
Kristoffer Dalby
527b580f5e
Add build flag to enable TS2019 ( #928 )
2022-11-04 11:26:33 +01:00
Kristoffer Dalby
c31328a54a
Fix bitrotted versions in gh ci
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-04 10:46:23 +01:00
Kristoffer Dalby
b2c0e37122
Run on correct change
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-04 10:35:19 +01:00
Kristoffer Dalby
889223e35f
Add experimental kradalby gh runner
...
Remove old v2 runner in favour of self-hosted
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-04 10:35:19 +01:00
Kristoffer Dalby
6e83b7f06b
Give workflows better names
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 14:59:15 +01:00
Kristoffer Dalby
31d427b655
Run more tests in parallel
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 13:31:51 +01:00
Kristoffer Dalby
d8c856e602
Add basic accept all acl to all test as example
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
aad4c90fe6
Add options to hsic, ACL and env overrides
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
4f9fe93146
golangci-lint --fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
96fe6aa3a1
Remove unused func, comment out configobject way
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
947e961a3a
Write headcsale config file from code, not depend on directory
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
43731cad2e
Add helper function to add files to hs container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
ac15b21720
Remove tab from YAML
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
dfc03a6124
Ditch stupid distroless image for debug/test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-03 12:53:00 +01:00
Benjamin Roberts
8a07381e3a
Fix prefix length comparison bug in AutoApprovers route evaluation ( #862 )
2022-11-01 12:00:40 +01:00
Kristoffer Dalby
0cf9c4ce8e
Add nolint since go os has weird casing
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-31 17:58:03 +01:00
Kristoffer Dalby
e8b3de494e
Fix lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-31 17:58:03 +01:00
Kristoffer Dalby
21ec543d37
Give user better feedback if headscale socket is unwritable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-31 17:58:03 +01:00
Kristoffer Dalby
ca8bca98ed
Add support for "override local DNS" ( #905 )
...
* Add support for "override local DNS"
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* Update cli dump test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-31 16:26:18 +01:00
Jiang Zhu
4e8b95e6cd
Fix issue 660 ( #874 )
...
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2022-10-31 15:59:50 +01:00
Kristoffer Dalby
ad31378d92
Update vendor sha in nix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-30 23:16:07 +01:00
Kristoffer Dalby
3a6257b193
Update everything else
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-30 23:16:07 +01:00
Kristoffer Dalby
fafa3f8211
Upgrade tailscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-30 23:16:07 +01:00
Kristoffer Dalby
62e3fa0011
Update nix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-30 23:16:07 +01:00
Kristoffer Dalby
94ad0a1555
Remove ip_prefix, its been deprecated for a long time ( #899 )
...
* Remove ip_prefix, its been deprecated for a long time
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* update changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2022-10-30 22:31:18 +01:00
Juan Font
c1c22a4b51
Merge pull request #897 from kradalby/integration-remove-v1-genera
...
Remove v1 general integration tests
2022-10-30 21:49:49 +01:00
Juan Font
611f7c374c
Merge branch 'main' into integration-remove-v1-genera
2022-10-30 21:46:33 +01:00
Kristoffer Dalby
91c0a153b0
Merge pull request #890 from kradalby/integration-v2-cli
2022-10-28 18:46:04 +02:00
Kristoffer Dalby
73eae8e2cf
Merge branch 'main' into integration-v2-cli
2022-10-28 16:13:21 +02:00
Kristoffer Dalby
341db0c5c9
Merge pull request #895 from puzpuzpuz/update-xsync-version
2022-10-28 16:12:38 +02:00
Kristoffer Dalby
2ca286ee8c
Merge branch 'main' into integration-v2-cli
2022-10-28 15:29:43 +02:00
Kristoffer Dalby
dde39aa24c
Remove general v1 makefile entry
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-28 15:21:11 +02:00
Kristoffer Dalby
bcdd34b01e
Remove v1 general integration tests code
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-28 15:10:45 +02:00
Kristoffer Dalby
e45ba37ec5
Remove v1 general integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-28 15:10:30 +02:00
Kristoffer Dalby
d69a5f621e
Merge branch 'main' into update-xsync-version
2022-10-28 10:21:08 +02:00
Kristoffer Dalby
7f69b08bc8
Merge pull request #896 from kradalby/update-golines
2022-10-28 10:20:20 +02:00
Kristoffer Dalby
5d3c02702b
Update golines
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-28 09:30:56 +02:00
Kristoffer Dalby
1469425484
update flake vendor hash
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-28 09:28:20 +02:00
Andrey Pechkurov
0e12b66706
Simplify code around latest state change map updates
2022-10-27 23:22:33 +03:00
Kristoffer Dalby
7e6ab19270
Port preauthkey subcommand tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
5013187aaf
Add some sort stability
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
239ef16ad1
Add preauthkey command test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
cb61a490e0
Add namespace command test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
2c0488da0b
Add Execute helper for controlserver
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
a647e6af24
Merge pull request #889 from kradalby/integration-v2-resolve-magicdns
2022-10-25 17:56:06 +02:00
Kristoffer Dalby
fe4e05b0bc
only print stdout on err
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-25 09:24:05 +02:00
Kristoffer Dalby
54e3a0d372
Test with a longer timeout
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-25 08:44:25 +02:00
Juan Font
e7e2c7804b
Merge branch 'main' into integration-v2-resolve-magicdns
2022-10-25 00:10:28 +02:00
Juan Font
5c9c4f27fe
Merge pull request #892 from kradalby/integration-v2-no-verbose
...
Remove verbose flag for v2 tests, increase timeout
2022-10-25 00:10:07 +02:00
Juan Font
21b06f603a
Merge branch 'main' into integration-v2-no-verbose
2022-10-25 00:08:50 +02:00
Juan Font
a14f482ef7
Merge pull request #891 from kradalby/integration-ditch-retry
...
Integration, remove retry
2022-10-25 00:08:38 +02:00
Kristoffer Dalby
86c132c8b2
Remove verbose flag for v2 tests, increase timeout
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-24 17:14:55 +02:00
Kristoffer Dalby
2b10226618
Remove extra line
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-24 16:48:25 +02:00
Kristoffer Dalby
23a0946e76
Integration, remove retry
...
The retry has no real function as it will just fail on
"container exists" on the old tests and the new test will
just try forever before it eventually fails.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-24 16:46:21 +02:00
Kristoffer Dalby
7015d72911
port resolve magicdns test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-24 14:59:14 +02:00
Kristoffer Dalby
76689c221d
remove fixed todo
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-24 14:58:02 +02:00
Kristoffer Dalby
8d46986a87
Merge pull request #888 from juanfont/update-contributors
2022-10-23 17:47:09 +02:00
github-actions[bot]
b22e628b49
docs(README): update contributors
2022-10-23 14:33:02 +00:00
Kristoffer Dalby
9c30939e3f
Merge pull request #887 from kradalby/integration-v2-taildrop
2022-10-23 16:32:11 +02:00
Kristoffer Dalby
018b1d68f2
Migrate taildrop test to v2
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 14:13:22 +02:00
Kristoffer Dalby
ae189c03ac
Merge pull request #884 from kradalby/integration-v2-ping-by-hostname
2022-10-23 14:12:06 +02:00
Kristoffer Dalby
7155b22043
Factor out some commonly used patterns
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 12:41:35 +02:00
Kristoffer Dalby
40c048fb45
Fix lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 12:01:03 +02:00
Kristoffer Dalby
53b4bb220d
Fixup after ts interface
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:55:37 +02:00
Kristoffer Dalby
d706c3516d
Remove 1.16 from FQDN, bump 1.32.1
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:50:19 +02:00
Kristoffer Dalby
cbbf9fbdef
Use FQDN from tailscale client
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:50:19 +02:00
Kristoffer Dalby
d8144ee2ed
Add initial pingallbyhostname
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:50:16 +02:00
Kristoffer Dalby
fa3d21cbc0
Rename pingall test to signal ip
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:50:03 +02:00
Kristoffer Dalby
d242ceac46
Make hostname dns safe, allow string in ping command
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 11:50:01 +02:00
Juan Font
ecce82d44a
Merge pull request #875 from thetillhoff/main
...
Unify code snippet comment location
2022-10-22 18:10:22 +02:00
Juan Font
463180cc2e
Merge branch 'main' into main
2022-10-22 16:22:51 +02:00
Juan Font
129afdb157
Merge pull request #871 from kradalby/integration-ts-interface
...
Integration: make TailscaleClient interface
2022-10-22 16:22:40 +02:00
Till Hoffmann
701f990a23
Unify code snippet comment location
2022-10-22 00:12:24 +02:00
Kristoffer Dalby
e112514a3b
Merge branch 'main' into integration-ts-interface
2022-10-21 15:37:21 +02:00
Kristoffer Dalby
babd303667
Merge pull request #771 from shanna/feature-random-suffix-on-collision
2022-10-21 15:14:28 +02:00
Kristoffer Dalby
2d170fe339
update tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-21 14:54:57 +02:00
Kristoffer Dalby
bc1c1f5ce8
Fix most nil pointers, actually make it check for unique across headscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-21 14:42:37 +02:00
Kristoffer Dalby
830d59fe8c
Merge branch 'main' into feature-random-suffix-on-collision
2022-10-21 13:34:15 +02:00
Kristoffer Dalby
c9823ce347
Use TailscaleClient interface instead of tsic
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-21 13:17:54 +02:00
Kristoffer Dalby
8c4744acd9
make TailscaleClient interface
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-21 13:17:38 +02:00
Juan Font
9c16d5e511
Merge pull request #843 from phpmalik/patch-1
...
Fix spelling error
2022-10-21 06:23:59 +02:00
Juan Font
40b3de9894
Merge branch 'main' into feature-random-suffix-on-collision
2022-10-21 05:19:53 +02:00
Juan Font
1eea9c943c
Merge branch 'main' into patch-1
2022-10-21 05:19:23 +02:00
Juan Font
399c3255ab
Merge pull request #852 from kevin1sMe/main
...
Update document about reverse-proxy
2022-10-21 05:19:08 +02:00
Juan Font
852cb90fcc
Merge branch 'main' into main
2022-10-21 05:13:37 +02:00
Juan Font
587a016b46
Merge pull request #856 from kradalby/integration-v2
...
Integration tests v2
2022-10-21 05:12:17 +02:00
Kristoffer Dalby
b2bca2ac81
Only run integration tests from dir in new tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 16:00:24 +02:00
Kristoffer Dalby
6d8c18d4de
Fix golangcilint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
12ee9bc02d
Fix golangcilint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
8502a0acda
dont request tty
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
36ad0003a9
golangci-lint --fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
4cb7d63e8b
Set better names for different integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
2bf50bc205
Add new integration tests to ci
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
39bc6f7e01
Port PingAll test to new test suite
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
0db608a7b7
Add tailscale versions, waiters and helpers for scenario
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
3951f39868
Add wait for peers and status to tsic
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
c90d0dd843
remove the need to bind host port
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
84f9f604b0
go mod tidy
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
aef77a113c
use variable for namespace
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
13aa845c69
Add comment about scenario test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
b0a4ee4dfe
test login with one node
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
25e39d9ff9
Add get ips command to scenario
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
f109b54e79
Join test suite container to network, allowing seperate networks
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
eda4321486
Skip integration tests on short or lack of docker
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
a9c3b14f79
Define a "scenario", which is a controlserver with nodes
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
f68ba7504f
Move some helper functions into dockertestutil package
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
b331e3f736
hsic: ControlServer implementation of headscale in docker
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
308b9e78a1
Defince control server interface
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Kristoffer Dalby
fa8b02a83f
tsic: Tailscale in Container abstraction
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00
Juan Font
a39504510a
Merge pull request #865 from kradalby/integration-no-build-tags
...
Do not use build tags for running integration tests
2022-10-18 15:36:09 +02:00
Kristoffer Dalby
2f36a11a8e
use short flag for nix build test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:08:48 +02:00
Kristoffer Dalby
4df47de3f2
add nolint to integrationtests, they are going away ™️
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 14:57:22 +02:00
Kristoffer Dalby
dfadb965b7
Use short test to signal that we dont run integration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 14:45:18 +02:00
Kristoffer Dalby
c6f82c3646
Switch from hacking buildtags to selecting tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 14:41:48 +02:00
Kristoffer Dalby
32c21a05f8
cache go mod in docker, speed up local
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 14:41:20 +02:00
kevinlin
79864e0165
Fmt md with prettier
2022-10-15 00:11:57 +08:00
kevinlin
06e12f7020
Update: tips about warnning log
2022-10-15 00:11:05 +08:00
kevinlin
3659461666
Update reverse-proxy document for istio/envoy
2022-10-15 00:11:05 +08:00
Juan Font
e96bceed4c
Merge pull request #859 from kradalby/new-integration-versions
...
Add back head and unstable, ts 1.32.0
2022-10-14 10:44:25 +02:00
Kristoffer Dalby
ff217ccce8
Add back head and unstable, ts 1.32.0
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-14 09:12:13 +02:00
Juan Font
4dd2eef5d1
Merge pull request #855 from Donran/main
...
Fix no arguments panic
2022-10-13 22:50:49 +02:00
Juan Font
907aa07e51
Merge branch 'main' into main
2022-10-13 22:30:45 +02:00
Juan Font
0048ed07a2
Merge pull request #853 from zhzy0077/patch-1
...
Fix the proposed noise private_key_path
2022-10-13 22:30:02 +02:00
Juan Font
88d12873c5
Merge branch 'main' into patch-1
2022-10-13 22:28:24 +02:00
Pontus N
9f58eebfe1
Fix zero arguments error
2022-10-13 15:17:18 +02:00
Kristoffer Dalby
cf40d2a892
Merge pull request #854 from kradalby/integration-split
2022-10-13 10:15:13 +02:00
Kristoffer Dalby
21dd212349
Split integration tests into seperate jobs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-13 05:50:41 +02:00
Zhiyuan Zheng
073308f1a3
Fix the proposed noise private_key_path
...
As indicated by the comment, the default /var/lib/headscale path is not writable in the container. However the sample setting is not following that like `private_key_path`
2022-10-11 22:55:54 +08:00
Kristoffer Dalby
03194e2d66
Merge branch 'main' into feature-random-suffix-on-collision
2022-10-11 08:24:21 +02:00
Kristoffer Dalby
f18e22224c
Merge pull request #844 from kradalby/container-exist-fix
...
Run integration tests inside docker, dont depend on local platform
2022-10-08 12:25:59 +02:00
Kristoffer Dalby
8ee35c9c22
Stuff
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
d900f48d38
expose right porsts
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
a846e13c78
Expose and use ports consistently
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
ed2236aa24
Add buildtags to pls
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
a94ed0586e
Run all integration tests fully in docker
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
22cabc16d7
No interactive tty
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
88931001fd
Fail correctly if container exist
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
f3dbfc9045
Style change
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
85df2c80a8
Run oidc tests fully in docker
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
aca3a667c4
Fix declaration of pointer
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
a0ec3690b6
Fix error declaration
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
37a4d41d0e
Make addr configurable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
382a37f1e1
Test against last patch version
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
201f81ce00
Make sure mockoidc is up, has unique name and removed if exist
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
4904ccc3c3
Make sure mock container is removed before started
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
6b67584d47
Fix DERP name in integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-07 23:56:26 +02:00
Juan Font
d575dac73a
Merge pull request #823 from kradalby/sanitise-machine-key-url
...
Protect against user injection for registration CLI page
2022-10-04 16:01:19 +02:00
Juan Font
5333df283a
Merge branch 'main' into sanitise-machine-key-url
2022-10-04 14:31:28 +02:00
Kristoffer Dalby
d56ad2917d
Fix nolint comment
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-03 12:29:13 +02:00
Kristoffer Dalby
df36bcfd39
Fix machine test from marger
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-03 12:29:13 +02:00
github-actions[bot]
a3d3ad2208
docs(README): update contributors
2022-10-03 12:29:13 +02:00
phpmalik
0b0fb0af22
Minor change
...
Spelling mistake
listning -> listening
2022-10-03 12:59:39 +05:30
=
2aebd2927d
Random suffix only on collision.
...
0.16.0 introduced random suffixes to all machine given names
(DNS hostnames) regardless of collisions within a namespace.
This commit brings Headscale more inline with Tailscale by only
adding a suffix if the hostname will collide within the namespace.
The suffix generation differs from Tailscale.
See https://tailscale.com/kb/1098/machine-names/
2022-10-03 09:13:56 +02:00
Kristoffer Dalby
c00e5599b0
Merge pull request #840 from juanfont/update-contributors
2022-10-03 09:08:13 +02:00
github-actions[bot]
72e2fa46c7
docs(README): update contributors
2022-09-30 08:23:20 +00:00
Kristoffer Dalby
98f5b7f638
Merge pull request #837 from ShadowJonathan/patch-1
2022-09-30 10:22:38 +02:00
Jonathan de Jong
70ecda6fd1
Fix warning on success
2022-09-27 11:51:00 +02:00
Kristoffer Dalby
5fe6538c02
Merge pull request #831 from kradalby/fix-https-listen
2022-09-26 14:02:56 +02:00
Kristoffer Dalby
84c4b0336f
Merge branch 'main' into fix-https-listen
2022-09-26 12:13:16 +02:00
Kristoffer Dalby
8fbba1ac94
Merge pull request #830 from kradalby/nix-overlay
2022-09-26 12:13:05 +02:00
Kristoffer Dalby
1a30bcba91
Merge branch 'main' into nix-overlay
2022-09-26 11:50:25 +02:00
Kristoffer Dalby
ed58b2e4e2
Merge branch 'main' into fix-https-listen
2022-09-26 11:50:20 +02:00
Kristoffer Dalby
5f975cbb50
Merge pull request #829 from kradalby/oidc-dependency
2022-09-26 11:49:53 +02:00
Kristoffer Dalby
81dd9b2386
format
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 11:34:04 +02:00
Kristoffer Dalby
9088521252
Move lets enc listener into go routine
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 11:33:48 +02:00
Kristoffer Dalby
fc6a1e15fc
Revert overlay overlapping
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 11:13:42 +02:00
Kristoffer Dalby
94be5ca295
Nix update
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:50:41 +02:00
Kristoffer Dalby
804d9d8196
Format nix with alejandra
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:48:59 +02:00
Kristoffer Dalby
d0e945fdd7
_ unused variable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:48:37 +02:00
Kristoffer Dalby
98e7842c26
Add nix overlay to flake
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:47:49 +02:00
Kristoffer Dalby
24629895c7
Add new config option to cli integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:14:46 +02:00
Kristoffer Dalby
256b6cb54d
Add new option to config-example
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:01:15 +02:00
Kristoffer Dalby
6b4d53315b
Update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 10:01:01 +02:00
Kristoffer Dalby
fb25a06a66
Preserve current behaviour with a config flag
...
Add a configuration flag (default true to preserve current behaviour) to
allow headscale to start without OIDC being able to initialise.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 09:57:28 +02:00
Kristoffer Dalby
dbe58e53e4
Allow headscale to start if oidc setup fails.
...
This commit makes headscale fall back to CLI authentication if oidc
fails to initialised and posts a warning to users.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 09:52:32 +02:00
Kristoffer Dalby
8dcc82ceb3
Use oidc if it initialised, not if it is configured
...
OIDC might be configured, but unable to be initialised, this only runs
the oidc cycle if it is actually successfully set up/initialised.
Prep for next commit
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-26 09:51:23 +02:00
Kristoffer Dalby
8be14ef6fe
gofumpt
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-23 11:53:42 +02:00
Kristoffer Dalby
2bb34751d1
Validate the incoming nodekey with regex before attempting to parse
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-23 11:53:42 +02:00
Kristoffer Dalby
d06ba7b522
Merge branch 'main' into sanitise-machine-key-url
2022-09-23 11:09:23 +02:00
Kristoffer Dalby
a507a04650
Merge pull request #763 from tsujamin/autoapprovers
2022-09-23 11:07:53 +02:00
Benjamin George Roberts
7761a7b23e
fix autoapprover test following tagged authkey change
2022-09-23 18:46:35 +10:00
Benjamin George Roberts
6d2cfd52c5
Merge branch 'main' into autoapprovers
2022-09-23 18:44:36 +10:00
Kristoffer Dalby
75a8fc8b3e
Update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-23 10:44:29 +02:00
Kristoffer Dalby
8fa05c1e72
Merge pull request #767 from tsujamin/preauthkey-tags
2022-09-23 10:42:42 +02:00
Kristoffer Dalby
93082b8092
Protect against user injection for registration CLI page
...
This commit addresses a potential issue where we allowed unsanitised
content to be passed through a go template without validation.
We now try to unmarshall the incoming node key and fails to render the
template if it is not a valid node key.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-09-23 10:39:42 +02:00
Benjamin George Roberts
d764f52f24
Update changelog
2022-09-23 18:16:16 +10:00
Benjamin George Roberts
e5decbd0fa
Update changelog
2022-09-23 18:13:48 +10:00
Kristoffer Dalby
8a1c0e0e9b
Merge branch 'main' into preauthkey-tags
2022-09-23 18:11:27 +10:00
Benjamin Roberts
5b12ab9894
Merge branch 'main' into autoapprovers
2022-09-23 18:06:31 +10:00
Benjamin George Roberts
c52e3aafe6
remove unnecessary checks on slices
2022-09-23 18:04:30 +10:00
Juan Font
a46170e2a1
Merge pull request #793 from juanfont/remove-sponsorship
...
Remove sponsor buttons
2022-09-21 19:50:11 +02:00
Juan Font
aca1c1b156
Merge branch 'main' into remove-sponsorship
2022-09-21 18:13:00 +02:00
Juan Font
09863b540d
Merge branch 'main' into preauthkey-tags
2022-09-21 18:03:35 +02:00
Juan Font
adb352e663
Merge branch 'main' into autoapprovers
2022-09-21 17:53:17 +02:00
Juan Font
c9b39da6b9
Merge pull request #790 from mike-lloyd03/reverse-proxy
...
Add reverse proxy documentation
2022-09-21 17:52:59 +02:00
Juan Font
6fe86dff00
Merge branch 'main' into remove-sponsorship
2022-09-21 17:47:43 +02:00
Juan Font
9b1dcb2f0c
Merge branch 'main' into reverse-proxy
2022-09-21 17:47:13 +02:00
Juan Font
22c68fff13
Merge pull request #815 from juanfont/remove-gin-references
...
Removed gin from go.sum (Github security notice)
2022-09-21 17:45:12 +02:00
Juan Font
ddd92822b0
Merge branch 'main' into remove-gin-references
2022-09-21 17:26:23 +02:00
Juan Font
bd6282d1e3
Merge pull request #801 from juanfont/oidc-integration-testing
...
Add integration tests for OIDC authentication
2022-09-21 17:26:04 +02:00
Juan Font
7092a3ea47
Merge branch 'oidc-integration-testing' of https://github.com/juanfont/headscale into oidc-integration-testing
2022-09-21 15:02:13 +00:00
Juan Font
695359862e
Return stderr too in ExecuteCommand
2022-09-21 15:01:26 +00:00
Juan Font
95948e03c9
Added indication of workaround for #814
2022-09-21 14:47:48 +00:00
Mike Lloyd
e286ba817b
Format reverse-proxy.md
2022-09-20 20:12:45 -07:00
Juan Font
8aa0eefedd
Merge branch 'main' into oidc-integration-testing
2022-09-20 23:43:45 +02:00
Juan Font
e6e5872b4b
Merge branch 'main' into reverse-proxy
2022-09-20 23:34:44 +02:00
Juan Font
2c73f8ee62
Merge branch 'main' into remove-gin-references
2022-09-20 23:32:42 +02:00
Juan Font
cdc8bab7d9
Merge pull request #768 from kazauwa/feature/json-logs
...
toggle json logging via config
2022-09-20 23:32:10 +02:00
Juan Font
f2928d7dcb
Removed gin from go.sum (Github security notice)
2022-09-20 21:26:11 +00:00
Juan Font
44be239723
Merge branch 'main' into reverse-proxy
2022-09-20 23:16:21 +02:00
Juan Font
397754753f
Merge branch 'main' into feature/json-logs
2022-09-20 23:11:29 +02:00
Juan Font
e87b470996
Removed fmt.Println for linting
2022-09-20 21:06:43 +00:00
Juan Font
083d2a871c
Linting fixes
2022-09-20 21:02:44 +00:00
Juan Font
7a171cf5ea
Added sleep to workaround #814
2022-09-20 20:54:58 +00:00
Juan Font
1563d7555f
Use Headscale container to run mockoidc
2022-09-20 20:42:50 +00:00
Juan Font
2e97119db8
Added derp config to OIDC etc
2022-09-20 20:42:12 +00:00
Juan Font
b3a53bf642
Do not load the config for CLI mockoidc (and version)
2022-09-20 19:59:22 +00:00
Juan Font
a3f18f248c
Add internal mockoidc command
2022-09-20 19:58:36 +00:00
Juan Font
1c267f72e0
Capture listen error on mockoidc
2022-09-19 23:07:47 +00:00
Juan Font
becf918b78
Merge branch 'main' into remove-sponsorship
2022-09-18 23:58:42 +02:00
Juan Font
9c58395bb3
Removed unused param after routes fix
2022-09-18 21:40:52 +00:00
Juan Font
b117ca7720
Added missing TLS key for testing
2022-09-18 21:26:47 +00:00
Juan Font
d83a28bd1b
Merge branch 'main' into oidc-integration-testing
2022-09-18 23:25:01 +02:00
Juan Font
42ef71bff9
Merge pull request #811 from kradalby/primary-routes
...
Fix subnet routers
2022-09-18 21:59:25 +02:00
Kristoffer Dalby
f2da1a1665
Add comment and update changelog
...
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2022-09-18 12:14:49 +02:00
Kristoffer Dalby
356b76fc56
Format
...
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2022-09-18 11:37:38 +02:00
Kristoffer Dalby
33ae56acfa
Add primary routes to node
...
Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc >
2022-09-18 11:36:35 +02:00
Juan Font
9923adcb8b
Merge branch 'main' into feature/json-logs
2022-09-15 00:22:18 +02:00
Juan Font Alonso
c21479cb9c
Print docker network config
2022-09-15 00:06:17 +02:00
Juan Font Alonso
3abca99b0c
Add logs for issues in Actions
2022-09-14 23:32:19 +02:00
Igor Perepilitsyn
874d6aaf6b
Make styling fixes
2022-09-11 21:44:28 +02:00
Igor Perepilitsyn
ae4f2cc4b5
Update changelog
2022-09-11 21:37:38 +02:00
Igor Perepilitsyn
dd155dca97
Create a distinct log section in config
2022-09-11 21:37:23 +02:00
Juan Font Alonso
99307d1576
Update nix sum
2022-09-08 20:36:44 +02:00
Juan Font Alonso
b2f3ffbc5a
Run integration tests in Actions
2022-09-08 19:49:37 +02:00
Juan Font Alonso
5774b32e55
Include OIDC in the full execution
2022-09-08 19:48:51 +02:00
Juan Font Alonso
41353a57c8
Added integration tests for OIDC on Makefile
2022-09-08 19:48:27 +02:00
Juan Font Alonso
9c0cf4595a
OIDC integration tests working
2022-09-08 19:47:47 +02:00
Juan Font Alonso
71b712356f
Minor change on the base config for OIDC
2022-09-08 19:47:29 +02:00
Juan Font Alonso
f33e3e3b81
Parse the OIDC login URL
2022-09-08 19:32:11 +02:00
Juan Font Alonso
5f384c6323
Removed old code and minor changes
2022-09-08 18:11:41 +02:00
Benjamin Roberts
e056b86c37
Merge branch 'main' into preauthkey-tags
2022-09-08 09:04:12 +10:00
Jamie Greeff
91e30397bd
Remove --rm flag from Docker example
...
It appears to be causing confusion for users on Discord when copying/pasting from the example here, if Headscale crashes on launch then the container will be removed and logs can't be viewed with `docker logs`.
2022-09-08 09:03:42 +10:00
Benjamin George Roberts
8a8ec7476d
fix linting issues in preauthkey tags
2022-09-08 09:03:38 +10:00
Juan Font Alonso
fca380587a
Initial work on OIDC tests
2022-09-07 23:53:46 +02:00
Juan Font Alonso
cb70d7c705
Return the results on error
2022-09-07 23:53:31 +02:00
Juan Font Alonso
b27b789e28
Added base config file template
2022-09-07 18:40:02 +02:00
Juan Font
a9da953b55
Merge branch 'main' into autoapprovers
2022-09-07 18:21:21 +02:00
Juan Font
12d5b6a2d2
Merge branch 'main' into remove-sponsorship
2022-09-07 17:14:11 +02:00
Juan Font
a0a463494b
Merge pull request #797 from madjam002/patch-1
...
Remove --rm flag from Docker example
2022-09-07 17:13:14 +02:00
Jamie Greeff
07dca79b20
Remove --rm flag from Docker example
...
It appears to be causing confusion for users on Discord when copying/pasting from the example here, if Headscale crashes on launch then the container will be removed and logs can't be viewed with `docker logs`.
2022-09-07 14:16:04 +01:00
Benjamin George Roberts
688cba7292
fix linting mistakes
2022-09-07 21:39:56 +10:00
Mike Lloyd
0fe3c21223
Move map block out of server block
2022-09-06 16:12:20 -07:00
Mike Lloyd
45df6e77ff
Apply suggestions from code review
...
Thanks for the pointers!
Co-authored-by: Juan Font <juanfontalonso@gmail.com >
2022-09-06 15:37:39 -07:00
Juan Font
548551c6ae
Merge branch 'main' into autoapprovers
2022-09-07 00:31:48 +02:00
Juan Font
e3f1fd1ffc
Merge branch 'main' into remove-sponsorship
2022-09-07 00:31:13 +02:00
Juan Font
470c49394c
Merge branch 'main' into preauthkey-tags
2022-09-07 00:22:36 +02:00
Juan Font
31662bcd28
Merge branch 'main' into reverse-proxy
2022-09-07 00:19:57 +02:00
Juan Font
7247302f45
Merge branch 'main' into feature/json-logs
2022-09-07 00:05:38 +02:00
Juan Font
1a5a5b12b7
Merge pull request #795 from stefanvanburen/svanburen/buf-mod-update
...
Run `buf mod update` in protos/
2022-09-06 23:49:32 +02:00
Stefan VanBuren
0099dd1724
Run buf mod update
2022-09-06 14:52:09 -04:00
Juan Font
1f131c6729
Merge branch 'main' into feature/json-logs
2022-09-06 20:18:35 +02:00
Juan Font
fc4361b225
Delete FUNDING.yml
2022-09-06 20:09:01 +02:00
Juan Font
ce25a1e64e
Remove sponsor buttons
2022-09-06 20:07:16 +02:00
Juan Font
449a135b94
Merge pull request #791 from kradalby/add-logo
...
Add logo files and add to readme
2022-09-05 15:34:00 +02:00
Kristoffer Dalby
002d484abe
use logo in readme correcly
2022-09-05 15:31:03 +02:00
Kristoffer Dalby
9823ef2af5
use logo in readme
2022-09-05 15:30:19 +02:00
Kristoffer Dalby
641c6fd439
Add logo files
2022-09-05 15:29:30 +02:00
Mike Lloyd
3a042471b7
Add web sockets section
2022-09-04 17:39:51 -07:00
Mike Lloyd
dc18d64286
Add websockets config
2022-09-04 17:26:33 -07:00
Benjamin George Roberts
72a43007d8
fix broken preauth-key tag test
2022-09-05 09:44:55 +10:00
Benjamin George Roberts
842c28adff
replace netaddr usage with netip
2022-09-05 09:33:53 +10:00
Juan Font
9810d84e2d
Merge branch 'main' into autoapprovers
2022-09-04 22:40:08 +02:00
Juan Font
f6153a9b5d
Merge branch 'main' into preauthkey-tags
2022-09-04 22:35:51 +02:00
Juan Font
302a88bfdb
Merge branch 'main' into feature/json-logs
2022-09-04 22:32:58 +02:00
Mike Lloyd
f6e83413e5
Add PR link to changelog
2022-09-04 09:49:34 -07:00
Mike Lloyd
02ab3a2cb6
Update changelog
2022-09-04 09:46:11 -07:00
Mike Lloyd
90e840c3c9
Add reverse proxy documentation
2022-09-04 09:42:23 -07:00
Juan Font
af60ffb7fa
Merge pull request #788 from juanfont/warn-websockets-requirement
...
Warn when Headscale is running behind an improperly configured proxy
2022-09-04 16:44:54 +02:00
Juan Font Alonso
c28e559da4
Updated changelog
2022-09-04 16:23:46 +02:00
Juan Font Alonso
5c59255b41
Also warn in DERP server if Websockets are not properly working
2022-09-04 16:13:48 +02:00
Juan Font Alonso
a377ee14b4
Minor message change
2022-09-04 16:13:30 +02:00
Juan Font Alonso
2262188d8a
Warn when Headscale is running behind a wrongly configured proxy
2022-09-04 16:05:21 +02:00
Juan Font
7c49c752a9
Merge pull request #786 from juanfont/update-deps-20220904
...
Update dependencies 20220904
2022-09-04 16:01:52 +02:00
Juan Font Alonso
e29726cc50
Updated nix sum
2022-09-04 15:45:35 +02:00
Juan Font Alonso
3c73cbe92b
Merge branch 'main' into update-deps-20220904
2022-09-04 15:37:25 +02:00
Juan Font Alonso
cc357062be
Missing go.sum
2022-09-04 15:36:59 +02:00
Juan Font Alonso
17c06f7167
Upgrade direct dependencies
2022-09-04 15:36:00 +02:00
Juan Font
d12e0156c3
Merge pull request #784 from juanfont/fix-go-1.19-lint
...
Fix linting broken after Go 1.19
2022-09-04 15:31:41 +02:00
Juan Font Alonso
204dedaa49
Only pass the context in pollmap, no req needed
2022-09-04 15:14:12 +02:00
Juan Font Alonso
52073ce7c9
Pass context in OIDC helpers
2022-09-04 15:02:18 +02:00
Juan Font Alonso
434747e007
Use timeout in lets encrypt http server
2022-09-04 11:47:05 +02:00
Juan Font Alonso
7a78314d9d
Remove nolint directives
2022-09-04 11:44:24 +02:00
Juan Font Alonso
f23e9dc235
Pass the req context when pinging the DB
2022-09-04 11:43:09 +02:00
Juan Font Alonso
4527801d48
More unused parameters removed in protocol functions
2022-09-04 11:41:31 +02:00
Juan Font Alonso
e0857f0226
Removed unused parameters in protocol functions
2022-09-04 11:40:14 +02:00
Juan Font Alonso
0d074b1da6
setLastStateChangeToNow was always receiving nil
2022-09-04 11:37:49 +02:00
Juan Font Alonso
f2fda4f906
Return error on marshaling issues
2022-09-04 11:36:03 +02:00
Juan Font Alonso
c1c36036ae
Add timeouts for the Noise server
2022-09-04 11:35:39 +02:00
Juan Font Alonso
9a1438d2e3
Use inherited context
2022-09-04 11:35:13 +02:00
Juan Font Alonso
582122851d
Go do not like underscores in packages
2022-09-04 11:34:23 +02:00
Juan Font Alonso
f4d197485c
Use library const for HTTP verbs
2022-09-04 11:33:00 +02:00
Juan Font Alonso
68305df9b2
Applied gofumpt
2022-09-04 11:32:29 +02:00
Juan Font Alonso
ca0be81833
Target the latest version for golint
2022-09-04 11:31:06 +02:00
Juan Font
380fbfe438
Merge pull request #780 from juanfont/bump-ts1.30
...
Target Tailscale version to v1.30.0 (and replace inet.af/netaddr with net/netip)
2022-09-04 09:24:42 +02:00
Juan Font Alonso
32d68a40d5
Update flake sha
2022-09-04 00:00:23 +02:00
Juan Font Alonso
198e92c08f
Remove dependency on netaddr
2022-09-03 23:46:14 +02:00
Juan Font Alonso
38b26f5285
Merge branch 'main' into bump-ts1.30
2022-09-03 23:33:09 +02:00
Juan Font
096a009685
Merge pull request #781 from juanfont/switch-to-nix-unstable
...
Switch to Nix unstable for Go 1.19
2022-09-03 23:32:51 +02:00
Juan Font Alonso
30c0fdb38d
Update changelog
2022-09-03 23:19:07 +02:00
Juan Font Alonso
663dbf7395
Use go 1.19 in Nix
2022-09-03 23:06:21 +02:00
Juan Font Alonso
373db0dc5e
Switch to nix unstable
2022-09-03 23:05:34 +02:00
Juan Font Alonso
2733fb30cc
Minor change in go.mod
2022-09-03 16:23:36 +02:00
Juan Font Alonso
d29411408b
Merge branch 'main' into bump-tailscale-v1.30
2022-09-03 16:20:25 +02:00
Juan Font
24bafdf2bb
Merge pull request #778 from juanfont/bump-go-1.19
...
Target Go 1.19 for Headscale
2022-09-03 13:16:48 +02:00
Juan Font
a9ede6a2bc
Merge branch 'main' into feature/json-logs
2022-09-03 12:39:04 +02:00
Juan Font Alonso
2c5bf6982c
Updated changelog
2022-09-03 12:24:22 +02:00
Juan Font Alonso
dd3ec84000
Minor doc change
2022-09-03 12:22:03 +02:00
Juan Font Alonso
84044e236d
Release using go 1.19
2022-09-03 12:21:54 +02:00
Juan Font Alonso
2ddf7ab515
Use Go 1.19 in Dockerfiles
2022-09-03 12:21:35 +02:00
Juan Font Alonso
f519c513c2
Target go 1.19 in go.mod
2022-09-03 12:21:04 +02:00
Juan Font Alonso
d5cc5b2bc8
Move integration tests to net/netip
2022-09-02 09:22:34 +02:00
Juan Font Alonso
51abf90db6
Use net/netip in derp server
2022-09-02 09:16:19 +02:00
Juan Font Alonso
71410cb6da
Port dns to net/netip
2022-09-02 09:15:05 +02:00
Juan Font Alonso
efb12f208c
Move db to net/netip
2022-09-02 09:13:50 +02:00
Juan Font Alonso
64ede5dbef
Move namespaces unit tests to net/netip
2022-09-02 09:13:07 +02:00
Juan Font Alonso
7af78152a4
Migrate routes to net/netip
2022-09-02 00:06:19 +02:00
Juan Font Alonso
290ec8bb19
Migrate ACLs to net/netip
2022-09-02 00:05:43 +02:00
Juan Font Alonso
cdf48b1216
Migrate utils to net/netip
2022-09-02 00:05:18 +02:00
Juan Font Alonso
a24710a961
Migrate machine to net/netip
2022-09-02 00:04:31 +02:00
Juan Font Alonso
197da8afcb
Migrate config.go to net/netip
2022-09-02 00:04:04 +02:00
Juan Font Alonso
12385d4357
Target Tailscale v1.30.0
2022-09-01 20:50:56 +02:00
Juan Font
e7f8bb866f
Merge pull request #772 from juanfont/enable-1.30-in-tests
...
Add Tailscale v1.30.0 to the integration test roaster
2022-09-01 00:03:21 +02:00
Juan Font Alonso
1ad19a3bd8
Add 1.30.0 to the version roaster
2022-08-31 22:17:13 +02:00
Igor Perepilitsyn
bb6b07dedc
FIXES #768 add new config entry to the old itegration tests
2022-08-26 13:43:25 +02:00
Igor Perepilitsyn
2403c0e198
toggle json logging via config
2022-08-26 13:10:51 +02:00
Benjamin George Roberts
ac18723dd4
Set tags as part of handleAuthKeyCommon
2022-08-25 22:26:04 +10:00
Benjamin George Roberts
6faa1d2e4a
Fix tests broken by preauthkey tags
2022-08-25 22:23:52 +10:00
Benjamin George Roberts
791272e408
Adds grpc/cli support for preauthkey tags
2022-08-25 22:23:46 +10:00
Benjamin George Roberts
e27a4db281
add acl_tags to PreAuthKey proto
2022-08-25 22:15:43 +10:00
Benjamin George Roberts
60cc9ddb3b
Add test for autoApprovers feature
2022-08-25 22:15:19 +10:00
Benjamin George Roberts
7653ad40d6
Split GetRouteApprovers from EnableAutoApprovedRoutes
2022-08-25 22:12:30 +10:00
Benjamin George Roberts
004ebcaba1
initial implementation of autoApprovers support
2022-08-25 22:00:04 +10:00
Kristoffer Dalby
cc0bec15ef
Merge pull request #760 from juanfont/update-contributors
2022-08-23 21:21:50 +02:00
github-actions[bot]
20970b580a
docs(README): update contributors
2022-08-22 12:47:42 +00:00
Juan Font
53857d418a
Merge pull request #756 from huskyii/env_config
...
Env config
2022-08-22 14:47:01 +02:00
Jiang Zhu
a81a4d274f
Update CHANGELOG.md
2022-08-22 20:20:20 +08:00
Jiang Zhu
ce4a1cf447
1. add noise key to config file
...
2. lower node check interval
2022-08-22 00:35:08 +08:00
Jiang Zhu
35dd9209b9
update CHANGELOG.md
2022-08-21 23:51:04 +08:00
Jiang Zhu
81f91f03b4
add env var to specify config location
2022-08-21 23:51:04 +08:00
Juan Font
84a5edf345
Merge pull request #738 from juanfont/hs2021-v2
...
Implement TS2021 protocol in headscale
2022-08-21 16:02:28 +02:00
Juan Font Alonso
4aafe6c9d1
Added line in CHANGELOG
2022-08-21 12:32:01 +02:00
Juan Font
3ab1487641
Merge branch 'main' into hs2021-v2
2022-08-21 11:57:33 +02:00
Kristoffer Dalby
0c7f1eac82
Merge pull request #757 from juanfont/changelog-0.16.4
2022-08-21 11:15:30 +02:00
Juan Font Alonso
6fe895fd22
Updated changelog for 0.16.4
2022-08-21 10:51:58 +02:00
Juan Font Alonso
71d22dc994
Added missing files
2022-08-21 10:47:45 +02:00
Juan Font Alonso
4424a9abc0
Noise private key now a nested field in config
2022-08-21 10:42:23 +02:00
Juan Font Alonso
e20e818a42
Integrate expiration fixes ( #754 ) in TS2021 branch
2022-08-20 11:46:44 +02:00
Juan Font
061e2fe4b4
Merge pull request #754 from Aluxima/expired-machine-registration
...
Fix cli registration of expired machines
2022-08-20 11:41:15 +02:00
Juan Font Alonso
f0a8a2857b
Clarified why we have a different key
2022-08-20 00:23:33 +02:00
Juan Font Alonso
175dfa1ede
Update flake.nix sum
2022-08-20 00:15:46 +02:00
Juan Font Alonso
04e4fa785b
Updated dependencies
2022-08-20 00:11:07 +02:00
Juan Font Alonso
6aec520889
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-20 00:06:58 +02:00
Juan Font Alonso
e9906b522f
Use upstream AcceptHTTP for the Noise upgrade
2022-08-20 00:06:26 +02:00
Juan Font
2f554133c5
Move comment up
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-08-19 23:49:06 +02:00
Juan Font Alonso
922b8b5365
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-19 16:32:18 +02:00
Juan Font Alonso
c894db3dd4
Use common core for noise registration
2022-08-19 16:29:04 +02:00
Laurent Marchaud
e85562268d
Switch to using nodeKey instead of machineKey for expired machines registration
...
Signed-off-by: Laurent Marchaud <laurent@marchaud.com >
2022-08-19 15:48:35 +02:00
Laurent Marchaud
fca33aacbe
Fix rebased errors scope in machine.go
...
Signed-off-by: Laurent Marchaud <laurent@marchaud.com >
2022-08-19 15:07:01 +02:00
Juan Font
e43713a866
Merge branch 'main' into hs2021-v2
2022-08-19 15:02:01 +02:00
Juan Font Alonso
b6e3cd81c6
Fixed minor linting things
2022-08-19 14:27:40 +02:00
Juan Font Alonso
43ad0d4416
Removed unused method
2022-08-19 14:24:43 +02:00
Juan Font Alonso
a33b5a5c00
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-19 14:20:55 +02:00
Juan Font Alonso
e2bffd4f5a
Make legacy protocol use common methods for client registration
2022-08-19 14:20:24 +02:00
Juan Font Alonso
a87a9636e3
Expanded response marshal methods to support legacy and Noise
2022-08-19 14:19:29 +02:00
Laurent Marchaud
a31432ee7b
Fix changelog
...
Signed-off-by: Laurent Marchaud <laurent@marchaud.com >
2022-08-19 14:14:30 +02:00
Laurent Marchaud
0c66590108
Update changelog
...
Signed-off-by: Laurent Marchaud <laurent@marchaud.com >
2022-08-19 14:11:19 +02:00
Laurent Marchaud
c6ea9b4b80
Fix cli registration of expired machines
...
Signed-off-by: Laurent Marchaud <laurent@marchaud.com >
2022-08-19 14:11:13 +02:00
Juan Font
19455399f4
Merge pull request #752 from juanfont/add-code-of-conduct
...
Create CODE_OF_CONDUCT.md
2022-08-19 00:38:01 +02:00
Juan Font
43ba1fb176
Prettier
2022-08-18 22:32:53 +00:00
Juan Font
a6f56b4285
Create CODE_OF_CONDUCT.md
2022-08-18 22:08:33 +02:00
Juan Font
9d430d3c72
Update noise.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-08-18 21:33:56 +02:00
Juan Font Alonso
f9a2a2b57a
Add docker DNS IP to the remaining files
2022-08-18 18:07:15 +02:00
Juan Font Alonso
e4d961cfad
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-18 17:57:06 +02:00
Juan Font
67ffebc30a
Merge branch 'main' into hs2021-v2
2022-08-18 17:56:56 +02:00
Juan Font Alonso
cf731fafab
Catch retry error in taildrop send
2022-08-18 17:56:01 +02:00
Juan Font Alonso
f43a83aad7
Find out IPv4 for taildrop
2022-08-18 17:53:36 +02:00
Juan Font Alonso
7185f8dfea
Only use released versions in public integration tests
2022-08-18 17:53:25 +02:00
Juan Font Alonso
8a707de5f1
Add local Docker DNS server (makes resolving http://headscale more reliable)
2022-08-18 17:53:04 +02:00
Juan Font
61bb6292b7
Merge pull request #746 from gozssky/patch-1
...
Fix charset typo in swagger.go
2022-08-18 12:23:45 +02:00
Juan Font
40e0ae99da
Merge branch 'main' into patch-1
2022-08-18 11:49:15 +02:00
Juan Font
2dd615a4ef
Merge pull request #745 from 617a7a/main
...
feat: add support for TLS with Postgres
2022-08-18 11:48:33 +02:00
Azz
7e06abdca2
chore: azz forgot how to write code
2022-08-17 20:12:45 +01:00
Azz
c316f53e23
fix: ci happy now?
2022-08-17 19:32:20 +01:00
Azz
b6d324be69
Merge branch 'main' of https://github.com/juanfont/headscale
...
# Conflicts:
# CHANGELOG.md
2022-08-17 19:31:26 +01:00
Juan Font
f7380312d3
Merge pull request #747 from juanfont/fix-oidc
...
Fix error decoding OIDC claims (#744 )
2022-08-17 18:30:50 +02:00
Juan Font
287309b65c
Update changelog
2022-08-17 15:08:29 +00:00
Juan Font
cc3de7e723
Fix error decoding claims ( #744 )
2022-08-17 15:03:10 +00:00
Yujie Xia
e03b3029e3
Fix charset typo in swagger.go
2022-08-17 12:27:58 +08:00
Juan Font Alonso
ba07bac46a
Use IPv4 in the tests
2022-08-16 18:42:22 +02:00
Juan Font Alonso
b71a881d0e
Retry magicdns tests
2022-08-16 18:19:04 +02:00
Juan Font Alonso
ce53bb0eee
Minor changes to HEAD Dockerfile
2022-08-16 17:52:59 +02:00
Juan Font Alonso
c0fe1abf4d
Use node_key to find peers
2022-08-16 17:51:43 +02:00
Juan Font Alonso
0db7fc5ab7
Mark all namespaces to lastChange now
2022-08-16 13:39:15 +02:00
azz
701ad3e017
chore: update CHANGELOG.md
2022-08-16 09:09:28 +01:00
azz
0cc14d0aca
feat: added db_ssl to config-example.yaml
2022-08-16 09:02:51 +01:00
Azz
3f5ea7998f
Merge branch 'main' into main
2022-08-16 08:56:36 +01:00
azz
4c7f54020b
feat: add support for TLS with Postgres
2022-08-16 08:50:30 +01:00
Juan Font Alonso
eb461d0713
Enable HEAD and unstable in integration tests
2022-08-16 00:18:02 +02:00
Juan Font Alonso
128ec6717c
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-15 23:35:24 +02:00
Juan Font Alonso
b3cf5289f8
Use CapVer to offer Noise only to supported clients
2022-08-15 23:35:06 +02:00
Juan Font
c701f9e817
Merge branch 'main' into hs2021-v2
2022-08-15 22:56:39 +02:00
Juan Font
e1a95e2057
Merge pull request #734 from vtrf/postgres-connection-string
...
Add ability to connect to PostgreSQL via unix socket
2022-08-15 19:20:01 +02:00
Victor Freire
0a5db52855
Add ability to connect to PostgreSQL via unix socket
2022-08-15 11:55:38 -03:00
Juan Font
7197ade4b4
Merge branch 'main' into postgres-connection-string
2022-08-15 13:37:09 +02:00
Juan Font Alonso
865f1ffb3c
Fix issues with DERP integration tests due to tailscale/tailscale#4323
2022-08-15 11:25:47 +02:00
Juan Font Alonso
8db7629edf
Fix config file in integration tests for Noise
2022-08-15 10:53:06 +02:00
Juan Font Alonso
b8980b9ed3
More minor logging stuff
2022-08-15 10:44:22 +02:00
Juan Font Alonso
5cf9eedf42
Minor logging corrections
2022-08-15 10:43:39 +02:00
Juan Font
193b4213b3
Merge pull request #739 from juanfont/updated-changelog-0.16.2
...
Added changelog entries for 0.16.x
2022-08-14 23:27:27 +02:00
Juan Font Alonso
8557bcedae
Added changelog entries for 0.16.x
2022-08-14 23:22:41 +02:00
Juan Font Alonso
f599bea216
Fixed issue when not using compression
2022-08-14 23:15:41 +02:00
Juan Font Alonso
704a19b0a5
Removed legacy method to generate MapResponse
2022-08-14 23:13:07 +02:00
Juan Font Alonso
e29b344e0f
Move Noise poll to new file, and use common poll
2022-08-14 23:12:18 +02:00
Juan Font Alonso
7cc227d01e
Added Noise field to logging
2022-08-14 23:11:33 +02:00
Juan Font Alonso
df8ecdb603
Working on common codebase for poll, starting with legacy
2022-08-14 22:57:03 +02:00
Juan Font Alonso
f4bab6b290
Created common methods for keep and map poll responses
2022-08-14 22:50:39 +02:00
Juan Font Alonso
35f3dee1d0
Move Noise API to new file
2022-08-14 21:19:52 +02:00
Juan Font Alonso
db89fdea23
Added file for legacy protocol
2022-08-14 21:16:29 +02:00
Juan Font Alonso
d0898ecabc
Move common parts of the protocol to dedicated file
2022-08-14 21:15:58 +02:00
Juan Font Alonso
e640c6df05
Fixes in Noise poll (clients should work now)
2022-08-14 21:10:08 +02:00
Juan Font Alonso
ab18c721bb
Support for Noise machines in getPeers
2022-08-14 21:07:29 +02:00
Juan Font Alonso
aaa33cf093
Minor change in router
2022-08-14 21:07:05 +02:00
Juan Font Alonso
0f09e19e38
Updated go.mod checksum
2022-08-14 17:09:14 +02:00
Juan Font Alonso
b301405f24
Merge branch 'hs2021-v2' of https://github.com/juanfont/headscale into hs2021-v2
2022-08-14 17:06:03 +02:00
Juan Font Alonso
1f3032ad21
Merge branch 'main' into hs2021-v2
2022-08-14 17:05:51 +02:00
Juan Font Alonso
c10142f767
Added noise poll handler
2022-08-14 17:05:04 +02:00
Juan Font Alonso
0d0042b7e6
Added zstd constant for linting
2022-08-14 17:04:07 +02:00
Juan Font Alonso
78a179c971
Minor update in docs
2022-08-14 16:53:54 +02:00
Juan Font Alonso
cab828c9d4
Fixed unit tests to load config
2022-08-14 16:52:57 +02:00
Juan Font Alonso
ff46f3ff49
Move reusable method to common api file
2022-08-14 16:13:17 +02:00
Juan Font
b67cff50f5
Merge branch 'main' into hs2021-v2
2022-08-14 13:44:12 +02:00
Juan Font
e29ac8a4ab
Merge pull request #737 from juanfont/fix-machinekey-oidc
...
Fixed another recurrence of MachineKey
2022-08-14 13:44:01 +02:00
Juan Font Alonso
20d2615081
Check json encoder errors
2022-08-14 12:47:04 +02:00
Juan Font
7fb2f83540
Merge branch 'main' into fix-machinekey-oidc
2022-08-14 12:44:30 +02:00
Juan Font Alonso
eb8d8f142c
And more linting stuff
2022-08-14 12:44:07 +02:00
Juan Font Alonso
3bea20850a
Some linting fixes
2022-08-14 12:40:22 +02:00
Juan Font Alonso
ade1b73779
Output an error when a user runs headscale without noise_private_key_path defined
2022-08-14 12:35:14 +02:00
Juan Font Alonso
281ae59b5a
Update integration tests to work with Noise protocol
2022-08-14 12:18:33 +02:00
Juan Font Alonso
90bb6ea907
Minor formatting changes
2022-08-14 12:10:20 +02:00
Juan Font Alonso
5b14cafddd
Fixed another recurrence of MachineKey
2022-08-14 12:04:31 +02:00
Juan Font Alonso
9994fce9d5
Fixed some linting errors
2022-08-14 12:00:43 +02:00
Kristoffer Dalby
c19e1a481e
Merge pull request #736 from juanfont/update-contributors
2022-08-14 08:16:58 +02:00
Juan Font Alonso
39b85b02bb
Move getMapResponse into reusable function by TS2019 and TS2021
2022-08-14 03:20:53 +02:00
Juan Font Alonso
7a91c82cda
Merge branch 'main' into hs2021-v2
2022-08-14 03:07:43 +02:00
Juan Font Alonso
c7cea9ef16
updated paths
2022-08-14 03:07:28 +02:00
github-actions[bot]
d56b409cb9
docs(README): update contributors
2022-08-13 20:44:38 +00:00
Juan Font
ee8f38111e
Merge pull request #735 from juanfont/fix-expired-url
...
Fix expired node registration URL
2022-08-13 22:44:04 +02:00
Juan Font Alonso
8c13f64d3c
Changed missing path
2022-08-13 21:55:44 +02:00
Juan Font Alonso
a7efc22045
Fix expired node registration URL
2022-08-13 21:17:05 +02:00
Juan Font Alonso
1880035f6f
Add registration handler over Noise protocol
2022-08-13 21:12:19 +02:00
Juan Font Alonso
fdd0c50402
Added helper method to fetch machines by any nodekey + tests
2022-08-13 21:03:02 +02:00
Juan Font Alonso
be24bacb79
Add noise mux and Noise path to base router
2022-08-13 20:55:37 +02:00
Juan Font Alonso
b261d19cfe
Added Noise upgrade handler and Noise mux
2022-08-13 20:52:11 +02:00
Victor Freire
ec5acf7be2
Add ability to connect to PostgreSQL via unix socket
2022-08-13 11:34:12 -03:00
Juan Font Alonso
014e7abc68
Make private key errors constants
2022-08-13 14:46:23 +02:00
Juan Font Alonso
3e8f0e9984
Added support for Noise clients in /key handler
2022-08-13 11:24:05 +02:00
Juan Font Alonso
6e8e2bf508
Generate and read the Noise private key
2022-08-13 11:14:38 +02:00
Juan Font
09cd7ba304
Merge pull request #725 from juanfont/switch-to-db-d
...
Improve registration protocol implementation and switch to NodeKey as main identifier
2022-08-12 09:56:17 +02:00
Juan Font Alonso
77bf1e81ec
Added missing dot in comment
2022-08-12 09:36:17 +02:00
Juan Font Alonso
a9b9a2942d
Update changelog
2022-08-12 09:31:11 +02:00
Juan Font
a261e27113
Update api.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-08-12 09:03:32 +02:00
Juan Font
f01a33491b
Update api.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-08-12 09:03:11 +02:00
Juan Font
739e11e1ee
Update api.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-08-12 09:02:58 +02:00
Juan Font
393aae01df
Merge branch 'main' into switch-to-db-d
2022-08-11 15:02:08 +02:00
Juan Font
73cd428ed2
Merge pull request #729 from juanfont/fix-reuse-of-ns
...
Minor fix to linting issue introduced when fixing excludeCorrectlyTaggedNodes (#707 )
2022-08-11 15:01:53 +02:00
Juan Font Alonso
1e7b57e513
Minor fix to linting issue introduced in #707
2022-08-11 14:12:45 +02:00
Juan Font Alonso
e1e3feb6a8
Add a sleep to reduce the impact of #727
2022-08-11 13:37:25 +02:00
Juan Font
8e56d8b425
Merge branch 'main' into switch-to-db-d
2022-08-11 13:11:38 +02:00
Juan Font
6c8445988c
Merge pull request #707 from restanrm/fix-bug-in-excludecorrectlytaggednodes
...
Fix bug in excludeCorrectlyTaggedNodes
2022-08-11 13:08:43 +02:00
Adrien Raffin-Caboisse
110b01befa
Merge remote-tracking branch 'origin/main' into fix-bug-in-excludecorrectlytaggednodes
2022-08-11 12:49:26 +02:00
Juan Font Alonso
d586b9d285
Added comment clarifying registration API
2022-08-11 12:16:50 +02:00
Juan Font Alonso
804d70386d
Switch to nodekey in urls
2022-08-11 12:15:16 +02:00
Juan Font Alonso
fb3b2e6bc8
Improve protocol implementation for client registration ( fixes #706 )
2022-08-11 12:11:02 +02:00
Juan Font Alonso
030d7264e6
Fixed comment for linting
2022-08-10 16:03:33 +02:00
Juan Font Alonso
e91c378bd4
Replace machine key with node key in preparation for Noise in auth related stuff
2022-08-10 15:35:26 +02:00
Juan Font Alonso
e950b3be29
Add method to fetch by nodekey
2022-08-10 13:15:31 +02:00
Juan Font
dbf0e206b8
Merge pull request #722 from juanfont/bump-versions-20220810
...
Update dependencies versions
2022-08-10 11:25:03 +02:00
Juan Font Alonso
84f66090fd
Updated CHangelog and flake
2022-08-10 11:04:42 +02:00
Juan Font Alonso
f8958d4e22
Update xsync library (helps in #704 )
2022-08-10 10:55:45 +02:00
Juan Font Alonso
70807e40f6
Updated base dependencies
2022-08-10 10:54:23 +02:00
Juan Font Alonso
9a01e3d192
Bump tailscale to 1.28.0
2022-08-10 10:47:49 +02:00
Juan Font
a03a99569d
Merge pull request #720 from juanfont/replace-ioutil
...
Replaced legacy ioutil usage
2022-08-10 07:41:50 +02:00
Juan Font Alonso
2d887046de
Replaced legacy ioutil usage
2022-08-09 23:21:19 +02:00
Juan Font
3a091896fb
Merge pull request #685 from GrigoriyMikhalkin/oidc-refactoring
...
Decompose OIDCCallback method
2022-08-09 20:52:32 +02:00
Juan Font
8a9fe1da4b
Merge branch 'main' into oidc-refactoring
2022-08-09 20:29:02 +02:00
Juan Font
abf478c9e6
Merge pull request #703 from nnsee/android-readme
...
Update the readme and documentation with details on the Android app
2022-08-09 15:39:45 +02:00
Juan Font
913a94d2ab
Merge branch 'main' into android-readme
2022-08-09 15:37:20 +02:00
Juan Font
01e5be3b57
Merge pull request #711 from sophware/typofix
...
typo fixed from advertised to advertise
2022-08-09 15:11:23 +02:00
Juan Font
e93529e9f3
Merge branch 'main' into typofix
2022-08-09 15:05:53 +02:00
Juan Font
ade4e23e14
Merge pull request #698 from GrigoriyMikhalkin/export-errors
...
Export API errors
2022-08-09 15:04:51 +02:00
Juan Font
fc65ded2d5
Merge branch 'main' into oidc-refactoring
2022-08-09 14:37:58 +02:00
Juan Font
aa2b92703f
Merge branch 'main' into export-errors
2022-08-09 14:33:10 +02:00
Juan Font
2c9dbe158d
Merge pull request #713 from juanfont/update-buf-lint
...
Update buf setup action for proto-lint
2022-08-09 14:32:52 +02:00
Juan Font Alonso
d6fa5c96ae
Update setup action for proto lint
2022-08-09 14:21:45 +02:00
Juan Font
0506e68a96
Merge branch 'main' into export-errors
2022-08-09 14:16:24 +02:00
Juan Font
b32f986105
Merge pull request #710 from juanfont/cosmetic-changes-integration
...
Improvements in integration tests
2022-08-09 14:16:10 +02:00
Juan Font Alonso
577eedef11
Restore the number of containers
2022-08-09 13:53:25 +02:00
Juan Font Alonso
27855880b2
Updated versions for taiscale
2022-08-09 13:53:02 +02:00
Juan Font Alonso
b01d392f9e
Run integrtation tests in different steps in Github Actions
2022-08-09 12:26:58 +02:00
Juan Font Alonso
d548f5de3f
Splitted integration tests in Makefile
2022-08-09 12:26:29 +02:00
Juan Font Alonso
f8986132d4
Use tags to split the integration tests
2022-08-09 12:26:12 +02:00
Juan Font Alonso
e7148b8080
Temporarily disable unstable branch
2022-08-09 09:58:45 +02:00
Juan Font Alonso
0a29492fc5
Increase swap size in integration tests
2022-08-08 23:20:29 +02:00
Grigoriy Mikhalkin
a1e7e771ce
refactor OIDC callback aux functions
2022-08-07 13:57:07 +02:00
Grigoriy Mikhalkin
00d2a447f4
decompose OIDCCallback method
2022-08-07 13:27:29 +02:00
Steve Malloy
2254ac2102
typo fixed from advertised to advertise
2022-08-05 15:44:11 -04:00
Juan Font Alonso
21ae31e77d
Reduce number of containers in integration tests (for testing)
2022-08-05 18:57:08 +02:00
Juan Font Alonso
a6113066ff
Improved logs in integration tests
2022-08-05 17:35:28 +02:00
Adrien Raffin-Caboisse
0bb205d31f
Merge remote-tracking branch 'origin/main' into fix-bug-in-excludecorrectlytaggednodes
2022-08-05 11:56:33 +02:00
Juan Font
d7e8db7adc
Merge branch 'main' into export-errors
2022-08-05 10:14:35 +02:00
Juan Font
0eb3b23f16
Merge pull request #708 from juanfont/revert-680-topic/speedup-build
...
Revert BuildKit (docker buildx) support
2022-08-05 10:14:19 +02:00
Juan Font
54e381cecb
Revert "Topic/speedup build"
2022-08-05 00:31:39 +02:00
Grigoriy Mikhalkin
cc1343d31d
fixed typo in ErrCannotDecryptResponse name
2022-08-05 00:00:36 +02:00
Adrien Raffin-Caboisse
bce59345e4
docs: add entry in changelog
2022-08-04 10:51:06 +02:00
Adrien Raffin-Caboisse
79688e6187
chore(all): apply formater
2022-08-04 10:47:00 +02:00
Adrien Raffin-Caboisse
babf9470c2
fix(acl): fix issue with groups in excludeCorretlyTaggedNodes
...
This commit fix issue #563
2022-08-04 10:42:47 +02:00
Rasmus Moorats
10d566c946
add details on how to use the android app
2022-08-02 09:49:28 +03:00
Grigoriy Mikhalkin
911e6ba6de
exported API errors
2022-07-29 17:35:21 +02:00
Juan Font
f9c4d577e2
Merge pull request #680 from ohdearaugustin/topic/speedup-build
...
Topic/speedup build
2022-07-28 23:07:32 +02:00
Juan Font
9826b518bd
Merge branch 'main' into topic/speedup-build
2022-07-28 22:58:07 +02:00
Juan Font
32a8f06486
Merge pull request #689 from restanrm/fix-duplicate-tags-returned-by-api
...
Remove duplicate tags if sent by the client
2022-07-28 22:52:35 +02:00
Juan Font
2ab2b8656b
Merge branch 'main' into fix-duplicate-tags-returned-by-api
2022-07-27 00:37:07 +02:00
Juan Font
d9ab98e47f
Merge branch 'main' into topic/speedup-build
2022-07-26 18:45:41 +02:00
Juan Font
9d584bb0d3
Merge pull request #692 from juanfont/update-runc-dependencies
...
Update runc dependencies to fix security notification
2022-07-26 17:20:51 +02:00
Juan Font
4f725ba9e1
Merge branch 'main' into update-runc-dependencies
2022-07-26 13:59:35 +02:00
Juan Font
b75a113c91
Merge pull request #688 from juanfont/prepare-cl-0.17.0
...
Prepare changelog structure for 0.17.0
2022-07-26 13:59:24 +02:00
Juan Font Alonso
75af83bb81
Update checksum for nix
2022-07-26 12:11:15 +02:00
Juan Font
0f6f0c3b6b
Merge branch 'main' into prepare-cl-0.17.0
2022-07-26 12:05:28 +02:00
Juan Font Alonso
b344524a6d
Update runc dependencies to fix security notification
2022-07-26 12:02:58 +02:00
Juan Font Alonso
6f4d5a532e
fixed linting errors
2022-07-26 11:25:20 +02:00
Juan Font
2d83c70173
Merge pull request #670 from iSchluff/feature/db-health-check
...
ping db in health check
2022-07-26 00:40:23 +02:00
Adrien Raffin-Caboisse
c90e862460
fix(grpc): add more checks for tag validation
2022-07-25 14:01:41 +02:00
Adrien Raffin-Caboisse
c46a34e6b8
fix(machine): remove duplicate in forcedTags
2022-07-25 11:04:30 +02:00
Juan Font Alonso
693f59ba2f
Prepare changelog structure for 0.17.0
2022-07-25 10:35:21 +02:00
Juan Font
abae078855
Merge branch 'main' into feature/db-health-check
2022-07-24 22:10:16 +02:00
Juan Font
0212db3fad
Merge pull request #687 from huskyii/node_ls
...
more intuitive output of node ls
2022-07-24 12:06:41 +02:00
Jiang Zhu
49354f678e
update CHANGELOG
2022-07-23 04:47:37 +08:00
Jiang Zhu
dc94570c4a
more intuitive output of node ls
2022-07-23 01:33:11 +08:00
Kristoffer Dalby
51b1027aec
Merge pull request #686 from juanfont/update-contributors
2022-07-22 18:56:49 +02:00
github-actions[bot]
936adb7d2c
docs(README): update contributors
2022-07-22 07:36:16 +00:00
Juan Font
581d1f3bfa
Merge pull request #668 from GrigoriyMikhalkin/graceful-shutdown
...
graceful shutdown fix
2022-07-22 09:35:40 +02:00
Juan Font
7c87ef6c86
Merge branch 'main' into graceful-shutdown
2022-07-22 09:06:46 +02:00
Juan Font
1a9a9b718d
Merge pull request #684 from juanfont/fix-api-mux
...
Fix API router
2022-07-22 09:06:06 +02:00
Juan Font Alonso
6c9f3420e2
Updated changelog
2022-07-21 23:59:44 +02:00
Juan Font Alonso
a4d0efbe8d
Fix API router
2022-07-21 23:57:07 +02:00
Grigoriy Mikhalkin
56858a56db
Revert "decompose OIDCCallback method"
...
This reverts commit 395caaad42 .
2022-07-21 23:54:35 +02:00
Grigoriy Mikhalkin
395caaad42
decompose OIDCCallback method
2022-07-21 23:47:20 +02:00
Grigoriy Mikhalkin
3f0639c87d
graceful shutdown lint fixes
2022-07-21 23:47:20 +02:00
Grigoriy Mikhalkin
889eff265f
graceful shutdown fix
2022-07-21 23:47:20 +02:00
Kristoffer Dalby
c6eb7be7fb
Merge pull request #683 from juanfont/update-contributors
2022-07-20 10:57:38 +02:00
github-actions[bot]
02c7a46b97
docs(README): update contributors
2022-07-20 07:21:19 +00:00
Kristoffer Dalby
ea7b3baa8b
Merge pull request #677 from huskyii/remove_gin
2022-07-20 09:20:24 +02:00
Jiang Zhu
5724f4607c
fix nix build
2022-07-19 20:45:32 +08:00
Jiang Zhu
b755d47652
update CHANGELOG
2022-07-19 20:45:23 +08:00
ohdearaugustin
96221cc4f7
docs: add bulding container docs
2022-07-17 21:18:04 +02:00
ohdearaugustin
34d261179e
Speedup docker container build
2022-07-17 21:18:04 +02:00
ohdearaugustin
091b05f155
Change build os
2022-07-17 21:18:04 +02:00
Jiang Zhu
aca5646032
remove gin completely, ~2MB reduction on final binary
2022-07-16 02:03:46 +08:00
Kristoffer Dalby
7e9abbeaec
Merge pull request #676 from juanfont/update-contributors
2022-07-15 09:15:18 +01:00
Anton Schubert
c6aaa37f2d
ping db in health check
2022-07-12 22:56:53 +02:00
github-actions[bot]
b8c3387892
docs(README): update contributors
2022-07-12 11:35:28 +00:00
Juan Font
c50d3aa9bd
Merge pull request #675 from juanfont/configurable-update-interval
...
Make tailnet updates check interval configurable
2022-07-12 13:34:49 +02:00
Juan Font Alonso
4ccff8bf28
Added the new parameter to the integration test params
2022-07-12 13:13:04 +02:00
Juan Font Alonso
5b5298b025
Renamed config param for node update check internal
2022-07-12 12:52:03 +02:00
Juan Font Alonso
8e0939f403
Updated changelog
2022-07-12 12:33:42 +02:00
Juan Font Alonso
cf3fc85196
Make tailnet updates check configurable
2022-07-12 12:27:28 +02:00
Juan Font
e0b15c18ce
Merge pull request #667 from kradalby/rerun-docker
...
Make integration tests retry on failure.
2022-06-27 17:04:39 +02:00
Kristoffer Dalby
566b8c3df3
Fix issue were dockertest fails to start because of container mismatch
2022-06-27 12:07:30 +00:00
Kristoffer Dalby
32a6151df9
Rerun integration tests 5 times if error
2022-06-27 12:02:29 +00:00
Kristoffer Dalby
3777de7133
Use failnow for cli tests aswell
2022-06-27 12:00:21 +00:00
Kristoffer Dalby
8cae4f80d7
Fail tests instead of fatal
...
Currently we exit the program if the setup does not work, this can cause
is to leave containers and other resources behind since we dont run
TearDown. This change will just fail the test if we cant set up, which
should mean that the TearDown runs aswell.
2022-06-27 11:58:16 +00:00
Kristoffer Dalby
911c5bddce
Make saving logs from tests an option (default false)
...
We currently have a bit of flaky logic which prevents the docker plugin
from cleaning up the containers if the tests or setup fatals or crashes,
this is due to a limitation in the save / passed stats handling.
This change makes it an environment variable which by default ditches
the logs and makes the containers clean up "correctly" in the teardown
method.
2022-06-27 11:56:37 +00:00
Juan Font
4a200c308b
Merge pull request #656 from juanfont/abandon-gin
...
Drop Gin as web framework for TS2019 API
2022-06-26 15:54:41 +02:00
Juan Font Alonso
625e45b1cb
Merge branch 'abandon-gin' of https://github.com/juanfont/headscale into abandon-gin
2022-06-26 14:25:05 +02:00
Juan Font Alonso
8551b0dde0
Fixed issue when in linting rampage
2022-06-26 14:24:57 +02:00
Juan Font
050782aff3
Merge branch 'main' into abandon-gin
2022-06-26 12:36:49 +02:00
Juan Font Alonso
00885dffe1
Fix implicit memory aliasing in for loop (lint 8/n)
2022-06-26 12:35:18 +02:00
Juan Font Alonso
ffcc72876c
Lint fixes 7/n
2022-06-26 12:30:52 +02:00
Juan Font Alonso
fa91ece5b4
Lint fixes 6/n
2022-06-26 12:25:26 +02:00
Juan Font Alonso
c810b24eb9
Lint fixes 5/n
2022-06-26 12:21:35 +02:00
Juan Font Alonso
03ced0ecfe
Lint fixes 4/n
2022-06-26 12:06:25 +02:00
Juan Font Alonso
c859bea0cf
Lint fixes 3/n
2022-06-26 12:01:04 +02:00
Juan Font Alonso
a913d1b521
Lint fixes 2/n
2022-06-26 11:55:37 +02:00
Kristoffer Dalby
2464c92572
Merge pull request #665 from juanfont/update-contributors
2022-06-26 11:48:11 +02:00
Juan Font Alonso
10cd87e5a2
Lint fixes 1/n
2022-06-26 11:43:17 +02:00
Juan Font Alonso
58c336e7f4
updated nix flake go.sum
2022-06-26 11:31:31 +02:00
Juan Font
bb4a9583a7
Merge branch 'main' into abandon-gin
2022-06-26 11:08:48 +02:00
github-actions[bot]
7ae38346e5
docs(README): update contributors
2022-06-26 08:22:05 +00:00
Kristoffer Dalby
7604c0f691
Merge pull request #658 from juanfont/fix-segfault-when-not-runner
2022-06-26 10:21:27 +02:00
Kristoffer Dalby
f2f4c3f684
Merge branch 'main' into fix-segfault-when-not-runner
2022-06-26 09:52:15 +02:00
Kristoffer Dalby
34f489b1f4
Update cmd/headscale/cli/utils.go
2022-06-26 09:52:11 +02:00
Kristoffer Dalby
72d1d2630e
Update cmd/headscale/cli/utils.go
2022-06-26 09:52:04 +02:00
Kristoffer Dalby
d559e23bc6
Merge pull request #651 from iSchluff/fix/db-shutdown
2022-06-26 09:51:45 +02:00
Kristoffer Dalby
4637400d29
Update CHANGELOG.md
2022-06-26 09:30:16 +02:00
Kristoffer Dalby
0fa943e4b7
Update CHANGELOG.md
2022-06-26 09:29:33 +02:00
Kristoffer Dalby
9707b1f540
Merge branch 'main' into fix/db-shutdown
2022-06-26 08:28:50 +01:00
Juan Font Alonso
657fb208d6
Flush buffered data on polling
2022-06-25 20:47:42 +02:00
Juan Font
647972c7cf
Merge branch 'main' into fix-segfault-when-not-runner
2022-06-23 22:17:33 +02:00
Juan Font Alonso
39b58f7d4c
Use a signal to close the longpolls on shutdown
2022-06-23 19:40:07 +02:00
Juan Font Alonso
c8378e8b7d
Quick fix to segfault on CLI when Headscale is not running ( fix #652 )
2022-06-22 14:40:40 +02:00
Juan Font Alonso
d404ba102d
Use request context to close when client disconnects
2022-06-20 21:47:02 +02:00
Juan Font Alonso
5e9004c407
Fix issues in the poll loop
2022-06-20 21:40:28 +02:00
Juan Font Alonso
8e63b53b0c
Merge branch 'abandon-gin' of https://github.com/juanfont/headscale into abandon-gin
2022-06-20 21:38:03 +02:00
Juan Font Alonso
116bef25a7
Fixed wrong copy paste in Header
2022-06-20 21:19:49 +02:00
Juan Font
294975ba87
Merge branch 'main' into abandon-gin
2022-06-20 21:16:11 +02:00
Juan Font Alonso
51b8c659f1
Updated changelog
2022-06-20 21:13:12 +02:00
Juan Font Alonso
082fbead66
Added mux dependency
2022-06-20 21:12:23 +02:00
Juan Font Alonso
73c16ffc65
Fixed issue with the method used to send data
2022-06-20 20:30:08 +02:00
Juan Font Alonso
dec51348e6
Minor status change
2022-06-20 20:29:42 +02:00
Juan Font Alonso
b0b919efb0
Added more logging to derp server
2022-06-20 12:32:13 +02:00
Juan Font Alonso
396c3ecdf7
Remove Gin from the OIDC handlers
2022-06-20 12:31:19 +02:00
Juan Font Alonso
53e5c05b0a
Remove gin from the poll handlers
2022-06-20 12:30:51 +02:00
Juan Font Alonso
dedeb4c181
Remove Gin from the Registration handler
2022-06-20 12:30:41 +02:00
Juan Font Alonso
e611063669
Migrate platform config out of Gin
2022-06-20 12:29:59 +02:00
Juan Font Alonso
6c9c9a401f
Remove gin from DERP server
2022-06-18 19:51:37 +02:00
Juan Font
6da4396faa
Merge pull request #654 from ChibangLW/main
...
Add version info to binary in Docker container
2022-06-18 18:48:35 +02:00
Juan Font Alonso
d89fb68a7a
Switch to use gorilla's mux as muxer
2022-06-18 18:41:42 +02:00
Leon Lenzen
8d9462147c
chore: use docker-meta version
2022-06-18 12:00:02 +02:00
Leon Lenzen
89b7fa6b06
chore: fix lint
2022-06-18 11:39:27 +02:00
Leon Lenzen
d4a550bb4c
chore: add version to binary in containers
2022-06-18 11:36:09 +02:00
Juan Font Alonso
d5e331a2fb
Remove Gin from OIDC callback
2022-06-17 17:42:17 +02:00
Juan Font Alonso
367da0fcc2
Remove Gin from simple endpoints for TS2019
2022-06-17 16:48:04 +02:00
Anton Schubert
8111b0aa83
update changelog
2022-06-17 11:07:35 +02:00
Anton Schubert
735440d1a3
add timeout for http shutdown, add db disconnect
2022-06-17 11:07:25 +02:00
Juan Font
3ae340527f
Merge pull request #648 from juanfont/show-nodes-online
...
Send Online field of tailcfg.Node based on LastSeen
2022-06-16 19:26:13 +02:00
Juan Font
bfa9ed814d
Merge branch 'main' into show-nodes-online
2022-06-16 18:53:25 +02:00
Juan Font Alonso
1e4678c02f
Updated changelog
2022-06-16 18:48:32 +02:00
Juan Font Alonso
66fffd69ce
Send Online field of tailcfg.Node based on LastSeen
2022-06-16 18:43:50 +02:00
Kristoffer Dalby
e3f99d670e
Merge pull request #646 from juanfont/update-contributors
2022-06-16 16:08:31 +01:00
github-actions[bot]
360488abb4
docs(README): update contributors
2022-06-16 13:08:07 +00:00
Kristoffer Dalby
8dda44105e
Merge pull request #643 from iSchluff/fix/dns-name-panic
2022-06-16 14:07:21 +01:00
Kristoffer Dalby
2215e17223
Merge branch 'main' into fix/dns-name-panic
2022-06-16 11:04:31 +01:00
Kristoffer Dalby
157db307f9
Merge pull request #642 from kradalby/ignore-integtest-dump
2022-06-16 08:35:47 +01:00
Juan Font
0bd39b2c5e
Merge branch 'main' into ignore-integtest-dump
2022-06-16 00:25:45 +02:00
Anton Schubert
8f31ed51e1
fix occasional panic on registration
...
GenerateRandomStringDNSSafe will panic occasionally if the random base64
string contains too many - and _ due to the replacement. Fix by looping.
2022-06-15 12:22:57 +02:00
Kristoffer Dalby
d2d1f92836
Merge pull request #641 from juanfont/update-contributors
2022-06-12 22:57:32 +01:00
Kristoffer Dalby
c02819ab9f
Ignore new dump file
2022-06-12 17:26:44 +00:00
github-actions[bot]
28a3a5bd61
docs(README): update contributors
2022-06-12 17:00:23 +00:00
Kristoffer Dalby
891815634b
Merge pull request #639 from kradalby/ephemeral-error-msg
2022-06-12 17:59:48 +01:00
Kristoffer Dalby
8650328922
Remove debug output, it runs before we disable it
2022-06-12 16:40:43 +00:00
Kristoffer Dalby
7bd07e3b9b
Merge branch 'main' into ephemeral-error-msg
2022-06-12 14:33:49 +01:00
Kristoffer Dalby
76195bb3ac
Add warn if configuration could not be found
2022-06-12 13:32:16 +00:00
Juan Font
6afd492095
Merge pull request #638 from kradalby/update-nodes-derp
...
Simplify DERP maps update function
2022-06-12 15:26:20 +02:00
Kristoffer Dalby
c95bce4aea
Update changelog
2022-06-12 13:18:49 +00:00
Kristoffer Dalby
fd3a1c13e3
Add a default to ephemeral_node_inactivity_timeout
2022-06-12 13:12:53 +00:00
Kristoffer Dalby
95824ac2ec
MOve ephemeral inactivity config check to all the other config check
2022-06-12 13:12:43 +00:00
Kristoffer Dalby
a050158d11
Use new update state logic for derp maps
2022-06-12 12:27:37 +00:00
Kristoffer Dalby
e0ef601123
Merge pull request #636 from huskyii/fix_issue635
2022-06-12 12:53:19 +01:00
Jiang Zhu
9c5d485fdd
fix issue 635
2022-06-12 17:01:17 +08:00
Juan Font
cb88b16207
Merge pull request #630 from kradalby/test-126
...
Add 1.26 to tests
2022-06-11 18:14:38 +02:00
Kristoffer Dalby
257c025975
Update build system
2022-06-11 15:42:06 +00:00
Kristoffer Dalby
50bdf9d3b9
Update vendor sha
2022-06-11 15:39:37 +00:00
Kristoffer Dalby
8d58894daa
Tailscale 1.26 uses dnstype pointer
2022-06-11 15:34:02 +00:00
Kristoffer Dalby
43fa7f9fd5
Upgrade tailscale lib to 1.26
2022-06-11 15:34:02 +00:00
Kristoffer Dalby
f2a8bfeb9f
Merge branch 'main' into test-126
2022-06-11 16:04:35 +01:00
Kristoffer Dalby
06bbeea37f
Merge pull request #632 from juanfont/update-contributors
2022-06-11 16:04:21 +01:00
github-actions[bot]
e5f26f819a
docs(README): update contributors
2022-06-11 14:35:56 +00:00
Kristoffer Dalby
a058f17946
Merge branch 'main' into test-126
2022-06-11 15:35:36 +01:00
Kristoffer Dalby
a4b4fc8b6c
Merge pull request #624 from iSchluff/feature/configure-randomize-port
2022-06-11 15:35:24 +01:00
Kristoffer Dalby
ab35baaa29
Merge branch 'main' into feature/configure-randomize-port
2022-06-11 15:07:47 +01:00
Kristoffer Dalby
883bb92991
Merge pull request #618 from juanfont/acl-syntax-fixes
2022-06-11 15:07:29 +01:00
Kristoffer Dalby
bfb58de7b8
Add 1.26 to tests
2022-06-11 13:45:32 +00:00
Kristoffer Dalby
6faf2d63d0
Update integration dump tests
2022-06-11 13:31:30 +00:00
Kristoffer Dalby
569f3caab9
Use constants in tests
2022-06-11 13:17:07 +00:00
Kristoffer Dalby
7cd0f5e8a4
Merge branch 'main' into acl-syntax-fixes
2022-06-11 14:14:21 +01:00
Kristoffer Dalby
02cc6bcc05
Merge branch 'main' into feature/configure-randomize-port
2022-06-11 13:49:32 +01:00
Kristoffer Dalby
9ff09b73ad
Update Changelog
2022-06-11 13:49:17 +01:00
Kristoffer Dalby
f93cf4b980
Merge pull request #628 from kradalby/acl-update-nodes
2022-06-11 13:32:57 +01:00
Juan Font Alonso
3d7be5b287
Minor rename
2022-06-11 14:12:53 +02:00
Juan Font Alonso
cdf41bd500
Merge branch 'acl-syntax-fixes' of https://github.com/juanfont/headscale into acl-syntax-fixes
2022-06-11 14:12:39 +02:00
Juan Font Alonso
735a6aaa39
Use const for IANA protcol numbers
2022-06-11 14:09:08 +02:00
Kristoffer Dalby
0c2648c188
Update the nodes after we have reloaded the ACL policy with sighup
2022-06-11 12:54:44 +01:00
Kristoffer Dalby
7e6291c21c
Change Set state change function to filter instead of single namespace
...
This commit makes the setLastStateChangeToNow function take a list of
namespaces instead of a single namespace. If no namespaces is passed,
all namespaces will be updated. This means that the argument acts like a
filter.
2022-06-11 12:53:02 +01:00
Kristoffer Dalby
3f7749c6d4
Merge branch 'main' into feature/configure-randomize-port
2022-06-11 10:55:05 +01:00
Kristoffer Dalby
586c5411f1
Merge pull request #611 from huskyii/doc_openbsd
2022-06-11 10:54:28 +01:00
Jiang Zhu
2be16b581c
1) fix typo 2) another hard coded version
2022-06-11 17:23:01 +08:00
Jiang Zhu
06e22bf878
Merge branch 'juanfont:main' into doc_openbsd
2022-06-11 16:54:01 +08:00
Jiang Zhu
0b4b530809
remove the hardcoded version(suggested by @kradalby)
2022-06-11 16:41:52 +08:00
Kristoffer Dalby
efca3daa5c
Merge pull request #612 from huskyii/enhance_cli_config
2022-06-10 20:38:11 +01:00
Kristoffer Dalby
fdefe46c40
Merge branch 'main' into enhance_cli_config
2022-06-10 20:18:33 +01:00
Anton Schubert
34be10840c
add ability to set randomizeClientPort
2022-06-09 21:26:40 +02:00
Juan Font
80ad1db228
Merge branch 'main' into acl-syntax-fixes
2022-06-09 14:09:26 +02:00
Juan Font
e918ea89a3
Merge pull request #619 from majst01/simplify-split
...
Use strings.Cut to simplify logic
2022-06-09 14:08:49 +02:00
Juan Font Alonso
19b968849f
Added missing file
2022-06-08 18:21:35 +02:00
Juan Font Alonso
5bc11891f5
Update internal docs with protocol usage
2022-06-08 18:15:38 +02:00
Juan Font Alonso
818d26b5f9
Updated changelog
2022-06-08 18:12:56 +02:00
Juan Font Alonso
c47354bdc3
Update internal docs to the new syntax
2022-06-08 18:12:47 +02:00
Stefan Majer
86ce0e0c66
Use strings.Cut to simplify logic
2022-06-08 18:09:11 +02:00
Juan Font Alonso
39f03b86c8
Added ACL test file
2022-06-08 18:06:25 +02:00
Juan Font Alonso
8287ba24b9
Do not lint the protocol magic numbers
...
I happily use https://pkg.go.dev/golang.org/x/net/internal/iana , but it is internal
2022-06-08 17:55:32 +02:00
Juan Font Alonso
ab1aac9f3e
Improve ACLs by adding protocol parsing support
2022-06-08 17:43:59 +02:00
Juan Font Alonso
3e353004b8
Migrate ACLs syntax to new Tailscale format
...
Implements #617 .
Tailscale has changed the format of their ACLs to use a more firewall-y terms ("users" & "ports" -> "src" & "dst"). They have also started using all-lowercase tags. This PR applies these changes.
2022-06-08 13:40:15 +02:00
Jiang Zhu
bcb04d38a5
Merge branch 'main' into enhance_cli_config
...
Extract LoadConfig from GetHeadscaleConfig, as they are conceptually
different operation, e.g.,
1) you can reload config through LoadConfig and do not get config
2) you can get config without reload config
2022-06-07 22:51:47 +08:00
Jiang Zhu
de0e2bf828
Merge branch 'main' into doc_openbsd
2022-06-07 22:31:32 +08:00
Kristoffer Dalby
8fed47a2be
Merge pull request #616 from juanfont/update-contributors
2022-06-07 15:58:53 +02:00
github-actions[bot]
17d4968425
docs(README): update contributors
2022-06-07 06:16:00 +00:00
Kristoffer Dalby
54acee6880
Merge pull request #615 from demiflat/fix_typo
2022-06-07 08:15:17 +02:00
Darrell Kundel
a4e05d4db3
fix typo for GGO->CGO
2022-06-07 11:36:13 +08:00
Kristoffer Dalby
b0acbed329
Merge pull request #608 from kradalby/config-rework
2022-06-05 20:18:20 +02:00
Kristoffer Dalby
1b2967320b
Merge branch 'main' into config-rework
2022-06-05 17:57:15 +02:00
Kristoffer Dalby
90f6be0c98
Rename one char var
2022-06-05 17:52:28 +02:00
Kristoffer Dalby
78ed610b50
Switch config to pointer
2022-06-05 17:47:26 +02:00
Kristoffer Dalby
af891808f6
Make get config load the config, use config in main method
2022-06-05 17:47:12 +02:00
Jiang Zhu
0c5a402206
add changelog
2022-06-05 23:15:21 +08:00
Jiang Zhu
8744eeeb19
ExecuteCommand set HEADSCALE_LOG_LEVEL to disabled
2022-06-05 23:14:49 +08:00
Jiang Zhu
ce13596077
add integration test for headscale -c
2022-06-05 23:13:58 +08:00
Jiang Zhu
402a29e50c
impl heascale -c to specify config file
2022-06-05 18:25:09 +08:00
Jiang Zhu
0363e58467
cli.LoadConfig accepts config file now
2022-06-05 17:55:27 +08:00
Jiang Zhu
c8a14ccabb
fix prettier
2022-06-05 16:01:53 +08:00
Jiang Zhu
1de29fd4e6
fix rcd link
2022-06-05 15:49:24 +08:00
Jiang Zhu
75a0155f73
add openbsd doc
2022-06-05 15:45:38 +08:00
Kristoffer Dalby
adb55bcfe9
Merge pull request #610 from huskyii/fix_pie_build
2022-06-04 12:37:02 +02:00
Jiang Zhu
2201ec8905
some GOOS do not support pie build, detect in makefile and fall back to non-pie build
2022-06-04 18:11:10 +08:00
Kristoffer Dalby
39f6fdef1a
Merge pull request #609 from kradalby/add-arm64-darwin-drop-32
2022-06-04 11:42:51 +02:00
Kristoffer Dalby
699aa5cf38
Merge branch 'main' into add-arm64-darwin-drop-32
2022-06-03 19:36:01 +02:00
Kristoffer Dalby
1486adb25a
Update changelog
2022-06-03 17:35:47 +00:00
Kristoffer Dalby
2653c2f5e8
Drop arm32 (armhf) for linux and add Darwin arm64
2022-06-03 17:34:06 +00:00
Kristoffer Dalby
7b7244dac2
Merge pull request #607 from juanfont/update-contributors
2022-06-03 11:01:07 +02:00
github-actions[bot]
571ce2b0b9
docs(README): update contributors
2022-06-03 08:49:19 +00:00
Kristoffer Dalby
c3db5ed749
Merge remote-tracking branch 'upstream/main' into config-rework
2022-06-03 10:49:08 +02:00
Kristoffer Dalby
0797148076
Merge pull request #601 from kradalby/signals-reload-acl
2022-06-03 10:48:43 +02:00
Kristoffer Dalby
24c9530eee
Add loglevel and disable update to config struct
2022-06-03 10:37:45 +02:00
Kristoffer Dalby
679cf7c0d7
Merge branch 'main' into signals-reload-acl
2022-06-03 10:23:53 +02:00
Kristoffer Dalby
19b6405332
Merge pull request #597 from kradalby/db-error-handling
2022-06-03 10:23:21 +02:00
Kristoffer Dalby
aee8aa1c61
Move TLS config into its own struct
2022-06-03 10:14:14 +02:00
Kristoffer Dalby
5514a862dc
Update headscale read config tests
2022-06-03 09:26:46 +02:00
Kristoffer Dalby
1ea8bb782c
Move all read config logic to config.go
2022-06-03 09:26:36 +02:00
Kristoffer Dalby
35722cd5aa
Move FilePerm function from cli to headscale
2022-06-03 09:24:36 +02:00
Kristoffer Dalby
533ecee252
Move config struct to its own file
2022-06-03 09:05:41 +02:00
Kristoffer Dalby
f1db2d0c8e
Merge branch 'main' into signals-reload-acl
2022-06-02 11:12:15 +02:00
Kristoffer Dalby
6f6fb4dcd6
Merge branch 'main' into db-error-handling
2022-06-02 11:11:58 +02:00
Kristoffer Dalby
b1ba7ba685
Merge pull request #602 from iSchluff/fix/forced-tags-with-tagOwner
2022-06-02 11:11:43 +02:00
Anton Schubert
6dccfee862
Fix forced Tags with legitimate tagOwners
...
Also replace loops contains
2022-06-01 15:43:32 +02:00
Kristoffer Dalby
6f32b80b2b
Update changelog
2022-05-31 14:30:11 +02:00
Kristoffer Dalby
2feed18b28
Support reloading ACLs with SIGHUP
...
Also continously listen for signals, not just once.
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
36dca3516a
Move Abspath function to headscale utils
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
06129277ed
Rename abspath function to describe what it does
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
6b1482daee
Use config object instead of viper for policy path
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
24e4787a64
Make ACL policy part of the config struct
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
5bfae22c8f
Make config get function global
2022-05-31 14:28:23 +02:00
Kristoffer Dalby
3e078f0494
Fix logtail config function name
2022-05-31 14:28:01 +02:00
Kristoffer Dalby
0b4f59b82b
Improve signal handling
...
This commit starts to wire up better signal handling, it starts with
handling shutdown a bit better, using the graceful shutdown for all the
listeners we use.
It also adds the initial switch case for handling config and acl reload,
which is to be implemented.
2022-05-31 14:28:00 +02:00
Kristoffer Dalby
a19af04582
Fix errors introduced by merge
2022-05-31 11:03:08 +02:00
Kristoffer Dalby
0676aa11a9
Merge branch 'main' into db-error-handling
2022-05-31 10:18:13 +02:00
Kristoffer Dalby
be25bbce92
Merge pull request #560 from kradalby/rename-fixess
2022-05-31 10:14:48 +02:00
Kristoffer Dalby
5ecfbbaf5d
Fix pointer in machine save call
2022-05-31 10:05:00 +02:00
Kristoffer Dalby
7f7cd737dc
Merge branch 'main' into rename-fixess
2022-05-31 09:45:49 +02:00
Kristoffer Dalby
b472e5a689
Merge pull request #599 from kradalby/parse-duration-improv
2022-05-31 09:45:36 +02:00
Kristoffer Dalby
25c674ed32
Merge branch 'main' into parse-duration-improv
2022-05-31 09:43:18 +02:00
Kristoffer Dalby
3d93cf9e2d
Update changelog
2022-05-31 09:42:50 +02:00
Kristoffer Dalby
f7edea5f40
Merge branch 'main' into rename-fixess
2022-05-31 09:42:20 +02:00
Kristoffer Dalby
d26e220fb9
Merge pull request #598 from kradalby/parse-duration-improv
2022-05-31 09:42:00 +02:00
Kristoffer Dalby
d860270733
Use Prometheus duration parser (support days and weeks)
2022-05-30 16:10:39 +02:00
Kristoffer Dalby
a09633e859
Check errors of more database calls
2022-05-30 15:39:24 +02:00
Kristoffer Dalby
a1837a4d69
Merge branch 'main' into db-error-handling
2022-05-30 15:31:56 +02:00
Kristoffer Dalby
52cc3bc8eb
Check all errors for db.Save
2022-05-30 15:31:06 +02:00
Kristoffer Dalby
9175aca094
Merge branch 'main' into rename-fixess
2022-05-30 15:29:50 +02:00
Kristoffer Dalby
848727a21d
Merge pull request #596 from kradalby/disable-logcatcher
2022-05-30 15:29:35 +02:00
Kristoffer Dalby
df7d5fa2b9
Fix lint
2022-05-30 14:58:40 +02:00
Kristoffer Dalby
86dfc91dd5
update readme
2022-05-30 14:57:49 +02:00
Kristoffer Dalby
7f66d9184b
Add config test
2022-05-30 14:57:43 +02:00
Kristoffer Dalby
ff5f31b87e
Disable logtail for clients
2022-05-30 14:52:50 +02:00
Kristoffer Dalby
a0c465c2eb
Wire up setting to enable/disable logtail
2022-05-30 14:47:41 +02:00
Kristoffer Dalby
d11279e615
Merge branch 'main' into rename-fixess
2022-05-30 13:38:28 +02:00
Kristoffer Dalby
266aac9e61
Update CHANGELOG
2022-05-30 13:35:40 +02:00
Kristoffer Dalby
4ffd3eacb0
Override golangci-lint to use go 1.17
2022-05-30 13:35:40 +02:00
Kristoffer Dalby
a443255b3e
Validate isOutdated against all namespaces
...
This commit makes isOutdated validate a nodes necessity to update
against all namespaces, and not just the nodes own namespace (which made
more sense before).
getLastStateChange is now uses the passed namespaces as a filter,
meaning that not requesting any namespace will give you the total last
updated state.
In addition, the sync.Map is exchanged for a variant that uses generics
which allows us to remove some casting logic.
2022-05-30 13:35:40 +02:00
Kristoffer Dalby
a992840c9b
Give UpdateMachine a more meaningful name
2022-05-30 13:35:40 +02:00
Kristoffer Dalby
dbc1d981c9
Revert golines
2022-05-30 13:35:28 +02:00
github-actions[bot]
9993f51b5e
docs(README): update contributors
2022-05-30 13:35:28 +02:00
Kristoffer Dalby
3a3fc0a4be
Update headscale checksum
2022-05-30 12:03:16 +02:00
Kristoffer Dalby
5316dd9c27
Use new nix stable (22.05)
2022-05-30 11:59:22 +02:00
Kristoffer Dalby
59a1a85a2b
Change to a go generics set implementation, no more casting 🎉
2022-05-30 11:49:35 +02:00
Kristoffer Dalby
fc502e1e79
Update golines and fix go mod checksum
2022-05-30 11:13:31 +02:00
Kristoffer Dalby
405de9e0f8
Merge pull request #595 from juanfont/update-contributors
2022-05-29 18:13:40 +01:00
Kristoffer Dalby
6eac5046c6
Merge branch 'main' into rename-fixess
2022-05-29 17:21:51 +01:00
github-actions[bot]
f7f722af52
docs(README): update contributors
2022-05-29 14:49:25 +00:00
Kristoffer Dalby
583f6eeedd
Merge pull request #594 from juanfont/update-contributors
2022-05-29 15:48:41 +01:00
github-actions[bot]
bec35b4965
docs(README): update contributors
2022-05-29 11:03:33 +00:00
Kristoffer Dalby
e596d8287c
Merge pull request #593 from juanfont/update-contributors
2022-05-29 12:02:49 +01:00
github-actions[bot]
6c903d2d93
docs(README): update contributors
2022-05-29 10:23:00 +00:00
Kristoffer Dalby
914431b94a
Merge pull request #591 from pvinis/patch-2
2022-05-29 11:22:26 +01:00
Kristoffer Dalby
11da7436c7
Merge branch 'main' into patch-2
2022-05-29 11:19:29 +01:00
Kristoffer Dalby
0f532aa5c1
Merge pull request #590 from pvinis/patch-1
2022-05-29 11:19:14 +01:00
Pavlos Vinieratos
835828fe92
link fix
2022-05-28 20:48:59 +03:00
Pavlos Vinieratos
fff1011ed8
typo
2022-05-28 20:46:01 +03:00
Kristoffer Dalby
ef497caa1b
Merge pull request #2 from juanfont/fix-rename-integration-tests
2022-05-28 17:14:41 +01:00
Juan Font Alonso
4f3f0542d4
Fix some issues in testing with new hostname handling
2022-05-28 12:54:57 +02:00
Kristoffer Dalby
5fa987519d
move populate to after when given_name exist
2022-05-23 17:33:07 +01:00
Kristoffer Dalby
77ceeaf5fd
Test magic dns with the correct urls
2022-05-18 21:18:04 +02:00
Kristoffer Dalby
4a9d3bedf9
Use new names to resolve magic dns
2022-05-18 20:14:18 +02:00
Kristoffer Dalby
802eb931d1
Make sure givenname is set for preauthkeys
2022-05-17 22:02:18 +02:00
Kristoffer Dalby
9ebeb3d7e4
Retreive hostnames from headscale, now that they are random
2022-05-17 22:11:51 +02:00
Kristoffer Dalby
e631c6f7e0
Merge master
2022-05-16 21:41:46 +02:00
Kristoffer Dalby
163e5c29e4
fix trace log message
2022-05-16 20:35:35 +02:00
Kristoffer Dalby
4aae917f74
Require GivenName to be unique
2022-05-16 20:33:47 +02:00
Kristoffer Dalby
9b393eb861
Add integration cli tests for rename command
2022-05-16 20:32:56 +02:00
Kristoffer Dalby
5fa3016703
Generate unique givennames for hosts joining (and debug added)
2022-05-16 20:32:38 +02:00
Kristoffer Dalby
03cccd60a6
Reword FQDN normalize errors to not _only_ cover namespaces
2022-05-16 20:31:32 +02:00
Kristoffer Dalby
177c21b294
Add helper function to create a unique givenname
2022-05-16 20:30:43 +02:00
Kristoffer Dalby
f4873d9387
Fix rename cli error
2022-05-16 20:29:31 +02:00
Kristoffer Dalby
747d64cdae
Merge pull request #558 from restanrm/feat-list-tags-of-machines
2022-05-16 19:03:48 +01:00
Kristoffer Dalby
c9efd5c132
Merge branch 'main' into feat-list-tags-of-machines
2022-05-16 16:35:52 +01:00
Kristoffer Dalby
546ddd2a84
Merge pull request #510 from reynico/acls-doc
2022-05-16 16:32:51 +01:00
Kristoffer Dalby
2edb5428f9
Merge branch 'main' into acls-doc
2022-05-16 16:32:18 +01:00
Adrien Raffin-Caboisse
9f082125fa
fix: remove version pinning for golangci-lint it does not work
2022-05-16 16:48:04 +02:00
Adrien Raffin-Caboisse
11582105ab
fix: flake.nex update sha256
2022-05-16 15:26:00 +02:00
Adrien Raffin-Caboisse
c4e69fe2c3
fix: ignore exhaust linter
2022-05-16 15:13:16 +02:00
Adrien Raffin-Caboisse
4435a4f19d
chore: apply lint recommendations
2022-05-16 14:59:46 +02:00
Adrien Raffin-Caboisse
02ae7a0563
fix: pin version of golangci-lint to match dev config
2022-05-16 14:40:45 +02:00
Adrien Raffin-Caboisse
852dc0f4de
feat: add golangci-lint in nix develop
2022-05-16 14:40:05 +02:00
Adrien Raffin-Caboisse
844ad15109
fix: revert previous commit and add exclusion of linter
2022-05-16 14:29:05 +02:00
Adrien Raffin-Caboisse
522e892099
fix: remove unknown linters:
...
When running in CI, I obtained the following error:
```
Running [/home/runner/golangci-lint-1.41.0-linux-amd64/golangci-lint run --out-format=github-actions --new-from-patch=/tmp/tmp-1795-28vaWZek2jfM/pull.patch --new=false --new-from-rev=] in [] ...
level=error msg="Running error: unknown linters: 'ireturn,maintidx', run 'golangci-lint linters' to see the list of supported linters"
```
2022-05-16 14:17:31 +02:00
Adrien Raffin-Caboisse
0445f404ec
fix: pin version of golangci-lint in GA
2022-05-16 14:12:49 +02:00
Adrien Raffin-Caboisse
bc1909fa22
Merge branch 'feat-list-tags-of-machines' of github.com:restanrm/headscale into feat-list-tags-of-machines
2022-05-16 11:17:36 +02:00
Adrien Raffin-Caboisse
ca71830963
docs: add small documentation on getTags func
2022-05-16 11:16:07 +02:00
Kristoffer Dalby
a28eebfca3
Merge branch 'main' into feat-list-tags-of-machines
2022-05-15 12:11:28 +01:00
Kristoffer Dalby
0d31ea08c3
Merge pull request #578 from samson4649/main
2022-05-15 11:58:40 +01:00
Samuel Lock
614c003704
updated changelog
2022-05-14 22:36:04 +10:00
Adrien Raffin-Caboisse
b511295349
fix: integration tests result
...
Execute command doesn't fail, the result is passed in json content.
2022-05-13 13:02:40 +02:00
Adrien Raffin-Caboisse
fcdc292647
fix: update tag in db if acl is enabled
2022-05-13 13:00:32 +02:00
Adrien Raffin-Caboisse
09836cd150
chore: update vendorSha after update of go.mod and go.sum
2022-05-13 12:19:32 +02:00
Adrien Raffin-Caboisse
49ec9943b9
fix: loop over result machines instead of startup machines
2022-05-13 12:14:11 +02:00
Adrien Raffin-Caboisse
72c1edaaa4
Merge remote-tracking branch 'origin/main' into feat-list-tags-of-machines
2022-05-13 11:56:06 +02:00
Adrien Raffin-Caboisse
294ed7a751
docs: update changelog
2022-05-13 11:51:31 +02:00
Adrien Raffin-Caboisse
31c0062d5e
feat: add integration tests for tag support
2022-05-13 11:47:22 +02:00
Adrien Raffin-Caboisse
63d920510d
feat: improve nodes list with inputs from @deonthomasgy
...
cf: https://github.com/juanfont/headscale/compare/main...deonthomasgy:dev/thomas/show-tags
2022-05-13 11:46:28 +02:00
Adrien Raffin-Caboisse
16f9691e80
fix: ignore emptyPolicy errors for db insertion
2022-05-13 11:20:40 +02:00
Adrien Raffin-Caboisse
209d003832
feat: handle insert into database error
2022-05-13 11:09:28 +02:00
Adrien Raffin-Caboisse
62cfd60e38
feat: add validation of tags
2022-05-13 10:18:01 +02:00
Adrien Raffin-Caboisse
fdbc9657bc
feat: return error if validation is failed
2022-05-13 10:14:38 +02:00
Adrien Raffin-Caboisse
ad4401aa40
fix: remove debug code
2022-05-13 10:14:36 +02:00
Samuel Lock
c26280c331
modified code to satisfy golangci-lint and added integration test
2022-05-11 09:31:24 +10:00
Kristoffer Dalby
b028a7dfc9
Merge branch 'main' into main
2022-05-10 22:33:33 +01:00
Kristoffer Dalby
41cd0d30eb
Merge pull request #576 from juanfont/update-contributors
2022-05-10 18:26:14 +01:00
Samuel Lock
8be9e9655c
fixed issue #360
2022-05-10 20:51:14 +10:00
github-actions[bot]
31bdba7456
docs(README): update contributors
2022-05-08 21:57:04 +00:00
Kristoffer Dalby
d6e1d10b12
Merge pull request #573 from deonthomasgy/patch-1
2022-05-08 22:56:32 +01:00
Kristoffer Dalby
21268f7abe
Merge branch 'main' into patch-1
2022-05-08 22:55:19 +01:00
Juan Font
91b95ff707
Merge pull request #574 from deonthomasgy/main
...
show ipv4 address first in node list
2022-05-08 23:32:25 +02:00
Deon Thomas
6ed79b7bb8
order Ip Address, IPv4 first, cleanup
2022-05-08 15:21:10 -04:00
Deon Thomas
b4f5ed6618
order ip address output, IPv4 first
2022-05-08 15:06:12 -04:00
Deon Thomas
ed46491a3d
fixed typo
...
not => note
2022-05-07 16:23:26 -04:00
Adrien Raffin-Caboisse
dc8c20e002
fix: handle empty aclPolicy for integration tests
2022-05-04 22:56:55 +02:00
Adrien Raffin-Caboisse
68417cc888
fix(go): add missing updated files
2022-05-03 20:37:06 +02:00
Adrien Raffin-Caboisse
a2fb5b2b9d
Merge remote-tracking branch 'origin/main' into feat-list-tags-of-machines
2022-05-03 20:35:28 +02:00
Kristoffer Dalby
3fbfc5a649
Merge pull request #570 from juanfont/update-contributors
2022-05-02 22:23:30 +01:00
github-actions[bot]
00535a2016
docs(README): update contributors
2022-05-02 21:12:01 +00:00
Kristoffer Dalby
fd452d52ca
Merge pull request #565 from apognu/dev/oidc-custom-config
2022-05-02 22:11:14 +01:00
Antoine POPINEAU
7cc58af932
Allow more configuration over the OIDC flow.
...
Adds knobs to configure three aspects of the OpenID Connect flow:
* Custom scopes to override the default "openid profile email".
* Custom parameters to be added to the Authorize Endpoint request.
* Domain allowlisting for authenticated principals.
* User allowlisting for authenticated principals.
2022-05-02 17:11:07 +02:00
Kristoffer Dalby
ddb87af5ce
Merge pull request #569 from Kazauwa/362-add-move-command
2022-05-02 12:38:00 +01:00
Igor Perepilitsyn
b9ea83fed8
check that new command does not break nodes list output
2022-05-02 15:04:24 +04:00
Igor Perepilitsyn
e279224484
add integrations tests
2022-05-02 14:00:09 +04:00
Igor Perepilitsyn
12d8f0f4b0
remove redundant lines of code, fix response when output is not plain text
2022-05-02 14:00:00 +04:00
Igor Perepilitsyn
6ba68d150c
correctly update machine namespace
2022-05-02 13:58:28 +04:00
Igor Perepilitsyn
1b3a7bbf03
apply styling fixes
2022-05-02 08:32:33 +04:00
Igor Perepilitsyn
4e686f8b77
add unit test
2022-05-01 21:40:18 +04:00
Igor Perepilitsyn
62c780a448
update changelog
2022-05-01 17:56:02 +04:00
Igor Perepilitsyn
bc055edf12
add command for moving node between namespaces
2022-05-01 17:55:34 +04:00
Igor Perepilitsyn
47c72a4e2e
add rpc method for moving node
2022-05-01 17:55:34 +04:00
Juan Font
02a78e5a45
Merge pull request #568 from juanfont/reduce-containers-int-tests
...
Reduce the number of containers in integration tests
2022-05-01 08:07:29 +02:00
Juan Font Alonso
01d9a2f589
Fixed linting issues
2022-04-30 23:48:28 +02:00
Juan Font
5403f215bc
Reduce the number of containers in integration tests
2022-04-30 21:19:54 +00:00
Kristoffer Dalby
96e2955ba7
Merge pull request #566 from juanfont/fix-spurious-updates
2022-04-30 22:12:57 +01:00
Juan Font
03659c4175
Updated changelog
2022-04-30 14:50:55 +00:00
Juan Font
843e2bd9b6
Do not setLastStateChangeToNow every 5 seconds
2022-04-30 14:47:16 +00:00
Kristoffer Dalby
28efd92fca
Merge pull request #559 from kradalby/update-deps
2022-04-28 10:17:54 +01:00
Kristoffer Dalby
7bb87a7300
Update vendor sha
2022-04-26 19:57:49 +00:00
Adrien Raffin-Caboisse
fec8cda16a
fix: fix linting issue on my computer
2022-04-25 22:33:53 +02:00
Adrien Raffin-Caboisse
2c448d4a5c
chore: apply linting
2022-04-25 22:27:44 +02:00
Adrien Raffin-Caboisse
3d302441b6
fix: order error in the tests
2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
8061abe279
refact: use generics for contains functions
2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
ea9aaa6022
feat: update functions to use set command
2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
cc9eeda889
feat: updating cli to match the set command
2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
25f1dcf724
feat: update generated files
2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
31debf7055
feat: rewrite proto to only update tags of machine
2022-04-25 22:17:23 +02:00
Kristoffer Dalby
db8db0299e
Resolve merge
2022-04-25 16:58:06 +00:00
Juan Font
e80954b6c8
Merge pull request #482 from kradalby/flake-build-env
...
Add Nix reproducible build system
2022-04-25 18:38:44 +02:00
Kristoffer Dalby
8504d0d8ba
Move todo to correct file
2022-04-24 21:12:45 +01:00
Kristoffer Dalby
7ef8cd881c
Fix comment
2022-04-24 21:10:50 +01:00
Kristoffer Dalby
79704dc9b0
Update command with new fields
2022-04-24 20:57:15 +01:00
Kristoffer Dalby
06c928bc52
Migrate name and nickname fields
2022-04-24 20:56:42 +01:00
Kristoffer Dalby
62808cbd86
Bubble error up to user for rename
2022-04-24 20:56:28 +01:00
Kristoffer Dalby
14994cb6cc
Use new logic and fields for dns
2022-04-24 20:55:54 +01:00
Kristoffer Dalby
6b79679cb4
Generate from proto
2022-04-24 20:55:20 +01:00
Kristoffer Dalby
caf79f6910
Change nickname to givenname in proto
2022-04-24 20:55:11 +01:00
Kristoffer Dalby
6e2768097a
Rename name -> hostname, nickname -> givenname
2022-04-24 20:54:38 +01:00
Kristoffer Dalby
8845938881
Merge branch 'main' into main
2022-04-24 09:48:00 +02:00
Kristoffer Dalby
a23035aee7
update rest of deps
2022-04-24 07:21:50 +00:00
Kristoffer Dalby
e51e6f487f
Resolve merge conflict
2022-04-23 08:31:57 +00:00
Kristoffer Dalby
f78deaebb6
Add new tailscale to integration tests
2022-04-23 08:30:13 +00:00
Kristoffer Dalby
4d2949bda9
Upgrade tailscale dep
2022-04-23 08:29:26 +00:00
Kristoffer Dalby
cb0899b534
Update vendor shar
2022-04-23 00:02:57 +02:00
Kristoffer Dalby
ecf5259693
resolve merge conflict
2022-04-22 22:34:20 +02:00
Kristoffer Dalby
3a90079ab8
Merge branch 'main' into feat-list-tags-of-machines
2022-04-22 22:27:36 +02:00
Kristoffer Dalby
970dea5d68
Merge pull request #557 from mpldr/remove-buf-installation
2022-04-22 08:16:03 +01:00
Kristoffer Dalby
cd9807a1d3
Merge branch 'main' into flake-build-env
2022-04-22 07:52:29 +01:00
Kristoffer Dalby
613dc61339
Merge branch 'main' into remove-buf-installation
2022-04-22 07:51:40 +01:00
Adrien Raffin-Caboisse
b9fee36f6e
fix: linting
2022-04-21 23:56:58 +02:00
Adrien Raffin-Caboisse
17d6624bb9
chore: fix lint
2022-04-21 23:49:21 +02:00
Adrien Raffin-Caboisse
f53bb63b2d
fix: move tag command to subcommand of nodes
2022-04-21 23:43:20 +02:00
Adrien Raffin-Caboisse
ea7bcfffbb
Merge branch 'main' into feat-list-tags-of-machines
2022-04-21 20:38:51 +02:00
Moritz Poldrack
3023323528
remove necessary buf installation
...
This commit adds buf as a regular dependency and go running it instead
of requiring installing buf to one's own GOBIN.
2022-04-21 20:23:21 +02:00
Kristoffer Dalby
2dfd8a9098
Merge pull request #556 from juanfont/update-contributors
2022-04-21 12:53:14 +01:00
github-actions[bot]
c8ed1f0f43
docs(README): update contributors
2022-04-21 11:51:30 +00:00
Kristoffer Dalby
f9e2ce2c8c
Merge pull request #551 from mpldr/patch-1
2022-04-21 12:50:50 +01:00
Moritz Poldrack
886e95c00d
Merge branch 'main' into patch-1
2022-04-21 11:00:33 +02:00
Moritz Poldrack
6dd9e93346
expanded arguments in useradd to be easier to understand for beginners
2022-04-21 11:00:17 +02:00
Kristoffer Dalby
2dacf839dc
Upgrade tailscale dep
2022-04-21 08:35:08 +00:00
Kristoffer Dalby
8f6952acee
Merge branch 'main' into flake-build-env
2022-04-21 09:23:23 +01:00
Kristoffer Dalby
235a90276f
Merge pull request #531 from juanfont/suggest-english
2022-04-21 09:21:37 +01:00
Kristoffer Dalby
5c285afda5
Merge branch 'main' into flake-build-env
2022-04-21 09:21:10 +01:00
Kristoffer Dalby
db930af50e
Merge branch 'main' into patch-1
2022-04-21 09:13:34 +01:00
Kristoffer Dalby
ffa570e877
Merge branch 'main' into suggest-english
2022-04-21 09:13:08 +01:00
Kristoffer Dalby
96ae78f422
Merge pull request #553 from kradalby/fix-discord-link
2022-04-21 09:12:49 +01:00
Kristoffer Dalby
580c72bf16
Update discord link so it does not grant temp memberships
2022-04-21 09:06:30 +01:00
Kristoffer Dalby
9254afff2d
Add direnv and nix output to gitignore
2022-04-21 09:06:13 +01:00
Moritz Poldrack
7ce0bd053c
removed leading whitespace
2022-04-16 23:58:05 +02:00
Moritz Poldrack
41a8c14acb
add information on how to create a headscale user
2022-04-16 23:56:57 +02:00
Moritz Poldrack
be2487f4c0
Clarified systemd friendly path
...
Suggested-by: Rendezvous
2022-04-16 23:52:06 +02:00
Adrien Raffin-Caboisse
4651c44dde
feat: print tags in nodes list
2022-04-16 13:32:00 +02:00
Adrien Raffin-Caboisse
4fcc5e253c
chore: fmt for grpc file
2022-04-16 13:15:18 +02:00
Adrien Raffin-Caboisse
89a1a56328
feat: add unit tests and fmt
2022-04-16 13:15:04 +02:00
Adrien Raffin-Caboisse
db1528bc73
feat: add invalid and valid tags to grpc response
2022-04-16 12:27:54 +02:00
Adrien Raffin-Caboisse
587bdc75de
feat: add valid and invalid fields
...
Also change ID in proto for ForcedTags since the previous ID's should be reserved for commented fields
2022-04-16 11:30:51 +02:00
Adrien Raffin-Caboisse
98f54c9f7f
chore: apply format and lint
2022-04-15 18:27:57 +02:00
Adrien Raffin-Caboisse
cd1d10761f
feat(acls): add support for forced tags
2022-04-15 18:01:13 +02:00
Adrien Raffin-Caboisse
9de9bc23f8
feat(cli): add tag subcommand to add and remove tags
2022-04-15 16:12:35 +02:00
Adrien Raffin-Caboisse
02f68ebac8
feat: add forcedTags field and update proto
2022-04-15 16:00:08 +02:00
Kristoffer Dalby
dd3f24b83f
Merge branch 'main' into suggest-english
2022-04-12 18:16:39 +01:00
Kristoffer Dalby
bc63c577a9
Merge pull request #537 from reynico/exit-if-acl-wrong
2022-04-12 18:15:15 +01:00
Kristoffer Dalby
57c81e4153
Merge branch 'main' into exit-if-acl-wrong
2022-04-12 17:01:40 +01:00
Kristoffer Dalby
556ca5fec7
Merge pull request #544 from mpldr/makefile-improvements
2022-04-12 17:00:58 +01:00
Kristoffer Dalby
93682ab708
Merge branch 'main' into makefile-improvements
2022-04-12 17:00:30 +01:00
Kristoffer Dalby
6eeee8e5c7
Merge pull request #545 from mpldr/fix-discord-invite
2022-04-12 16:59:40 +01:00
Kristoffer Dalby
d195847d8f
Merge branch 'main' into fix-discord-invite
2022-04-12 16:59:04 +01:00
Moritz Poldrack
3d8dc9d2bf
fix discord invite
...
Fixes: https://github.com/juanfont/headscale/issues/533
2022-04-11 19:08:07 +02:00
Moritz Poldrack
8601dd1f42
fixed CGO disabling
2022-04-11 14:57:12 +02:00
Kristoffer Dalby
3abdc870d8
Merge branch 'main' into makefile-improvements
2022-04-11 11:49:55 +01:00
Kristoffer Dalby
367f8489db
Merge pull request #542 from mpldr/issue-342-send-on-closed-channel
2022-04-11 11:48:53 +01:00
Moritz Poldrack
c312f8bf4a
set up Makefile for reproducible builds
2022-04-11 08:56:40 +02:00
Moritz Poldrack
1f43c39f93
replaced version-at-commit script with git-describe call
2022-04-11 08:54:12 +02:00
Moritz Poldrack
9f03a012fb
updated changelog
2022-04-10 22:47:52 +02:00
Moritz Poldrack
22dd61d849
fixed the issue of sending on closed channel
...
This commit fixes the issue of headscale crashing after sending on a
closed channel by moving the channel close to the sender side, instead
of the creator. closeChanWithLog is also implemented with generics now.
Fixes: https://github.com/juanfont/headscale/issues/342
Signed-off-by: Moritz Poldrack <git@moritz.sh >
2022-04-10 17:31:09 +02:00
Kristoffer Dalby
a92f6abc6e
Merge pull request #541 from juanfont/update-contributors
2022-04-10 10:04:44 +01:00
github-actions[bot]
9cdaa9730b
docs(README): update contributors
2022-04-10 09:03:16 +00:00
Kristoffer Dalby
5d67ed0ce1
Merge pull request #540 from yangchuansheng/dev
2022-04-10 10:02:42 +01:00
Carson Yang
62d774b6ee
Fix key name about derp port
2022-04-10 09:53:27 +08:00
Kristoffer Dalby
a14f50eeca
Merge pull request #538 from artemklevtsov/patch-1
2022-04-09 18:49:47 +01:00
Artem Klevtsov
98e98a8adb
Fix wrong metrics port in docs
...
It should be 9090.
2022-04-09 16:24:57 +07:00
Nico Rey
fa7ef3df2f
make linter happy
2022-04-07 15:21:26 -03:00
Nico Rey
c3324371d6
Update changelog
2022-04-06 18:41:13 -03:00
Nico Rey
6e08241712
Exit Headscale if ACL policy file cannot be parsed
2022-04-06 11:05:08 -03:00
Kristoffer Dalby
c07dd3f14f
Merge pull request #534 from nning/main
2022-04-06 08:35:39 +01:00
henning mueller
b2ae9b6cac
fix: Remove days from expiry option value examples
2022-04-05 18:45:29 +02:00
Juan Font
57536b020e
Merge branch 'main' into suggest-english
2022-04-02 11:47:11 +02:00
Juan Font Alonso
0003e30084
Suggest English as lingua franca
2022-04-02 11:45:18 +02:00
Juan Font
23be13b113
Merge pull request #528 from juanfont/update-contributors
...
docs(README): update contributors
2022-03-29 23:12:16 +02:00
github-actions[bot]
5e44266292
docs(README): update contributors
2022-03-28 15:06:39 +00:00
Kristoffer Dalby
32522cb482
Merge pull request #521 from Niek/patch-1
2022-03-28 16:06:00 +01:00
Niek van der Maas
6d296a195d
Update docs/running-headscale-container.md
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-28 08:58:33 +02:00
Niek van der Maas
3272febfb3
Change publish interface
2022-03-26 13:33:31 +01:00
Niek van der Maas
7dae780be1
Update docs/running-headscale-container.md
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-25 23:44:55 +01:00
Niek van der Maas
73f1c06f65
Fix long line
2022-03-25 07:46:01 +00:00
Niek van der Maas
b60727b205
Merge branch 'main' into patch-1
2022-03-25 08:44:16 +01:00
Niek van der Maas
8cee31d8d7
Fix prettier
2022-03-25 07:43:15 +00:00
Juan Font
b5aace6d3a
Merge pull request #519 from hdhoang/pak-counter
...
Fix labels cardinality error when registering unknown pre-auth key
2022-03-25 00:25:19 +01:00
Niek van der Maas
7e286c570e
Docker docs enhancements
...
While configuring a Docker setup I noticed that the docs could use some enhancements.
2022-03-22 13:45:30 +01:00
hdhoang
52fd13bfc4
Fix labels cardinality error when registering unknown pre-auth key
2022-03-21 15:49:14 +07:00
Kristoffer Dalby
b8e4aeede8
Upgrade golines
2022-03-20 22:39:43 +00:00
Kristoffer Dalby
9a632c17d1
Merge pull request #518 from juanfont/update-contributors
2022-03-20 14:42:41 +00:00
github-actions[bot]
8758ee1c4d
docs(README): update contributors
2022-03-20 14:18:39 +00:00
Kristoffer Dalby
150ae1846a
Merge pull request #517 from juanfont/changelog-prep-0.15
...
Prepare CHANGELOG for v0.15.0
2022-03-20 14:18:01 +00:00
Juan Font
452286552c
Update CHANGELOG.md to include future 0.16.0
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-20 15:07:22 +01:00
Juan Font Alonso
631cf58ff0
Added date for 0.15.0 in changelog
2022-03-20 13:36:25 +01:00
Juan Font
8a2c0e88f4
Merge pull request #513 from juanfont/unstable-integration-tests
...
Add Tailscale unstable channel and repo HEAD to integration tests
2022-03-20 13:35:23 +01:00
Juan Font Alonso
af6a47fdd3
Changelog updated
2022-03-20 12:36:30 +01:00
Juan Font
94d910557f
Merge branch 'main' into unstable-integration-tests
2022-03-20 12:34:04 +01:00
Juan Font Alonso
a8a683d3cc
Added default values in Dockerfile.tailscale
2022-03-20 12:33:41 +01:00
Juan Font Alonso
a1caa5b45c
Minor improvements on logging
2022-03-20 12:31:18 +01:00
Juan Font Alonso
f42868f67f
Docker requires lowercase for the container names
2022-03-20 12:30:56 +01:00
Juan Font Alonso
a6455653c0
Added missing package
2022-03-20 12:30:08 +01:00
Kristoffer Dalby
c8aa653275
Merge branch 'main' into main
2022-03-19 09:36:36 +00:00
Kristoffer Dalby
91e5cbd793
Add direnv flake support
2022-03-19 09:23:03 +00:00
Kristoffer Dalby
79fc74c7a4
Merge branch 'main' into acls-doc
2022-03-18 22:43:17 +00:00
Kristoffer Dalby
c8503075e0
Merge pull request #514 from aofei/main
2022-03-18 21:18:22 +00:00
Kristoffer Dalby
4068a7b00b
Merge branch 'main' into main
2022-03-18 21:02:05 +00:00
Kristoffer Dalby
daae2fe549
Merge pull request #512 from restanrm/feat-add-debug-log
2022-03-18 21:01:16 +00:00
Kristoffer Dalby
47bbb85a20
Merge branch 'main' into acls-doc
2022-03-18 20:44:44 +00:00
Kristoffer Dalby
739653fa71
Merge branch 'main' into feat-add-debug-log
2022-03-18 20:44:21 +00:00
Kristoffer Dalby
304109a6c5
Merge pull request #511 from restanrm/fix-machine-registration-expired
2022-03-18 20:44:05 +00:00
Kristoffer Dalby
c29af96a19
Merge branch 'main' into main
2022-03-18 20:42:44 +00:00
Kristoffer Dalby
d21e9d29d1
Merge branch 'main' into feat-add-debug-log
2022-03-18 19:41:32 +00:00
Kristoffer Dalby
b65bd5baa8
Merge branch 'main' into fix-machine-registration-expired
2022-03-18 19:41:26 +00:00
Juan Font Alonso
0165b89941
Fixed paths
2022-03-18 19:35:09 +01:00
Kristoffer Dalby
53b62f3f39
Merge pull request #499 from juanfont/mandatory-stun
2022-03-18 18:28:37 +00:00
Kristoffer Dalby
cd2914ab3b
Merge branch 'main' into mandatory-stun
2022-03-18 17:44:12 +00:00
Kristoffer Dalby
e85b97143c
Merge pull request #509 from kradalby/go118
2022-03-18 17:43:41 +00:00
Aofei Sheng
1eafe960b8
fix: possible panic in Headscale.scheduledDERPMapUpdateWorker
...
There is a possible nil pointer dereference panic in the
`Headscale.scheduledDERPMapUpdateWorker`. Such as when the embedded
DERP server is disabled.
2022-03-19 01:20:25 +08:00
Juan Font Alonso
749c92954c
Add Tailscale unstable channel and repo HEAD to integration tests
...
In preparation for the implementation of the new TS2021 protocol (Tailscale control protocol v2) we are expanding the test infrastructure
2022-03-18 17:05:28 +01:00
Juan Font Alonso
db9ba17920
Added missing file
2022-03-18 13:10:35 +01:00
Juan Font Alonso
d5ce7d7523
Prettier
2022-03-18 13:09:57 +01:00
Juan Font Alonso
2e6687209b
Make STUN server mandatory if DERP embedded is enabled
2022-03-18 12:58:00 +01:00
Adrien Raffin-Caboisse
2e04abf4bb
feat(oidc): add debug log
2022-03-18 09:40:12 +01:00
Adrien Raffin-Caboisse
882c0c34c1
chore(changelog): update changelog
2022-03-18 09:34:18 +01:00
Adrien Raffin-Caboisse
61ebb713f2
fix(oidc): Reset expiry for reauthentication
...
The previous code resetted the expiry time to be expired. So the machine was never reauthenticated
2022-03-18 09:32:07 +01:00
Kristoffer Dalby
ac5ad42474
Fix integration nix
2022-03-18 08:24:21 +00:00
Nico Rey
d68d7d5a6f
Docs/ACLs: Add a network diagram to help explain ACLs
2022-03-17 19:58:56 -03:00
Nico Rey
bff9036f14
Docs/ACLs: Add router examples with subnets
2022-03-17 19:58:34 -03:00
Nico Rey
8b08c2a918
Docs/ACLs: Namespaces are created automatically
2022-03-17 19:24:39 -03:00
Nico Rey
b9f0fabb5c
Docs/ACLs: Wording, add intermediary router example
2022-03-17 19:23:37 -03:00
Kristoffer Dalby
9d4822b8c7
Actually set up nix
2022-03-17 18:20:01 +00:00
Kristoffer Dalby
466d03d574
Nixify integration test
2022-03-17 18:18:51 +00:00
Kristoffer Dalby
d43fec7f96
Merge branch 'main' into flake-build-env
2022-03-17 18:11:21 +00:00
Kristoffer Dalby
62f4c205f5
Run binary build with nix
2022-03-17 18:11:04 +00:00
Kristoffer Dalby
003c19004d
Run tests with nix
2022-03-17 18:10:50 +00:00
Kristoffer Dalby
70274d528c
Add nix to runn on lint and integration
2022-03-17 18:08:49 +00:00
Kristoffer Dalby
6d41279781
Upgrade to go 1.18
2022-03-17 18:07:26 +00:00
Kristoffer Dalby
b781446e86
Upgrade to go 1.18
2022-03-17 17:43:11 +00:00
Kristoffer Dalby
1c9b1c0579
Merge pull request #507 from juanfont/update-contributors
2022-03-17 07:28:42 +00:00
github-actions[bot]
ade9552736
docs(README): update contributors
2022-03-17 06:38:00 +00:00
Kristoffer Dalby
68403cb76e
Merge pull request #505 from y0ngb1n/fix-docs-metrics-endpoint
2022-03-17 06:37:27 +00:00
Yang Bin
537ecb8db0
docs: fixed /metrics endpoint 8080 → 9090, reference config-example.yaml
2022-03-17 09:25:42 +08:00
Juan Font Alonso
8f5875efe4
Reorg errors
2022-03-16 19:46:59 +01:00
Juan Font
98ac88d5ef
Changed comment position
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-16 18:45:34 +01:00
Kristoffer Dalby
d13338a9fb
Merge branch 'main' into mandatory-stun
2022-03-16 07:18:18 +00:00
Juan Font
1579ffb66a
Merge pull request #500 from bravechamp/patch-1
...
Fix API access
2022-03-15 14:53:23 +01:00
bravechamp
0bfa5302a7
Fix API access
...
By allowing API keys to be validated
2022-03-15 16:05:56 +03:00
Juan Font Alonso
b8aad5451d
Make STUN run by default when embedded DERP is enabled
...
This commit also allows to set an external STUN server, while running the embedded DERP server (without embedded STUN)
2022-03-15 13:22:25 +01:00
bravechamp
60ee04674d
Normalize nickname before saving to database
2022-03-13 21:55:36 +00:00
bravechamp
9901d6b2e7
Ability to clear nickname
2022-03-13 21:10:41 +00:00
bravechamp
663e8384a3
Nickname support
2022-03-13 21:03:20 +00:00
Kristoffer Dalby
61440c42d3
Merge pull request #496 from juanfont/update-contributors
...
docs(README): update contributors
2022-03-10 19:58:24 +00:00
github-actions[bot]
18ee6274e1
docs(README): update contributors
2022-03-10 19:50:59 +00:00
Kristoffer Dalby
0abfbdc18a
Merge pull request #495 from appbricks/appbricks/main-bug-fix
...
Regression bug fix when re-authenticating machine with auth-key
2022-03-10 19:50:23 +00:00
Mevan Samaratunga
082a852c5e
fixed linting recommendation
2022-03-10 10:40:20 -05:00
Mevan Samaratunga
af081e9fd3
fixed lint errors
2022-03-10 10:22:21 -05:00
Mevan Samaratunga
8b5e8b7dfc
Refresh expired machine on re-auth - closes #489
2022-03-10 08:59:28 -05:00
Kristoffer Dalby
1e7d7e510e
Update go sha for flake
2022-03-08 17:17:02 +00:00
Kristoffer Dalby
a806694d23
fix gosum merge
2022-03-08 17:11:46 +00:00
Kristoffer Dalby
62d7fae056
Merge pull request #311 from restanrm/docs-acl-modifications
...
Issues with current ACL implementation and solution proposal
2022-03-08 17:08:17 +00:00
Kristoffer Dalby
06d85688fd
set version based on git rev
2022-03-08 17:07:25 +00:00
Kristoffer Dalby
dd219d0ff6
Merge branch 'main' into docs-acl-modifications
2022-03-08 17:05:59 +00:00
Kristoffer Dalby
6087e1cf6f
Merge pull request #488 from juanfont/update-contributors
2022-03-08 17:02:47 +00:00
github-actions[bot]
c47fb1ae54
docs(README): update contributors
2022-03-08 16:50:11 +00:00
Kristoffer Dalby
48cec3cd90
Merge pull request #486 from e-zk/main
2022-03-08 16:49:32 +00:00
Kristoffer Dalby
e54c508c10
Merge branch 'main' into main
2022-03-08 16:05:41 +00:00
Kristoffer Dalby
941e9d9b0f
Merge pull request #388 from juanfont/embedded-derp
2022-03-08 16:05:30 +00:00
Kristoffer Dalby
11ccae8e52
Merge branch 'main' into flake-build-env
2022-03-08 16:04:52 +00:00
Juan Font Alonso
b803240dc1
Added new line for prettier
2022-03-08 12:21:08 +01:00
Juan Font Alonso
bdbf620ece
Merge branch 'embedded-derp' of https://github.com/juanfont/headscale into embedded-derp
2022-03-08 12:16:43 +01:00
Juan Font
e5d22b8a70
Merge branch 'main' into embedded-derp
2022-03-08 12:16:34 +01:00
Juan Font Alonso
05c5e2280b
Updated CHANGELOG and README
2022-03-08 12:15:05 +01:00
Juan Font Alonso
b41d89946a
Merge branch 'embedded-derp' of https://github.com/juanfont/headscale into embedded-derp
2022-03-08 12:11:59 +01:00
Juan Font Alonso
cc0c88a63a
Added small integration test for stun
2022-03-08 12:11:51 +01:00
e-zk
c06689dec1
fix: make register html/template consistent with other html
...
- makes the html/template for /register follow the same formatting
as /apple and /windows
- adds a <title> element
- minor change for consistency's sake
2022-03-08 18:34:46 +10:00
Kristoffer Dalby
b85dd7abbd
Merge pull request #484 from juanfont/prtemplate-fix
...
Fix checkboxes in PR template
2022-03-08 07:29:30 +00:00
Kristoffer Dalby
6aeaff43aa
Fix checkboxes in PR template
2022-03-08 07:21:04 +00:00
Kristoffer Dalby
dd26cbd193
Merge branch 'main' into embedded-derp
2022-03-08 07:18:51 +00:00
Kristoffer Dalby
9a60eeaf86
Merge branch 'main' into flake-build-env
2022-03-08 07:18:21 +00:00
Kristoffer Dalby
b0ae3240fd
Merge pull request #387 from restanrm/fix-magic-dns-and-uppercase-letters
...
Fix magic dns and uppercase letters
2022-03-08 07:17:45 +00:00
Adrien Raffin-Caboisse
41efe98953
fix: apply fmt and fix missing name changes
2022-03-07 23:20:30 +01:00
Adrien Raffin-Caboisse
2b68c90778
chore: update changelog
2022-03-07 23:14:39 +01:00
Adrien Raffin-Caboisse
f19c048569
fix: change normalization function name
2022-03-07 22:55:54 +01:00
Adrien Raffin-Caboisse
6cc8bbc24f
feat(api): add normalisation at machine register step
2022-03-07 22:46:29 +01:00
Kristoffer Dalby
c24de595f6
Add example commands for docker
2022-03-07 17:41:16 +00:00
Kristoffer Dalby
63641a7b17
Correct pkgs call
2022-03-07 17:37:53 +00:00
Kristoffer Dalby
a6570d33a6
Add option to build docker image
...
This commit adds dockerbuild to flakes.nix:
```
nix build .#headscale-docker
```
This uses the Nix infra to build and _does not_ use Dockerfile.
It currently works on Linux (no macOS)
2022-03-07 17:18:41 +00:00
Kristoffer Dalby
124d8a3424
Update readme with nix notes
2022-03-07 16:58:07 +00:00
Kristoffer Dalby
5de9de14a9
Add flake build file
...
This commit adds a flake.nix build file, it can be used for three
things:
Build `headscale` from local or straight from git:
nix build
or
nix build github:juanfont/headscale
Run and Build `headscale` from local or straight from git:
nix run
or
nix run github:juanfont/headscale
Set up a development environment including all our tools,
- linters
- protobuf tooling
- compilers
nix develop
2022-03-07 16:51:38 +00:00
Kristoffer Dalby
15f8cb5034
Remove hacky go tool install
2022-03-07 07:40:56 +00:00
Juan Font Alonso
03452a8dca
Prettied
2022-03-07 00:29:40 +01:00
Juan Font Alonso
15ed71315c
Merge branch 'embedded-derp' of https://github.com/juanfont/headscale into embedded-derp
2022-03-06 23:47:31 +01:00
Juan Font Alonso
05df8e947a
Added missing file
2022-03-06 23:47:14 +01:00
Juan Font Alonso
b3fa66dbd2
Check for DERP in test
2022-03-06 23:46:16 +01:00
Juan Font Alonso
a27b386123
Clarified expiration dates
2022-03-06 23:45:01 +01:00
Juan Font Alonso
580db9b58f
Mention that STUN is UDP
2022-03-06 23:19:21 +01:00
Adrien Raffin-Caboisse
1114449601
change: update name of method to check and normalize Domain name
2022-03-06 20:46:17 +01:00
Juan Font
b47de07eea
Update Dockerfile.tailscale
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-06 20:42:27 +01:00
Juan Font
e1fcf0da26
Added more version
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-03-06 20:40:55 +01:00
Juan Font
dcf3ea567c
Merge branch 'main' into fix-magic-dns-and-uppercase-letters
2022-03-06 17:37:48 +01:00
Juan Font Alonso
de2ea83b3b
Linting here and there
2022-03-06 17:35:54 +01:00
Juan Font Alonso
eb06054a7b
Make DERP Region configurable
2022-03-06 17:25:21 +01:00
Juan Font Alonso
eb500155e8
Make STUN server configurable
2022-03-06 17:00:56 +01:00
Juan Font Alonso
dc909ba6d7
Improved logging on startup
2022-03-06 16:54:19 +01:00
Juan Font Alonso
70910c4595
Working /bootstrap-dns DERP helper
2022-03-06 01:23:35 +01:00
Juan Font Alonso
54c3e00a1f
Merge local DERP server region with other configured DERP sources
2022-03-05 20:04:31 +01:00
Juan Font Alonso
e78c002f5a
Fix minor issue
2022-03-05 19:48:30 +01:00
Juan Font Alonso
237f7f1027
Merge branch 'main' into embedded-derp
2022-03-05 19:42:29 +01:00
Juan Font Alonso
992efbd84a
Added missing private TLS key
2022-03-05 19:35:15 +01:00
Juan Font Alonso
e9eb90fa76
Added integration tests for the embedded DERP server
2022-03-05 19:34:06 +01:00
Juan Font Alonso
88378c22fb
Rename the file to derp_server.go for coherence
2022-03-05 19:31:50 +01:00
Juan Font Alonso
b742379627
Do not use the term embedded
2022-03-05 19:30:30 +01:00
Juan Font Alonso
df37d1a639
Do not offer the option to be DERP insecure
...
Websockets, in which DERP is based, requires a TLS certificate. At the same time,
if we use a certificate it must be valid... otherwise Tailscale wont connect (does not
have an Insecure option). So there is no option to expose insecure here
2022-03-05 19:19:21 +01:00
Juan Font Alonso
758b1ba1cb
Renamed configuration items of the DERP server
2022-03-05 16:22:02 +01:00
Kristoffer Dalby
435ee36d78
Merge pull request #394 from juanfont/renovateaction/dockerfiles
2022-03-05 00:41:22 +00:00
Renovate Bot
35efd8f95a
chore(deps): update dependency docker.io/golang to v1.17.8
2022-03-05 00:09:36 +00:00
Juan Font Alonso
09d78c7a05
Even more stuff moved to common
2022-03-04 13:54:59 +01:00
Kristoffer Dalby
60655c5242
Merge pull request #393 from juanfont/update-contributors
2022-03-04 12:30:20 +00:00
Juan Font Alonso
22d2443281
Move more stuff to common
2022-03-04 13:26:45 +01:00
github-actions[bot]
a70669fca7
docs(README): update contributors
2022-03-04 11:04:12 +00:00
Kristoffer Dalby
0720473033
Merge pull request #392 from e-zk/windows-endpoint
2022-03-04 11:03:33 +00:00
Kristoffer Dalby
e799307e74
Merge branch 'main' into windows-endpoint
2022-03-04 10:47:52 +00:00
e-zk
575f33d183
docs: fix comments to comply with golangci-lint
2022-03-04 20:35:09 +10:00
Juan Font Alonso
607c1eb316
Be consistent with uppercase DERP
2022-03-04 11:31:41 +01:00
e-zk
d69dada8ff
feat(windows): rename apple_mobileconfig.go => platform_config.go
...
rename apple_mobileconfig.go to platform_config.go since the file
includes configuration info for multiple platforms now.
2022-03-04 20:03:49 +10:00
e-zk
f9e0c13890
docs: update CHANGELOG
2022-03-04 19:53:57 +10:00
e-zk
12a50ac8ac
feat(windows): add /windows endpoint for Windows configuration
...
- registry file /windows/tailscale.reg is generated, filling in the
associated control server URL
- also includes CLI instructions
- fix /apple incorrect template: 'Url' is supposed to be '.URL'
2022-03-04 19:53:44 +10:00
e-zk
b342cf0240
feat(windows): cleanup /apple endpoint
...
- rename the gin function to AppleConfigMessage
- use <pre> + <code> for code blocks
- add headscale heading
- reword some sections
2022-03-04 19:53:29 +10:00
Kristoffer Dalby
e3ff87b7ef
Merge pull request #389 from e-zk/main
2022-03-04 07:26:35 +00:00
zakaria
745696b310
docs: fix mistake in ACME challenge type comment
2022-03-04 12:11:43 +10:00
Juan Font Alonso
23cde8445f
Merge branch 'main' into embedded-derp
2022-03-04 00:04:59 +01:00
Juan Font Alonso
9d43f589ae
Added missing deps
2022-03-04 00:04:28 +01:00
Juan Font Alonso
897d480f4d
Add an embedded DERP server to Headscale
...
This series of commit will be adding an embedded DERP server (and STUN) to Headscale,
thus making it completely self-contained and not dependant in other infrastructure.
2022-03-04 00:01:31 +01:00
Adrien Raffin-Caboisse
6f172a6e4c
fix(acls): remove dead error code
2022-03-03 23:53:08 +01:00
Adrien Raffin-Caboisse
44a5372c53
fix(poll): Normalize hostname
...
This function is called often. Normalization of the hostname will be written in database.
2022-03-03 23:52:25 +01:00
Kristoffer Dalby
f2ea6fb30f
Merge pull request #384 from restanrm/fix-issue-with-empty-namespace-and-acl-evaluation
2022-03-03 08:43:37 +00:00
Adrien Raffin-Caboisse
4a4952899b
feat(acls): add some logs and skip error
...
logs looks like the following
```
2022-03-02T20:43:08Z DBG Expanding alias=app-test
2022-03-02T20:43:08Z DBG Expanding alias=kube-test
2022-03-02T20:43:08Z DBG Expanding alias=test
2022-03-02T20:43:08Z WRN No IPs found with the alias test
2022-03-02T20:43:08Z DBG Expanding alias=prod
2022-03-02T20:43:08Z WRN No IPs found with the alias prod
2022-03-02T20:43:08Z DBG Expanding alias=prod
2022-03-02T20:43:08Z WRN No IPs found with the alias prod
```
2022-03-02 21:54:43 +01:00
Kristoffer Dalby
b72a8aa7d1
Merge pull request #381 from juanfont/update-contributors
2022-03-02 14:18:09 +00:00
github-actions[bot]
e301d0d1df
docs(README): update contributors
2022-03-02 13:44:26 +00:00
Kristoffer Dalby
75ca91b0f7
Merge pull request #380 from juanfont/update-contributors
...
docs(README): update contributors
2022-03-02 13:43:53 +00:00
github-actions[bot]
e208ccc982
docs(README): update contributors
2022-03-02 13:42:25 +00:00
Kristoffer Dalby
71a62697aa
Merge pull request #379 from juanfont/kradalby-patch-1
...
Second contributor attempt
2022-03-02 13:41:50 +00:00
Kristoffer Dalby
f9c0597875
Second contributor attempt
2022-03-02 13:40:37 +00:00
Kristoffer Dalby
aa3eb5171a
Merge pull request #344 from reynico/metrics-listen
2022-03-02 13:06:29 +00:00
Nico Rey
dcc46af8de
Changelog: add breaking change
2022-03-02 09:22:29 -03:00
Kristoffer Dalby
b61500670c
Merge branch 'main' into metrics-listen
2022-03-02 11:35:33 +00:00
Kristoffer Dalby
ccec534e19
Merge pull request #377 from juanfont/smarter-contribute-pipeline
2022-03-02 11:17:02 +00:00
Kristoffer Dalby
9b10457209
Merge branch 'main' into smarter-contribute-pipeline
2022-03-02 11:14:50 +00:00
Kristoffer Dalby
9a8f605cba
Merge pull request #371 from kradalby/use-specific-database-typess
2022-03-02 11:14:04 +00:00
Kristoffer Dalby
1246267ead
Merge branch 'main' into smarter-contribute-pipeline
2022-03-02 10:43:07 +00:00
Kristoffer Dalby
a0a56d43f8
Merge branch 'main' into use-specific-database-typess
2022-03-02 10:29:34 +00:00
Kristoffer Dalby
63d87110f6
Merge pull request #376 from e-zk/feat/command-aliases
2022-03-02 10:28:18 +00:00
Kristoffer Dalby
7c99d963e2
Merge branch 'main' into feat/command-aliases
2022-03-02 10:06:38 +00:00
zakaria
a614f158be
docs: update changelog
2022-03-02 19:53:07 +10:00
Kristoffer Dalby
2b6a5173da
Allow upstream delete continue on failure
2022-03-02 09:12:00 +00:00
Kristoffer Dalby
32ac690494
Update contributors.yml
2022-03-02 09:08:30 +00:00
Kristoffer Dalby
0835bffc3c
Update changelog
2022-03-02 08:15:21 +00:00
Kristoffer Dalby
c80e364f02
Remove always nil error
2022-03-02 08:15:14 +00:00
Kristoffer Dalby
5b169010be
Resolve merge conflict
2022-03-02 08:11:50 +00:00
Kristoffer Dalby
eeded85d9c
Merge pull request #366 from kradalby/registration-simplification
2022-03-02 08:02:26 +00:00
Kristoffer Dalby
e4d81bbb16
Merge branch 'main' into registration-simplification
2022-03-02 07:31:02 +00:00
Kristoffer Dalby
1f8c7f427b
Add comment
2022-03-02 07:29:56 +00:00
Kristoffer Dalby
ef422e6988
Protect against expiry nil
2022-03-02 07:29:56 +00:00
Kristoffer Dalby
ec4dc68524
Use correct machinekey format for oidc reg
2022-03-02 07:29:56 +00:00
Kristoffer Dalby
86ade72c19
Remove err check
2022-03-02 07:29:56 +00:00
Kristoffer Dalby
0c0653df8b
Merge pull request #375 from restanrm/fix-limitations-in-source-acls-rules
...
Fix limitations in source acls rules
2022-03-02 07:02:29 +00:00
zakaria
12b3b5f8f1
feat(aliases): add aliases for preauthkeys command
...
- `preauthkey`, `authkey`, `pre` are aliases for `preauthkey` command
- `ls`, `show` are aliases for `list` subcommand
- `c`, `new` are aliases for `create` subcommand
- `revoke`, `exp`, `e` are aliases for `expire` subcommand
2022-03-02 15:42:12 +10:00
zakaria
052dbfe440
feat(aliases): add aliases for apikeys command
...
- `apikey`, `api` are aliases for `apikeys` command
- `ls`, `show` are aliases for `list` subcommand
- `c`, `new` are aliases for `create` subcommand
- `revoke`, `exp`, `e` are aliases for the `expire` subcommand
2022-03-02 15:32:35 +10:00
zakaria
5310f8692b
feat(aliases): add aliases for namespaces command
...
- `namespace`, `ns`, `user`, `users` are aliases for `namespaces`
command
- `c`, `new` are aliases for the `create` subcommand
- `delete` is an alias for the `destroy` subcommand
- `mv` is an alias for the `rename` subcommand
- `ls`, `show` are aliases for the `list` subcommand
2022-03-02 14:35:20 +10:00
zakaria
aff6b84250
feat(aliases): add 'gen' alias for 'generate' command
2022-03-02 14:29:33 +10:00
zakaria
21eee912a3
feat(aliases): add aliases for nodes command
...
- `node`, `machine`, `machines` are aliases for `nodes` command
- `ls`, `show` aliases for `list` subcommand
- `logout`, `exp`, `e` are aliases for `expire` subcommand
- `del` is an alias for `delete` subcommand
2022-03-02 14:28:03 +10:00
zakaria
dbb2af0238
feat(aliases): add aliases for route command
...
- `r` is alias for `route` command
- `ls`, or `show` is alias for `list` subcommand
2022-03-02 14:27:56 +10:00
Adrien Raffin-Caboisse
77fe0b01f7
docs: update changelog
2022-03-01 22:50:22 +01:00
Adrien Raffin-Caboisse
361b4f7f4f
fix(machine): allow to use * in ACL sources
2022-03-01 22:48:21 +01:00
Kristoffer Dalby
dec4ee5f73
Merge pull request #373 from restanrm/feat-email-in-acls
2022-03-01 21:18:13 +00:00
Adrien Raffin-Caboisse
b2dca80e7a
docs: update changelog
2022-03-01 21:16:33 +01:00
Adrien Raffin-Caboisse
a455a874ad
feat(acls): normalize the group name
2022-03-01 21:10:52 +01:00
Kristoffer Dalby
49cd761bf6
Use new machine types in tests
2022-03-01 16:34:35 +00:00
Kristoffer Dalby
6477e6a583
Use new machine types
2022-03-01 16:34:24 +00:00
Kristoffer Dalby
8a95fe517a
Use specific types for all fields on machine (no datatypes.json)
...
This commit removes the need for datatypes.JSON and makes the code a bit
cleaner by allowing us to use proper types throughout the code when it
comes to hostinfo and other datatypes on the machine object.
This allows us to remove alot of unmarshal/marshal operations and remove
a lot of obsolete error checks.
This following commits will clean away a lot of untyped data and
uneccessary error checks.
2022-03-01 16:31:25 +00:00
Kristoffer Dalby
a9d4fa89dc
Merge branch 'main' into registration-simplification
2022-03-01 15:53:06 +01:00
Kristoffer Dalby
94c5474212
Merge pull request #369 from kradalby/update-dependencies
...
Update dependencies
2022-03-01 15:52:27 +01:00
Kristoffer Dalby
d34d617935
Merge branch 'main' into registration-simplification
2022-03-01 15:18:24 +01:00
Kristoffer Dalby
573008757d
Merge branch 'main' into update-dependencies
2022-03-01 15:16:56 +01:00
Kristoffer Dalby
4c74043f72
Merge pull request #359 from kradalby/yaml-acls
...
Add YAML support to ACLs
2022-03-01 15:16:37 +01:00
Kristoffer Dalby
0551b34de5
Merge branch 'main' into update-dependencies
2022-03-01 14:51:57 +01:00
Kristoffer Dalby
105812421e
Merge branch 'main' into yaml-acls
2022-03-01 14:49:37 +01:00
Kristoffer Dalby
4a9fd3a680
Merge pull request #368 from kradalby/apple-profile-fix
...
Fix apple profile issue being generated with escaped characters
2022-03-01 14:49:07 +01:00
Kristoffer Dalby
1cb39d914c
Update dependencies
2022-03-01 07:35:17 +00:00
Kristoffer Dalby
5157f356cb
Fix apple profile issue being generated with escaped characters
2022-03-01 07:30:35 +00:00
Kristoffer Dalby
7c63412df5
Remove todo
2022-02-28 23:02:41 +00:00
Kristoffer Dalby
82cb6b9ddc
Cleanup some unreachable code
2022-02-28 23:00:41 +00:00
Kristoffer Dalby
379017602c
Reformat and add db backup note
2022-02-28 22:50:35 +00:00
Kristoffer Dalby
8bef04d8df
Remove sorted todo
2022-02-28 22:45:42 +00:00
Kristoffer Dalby
5e92ddad43
Remove redundant caches
...
This commit removes the two extra caches (oidc, requested time) and uses
the new central registration cache instead. The requested time is
unified into the main machine object and the oidc key is just added to
the same cache, as a string with the state as a key instead of machine
key.
2022-02-28 22:42:30 +00:00
Kristoffer Dalby
e64bee778f
Regenerate proto
2022-02-28 22:21:14 +00:00
Kristoffer Dalby
5e1b12948e
Remove registered field from proto
2022-02-28 22:21:06 +00:00
Kristoffer Dalby
eea8e7ba6f
Update changelog
2022-02-28 22:11:31 +00:00
Kristoffer Dalby
78251ce8ec
Remove registrated field
...
This commit removes the field from the database and does a DB migration
**removing** all unregistered machines from headscale.
This means that from this version, all machines in the database is
considered registered.
2022-02-28 18:05:03 +00:00
Kristoffer Dalby
a8649d83c4
Remove all references to Machine.Registered from tests
2022-02-28 17:42:03 +00:00
Kristoffer Dalby
16b21e8158
Remove all references to Machine.Registered
2022-02-28 16:55:57 +00:00
Kristoffer Dalby
35616eb861
Fix oidc error were namespace isnt created #365
2022-02-28 16:41:28 +00:00
Kristoffer Dalby
e7bef56718
Remove reference to registered in integration test
2022-02-28 16:36:29 +00:00
Kristoffer Dalby
c6b87de959
Remove poorly aged test
2022-02-28 16:36:16 +00:00
Kristoffer Dalby
50053e616a
Ignore complexity linter
2022-02-28 16:35:08 +00:00
Kristoffer Dalby
54cc3c067f
Implement new machine register parameter
2022-02-28 16:34:50 +00:00
Kristoffer Dalby
402a76070f
Reuse machine structure for parameters, named parameters
2022-02-28 16:34:28 +00:00
Nico Rey
9a61725e9f
Metrics: Disable toggle. Set default port to 9090
2022-02-28 10:40:02 -03:00
Kristoffer Dalby
6126d6d9b5
Merge branch 'main' into metrics-listen
2022-02-28 14:24:25 +01:00
Kristoffer Dalby
469551bc5d
Register new machines needing callback in memory
...
This commit stores temporary registration data in cache, instead of
memory allowing us to only have actually registered machines in the
database.
2022-02-28 08:06:39 +00:00
Kristoffer Dalby
1caa6f5d69
Add todo for JSON datatype
2022-02-27 18:48:25 +01:00
Kristoffer Dalby
ecc26432fd
Fix excessive replace
2022-02-27 18:48:12 +01:00
Kristoffer Dalby
caffbd8956
Update cli registration with new method
2022-02-27 18:42:43 +01:00
Kristoffer Dalby
fd1e4a1dcd
Generalise registration for openid
2022-02-27 18:42:24 +01:00
Kristoffer Dalby
acb945841c
Generalise registration for pre auth keys
2022-02-27 18:42:15 +01:00
Kristoffer Dalby
c58ce6f60c
Generalise the registration method to DRY stuff up
2022-02-27 18:40:10 +01:00
Kristoffer Dalby
d6f6939c54
Update changelog
2022-02-27 09:08:29 +01:00
Kristoffer Dalby
e0b9a317f4
Add note to config example
2022-02-27 09:05:08 +01:00
Kristoffer Dalby
c159eb7541
Add basic test of yaml parsing
2022-02-27 09:04:59 +01:00
Kristoffer Dalby
8a3a0b6403
Add YAML support to ACLs
2022-02-27 09:04:48 +01:00
Kristoffer Dalby
67d6c8f946
Remove oversensitive tracing output
2022-02-27 09:04:27 +01:00
Nico Rey
06e6c29a5b
metrics: make metrics endpoint toggleable
2022-02-25 18:36:03 -03:00
Nico Rey
a9122c3de3
prometheus: replace default port by a port between the recommended prometheus range
2022-02-25 18:21:20 -03:00
Kristoffer Dalby
b1bd17f316
Merge pull request #350 from restanrm/feat-oidc-login-as-namespace
2022-02-25 13:22:26 +01:00
Adrien Raffin-Caboisse
b39faa124a
Merge remote-tracking branch 'origin/main' into feat-oidc-login-as-namespace
2022-02-25 11:28:17 +01:00
Kristoffer Dalby
8689a39c96
Merge pull request #357 from kradalby/make-namespace-to-users
...
Remove boundaries between Namespaces
2022-02-25 11:01:41 +01:00
Kristoffer Dalby
bae8ed3e70
Merge branch 'main' into make-namespace-to-users
2022-02-25 10:39:12 +01:00
Kristoffer Dalby
08c7076667
Merge pull request #346 from kradalby/integration-test-concurrent-join
...
Fix ip allocation bug, make integration tests faster
2022-02-25 10:37:35 +01:00
Kristoffer Dalby
91b50550ee
Update readme and glossary to reflect features and goals
2022-02-25 10:34:35 +01:00
Kristoffer Dalby
2c7064462a
Update changelog
2022-02-25 10:30:58 +01:00
Kristoffer Dalby
d9e7f37280
Uncomment previous test and update them for no boundries
2022-02-25 10:27:27 +01:00
Kristoffer Dalby
e03b3d558f
Remove boundries between namespaces
2022-02-25 10:26:34 +01:00
Kristoffer Dalby
2fd36dd254
Resolve merge
2022-02-25 09:08:15 +00:00
Kristoffer Dalby
381598663d
Merge pull request #347 from kradalby/remove-shared
...
Remove the concept of "shared nodes"
2022-02-25 10:06:58 +01:00
Kristoffer Dalby
6d699d3c29
Update changelog
2022-02-25 08:44:16 +00:00
Kristoffer Dalby
ebe59a5a27
Fix utils tests, use ipset datastructure
2022-02-25 08:28:22 +00:00
Nico
d55c79e75b
Merge branch 'main' into metrics-listen
2022-02-24 10:41:07 -03:00
Kristoffer Dalby
eda0a9f88a
Lock allocation of IP address
...
current logic is not safe as it will allow an IP that isnt persisted to
the DB to be given out multiple times if machines joins in quick
succession.
This adds a lock around the "get ip" and machine registration and save
to DB so we ensure thiis isnt happning.
Currently this had to be done three places, which is silly, and outlined
in #294 .
2022-02-24 13:18:18 +00:00
Adrien Raffin-Caboisse
47e8442d91
Update CHANGELOG.md
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-02-24 13:34:48 +01:00
Adrien Raffin-Caboisse
f9ce32fe1a
Update CHANGELOG.md
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-02-24 13:34:36 +01:00
Kristoffer Dalby
189e883f91
Resolve merge
2022-02-24 11:41:54 +00:00
Kristoffer Dalby
aa506503e2
Merge branch 'main' into feat-oidc-login-as-namespace
2022-02-24 11:40:34 +00:00
Kristoffer Dalby
9c2c09fce7
Merge branch 'main' into remove-shared
2022-02-24 11:39:44 +00:00
Kristoffer Dalby
5596a0acef
Merge pull request #297 from arch4ngel/configurable-mtls
...
Configurable mtls
2022-02-24 11:32:02 +00:00
Kristoffer Dalby
9687e6768d
Remove retry from integration tests
2022-02-24 11:29:53 +00:00
Kristoffer Dalby
fb85c78e8a
Fail integration tests fast
2022-02-24 11:28:34 +00:00
Kristoffer Dalby
d27f2bc538
Merge branch 'main' into metrics-listen
2022-02-24 11:16:57 +00:00
Kristoffer Dalby
8c33907655
Sort lint
2022-02-24 11:10:40 +00:00
Kristoffer Dalby
afb67b6e75
Merge branch 'main' into configurable-mtls
2022-02-24 11:09:05 +00:00
Kristoffer Dalby
69f220fe5c
Merge branch 'main' into feat-oidc-login-as-namespace
2022-02-24 11:01:32 +00:00
Kristoffer Dalby
c46dfd761c
Merge pull request #349 from kradalby/remove-cgo
2022-02-24 10:11:15 +00:00
Adrien Raffin-Caboisse
95453cba75
Merge branch 'main' into feat-oidc-login-as-namespace
2022-02-23 17:56:45 +01:00
Kristoffer Dalby
ed2175706c
Merge branch 'remove-cgo' of github.com:kradalby/headscale into remove-cgo
2022-02-23 16:23:53 +00:00
Kristoffer Dalby
686e45cf27
Set all anti-cgo options and add comment
2022-02-23 16:15:20 +00:00
Adrien Raffin-Caboisse
ae6a20e4d9
fix: add valid test identified by linter
2022-02-23 14:28:25 +01:00
Adrien Raffin-Caboisse
046116656b
chore: update formatting
2022-02-23 14:22:21 +01:00
Adrien Raffin-Caboisse
972bef1194
feat: add length error if hostname too long
2022-02-23 14:21:46 +01:00
Adrien Raffin-Caboisse
4f1f235a2e
feat: add strip_email_domain to normalization of namespace
2022-02-23 14:03:07 +01:00
Adrien Raffin-Caboisse
7e4709c13f
fix(namespace): remove name validation for destroy and get
2022-02-23 13:35:57 +01:00
Adrien Raffin-Caboisse
cef0a2b0b3
fix(namespaces_test): fix missing namespace name
2022-02-23 11:40:48 +01:00
Adrien Raffin-Caboisse
fcdbe7c510
fix(utils_test): fix namespace name
2022-02-23 11:38:20 +01:00
Adrien Raffin-Caboisse
995731a29c
fix(namespace): checknamespace name before actions
...
I keep the check server side because it's better from a security point of view.
2022-02-23 11:32:16 +01:00
Adrien Raffin-Caboisse
45727dbb21
feat(namespace): add check function for namespace
2022-02-23 11:32:14 +01:00
Kristoffer Dalby
f0a73632e0
Merge branch 'main' into remove-cgo
2022-02-23 09:01:38 +00:00
Kristoffer Dalby
823cc493f0
Merge branch 'main' into configurable-mtls
2022-02-23 07:29:31 +00:00
Juan Font
a86b33f1ff
Merge pull request #345 from juanfont/update-contributors
...
docs(README): update contributors
2022-02-22 23:46:54 +01:00
Juan Font
28c2bbeb27
Merge branch 'main' into update-contributors
2022-02-22 23:35:34 +01:00
github-actions[bot]
d4761da27c
docs(README): update contributors
2022-02-22 22:34:27 +00:00
Juan Font
b0c7ebeb7d
Merge pull request #351 from pernila/patch-1
...
Added FreeBSD to the supported clients
2022-02-22 23:33:58 +01:00
Juan Font
5f375d69b5
Merge branch 'main' into update-contributors
2022-02-22 23:32:02 +01:00
Juan Font
9eb705a4fb
Merge branch 'main' into patch-1
2022-02-22 23:31:29 +01:00
Juan Font
1b87396a8c
Merge pull request #333 from ohdearaugustin/topic/renovatebot
...
Topic/renovatebot
2022-02-22 23:30:46 +01:00
Juan Font
bb14bcd4d2
Merge branch 'main' into topic/renovatebot
2022-02-22 23:29:08 +01:00
pernila
48c866b058
Added FreeBSD to the supported clients
...
Added FreeBSD to the supported clients
Now in ports: https://www.freshports.org/security/headscale/
2022-02-22 23:06:35 +02:00
Adrien Raffin-Caboisse
fe0b43eaaf
chore: update changelog
2022-02-22 21:20:59 +01:00
Adrien Raffin-Caboisse
afd4a3706e
chore: update formating
2022-02-22 21:05:39 +01:00
Adrien Raffin-Caboisse
717250adb3
feat: removing matchmap from headscale
2022-02-22 20:58:08 +01:00
Kristoffer Dalby
67f5c32b49
Only allow one connection to sqlite
2022-02-22 19:04:52 +00:00
Adrien Raffin-Caboisse
0191ea93ff
feat(oidc): bind email to namespace
2022-02-22 19:59:15 +01:00
Adrien Raffin-Caboisse
92ffac625e
feat(namespace): add normalization function for namespace
2022-02-22 19:59:12 +01:00
Kristoffer Dalby
bfbcea35a0
Remove dependency on CGO
...
This commit changes the SQLite dependency to one that does not depend on
CGO. It uses a C-to-Go translated sqlite library that is Pure go.
2022-02-22 16:51:54 +00:00
Kristoffer Dalby
638a84adb9
Merge branch 'main' into integration-test-concurrent-join
2022-02-22 16:49:32 +00:00
Kristoffer Dalby
ec58979ce0
Merge branch 'main' into remove-shared
2022-02-22 16:48:14 +00:00
Kristoffer Dalby
7e6e093f17
Merge branch 'integration-test-concurrent-join' of github.com:kradalby/headscale into integration-test-concurrent-join
2022-02-22 16:19:28 +00:00
Kristoffer Dalby
4962335860
Remove dependency on CGO
...
This commit changes the SQLite dependency to one that does not depend on
CGO. It uses a C-to-Go translated sqlite library that is Pure go.
2022-02-22 16:18:25 +00:00
Kristoffer Dalby
a37339fa54
Merge pull request #348 from restanrm/remove-comment
...
fix(machine): remove comment
2022-02-22 14:06:12 +00:00
Kristoffer Dalby
f7eeb979fb
Add timeout
2022-02-22 13:46:59 +00:00
Adrien Raffin-Caboisse
f2f8d834e8
fix(machine): remove comment
...
After some more tests in tailscale I couldn't replicate the behavior
described in there.
When adding a rule, allowing A to talk to B the reverse connection was
instantly added to B to allow communication to B.
The previous assumption was probably wrong.
2022-02-22 11:26:21 +01:00
Kristoffer Dalby
fe2f75d13d
Allow integration test to retry
2022-02-22 07:40:56 +00:00
Kristoffer Dalby
52db6188df
Merge branch 'main' into update-contributors
2022-02-21 23:38:56 +00:00
Kristoffer Dalby
8dca40535f
Test if we can join headscale in parallell to speed up
2022-02-21 23:16:39 +00:00
Kristoffer Dalby
f4c302f1fb
Uncomment tests that will failed in transition period
2022-02-21 23:10:20 +00:00
Kristoffer Dalby
4ca8181dcb
Remove sharing from integration tests
2022-02-21 23:04:10 +00:00
Kristoffer Dalby
24a8e198a1
Remove sharing references across the code
2022-02-21 23:01:35 +00:00
Kristoffer Dalby
9411ec47c3
Remove sharing class and tests
2022-02-21 22:53:30 +00:00
Kristoffer Dalby
1e8f4dbdff
Drop shared node table
2022-02-21 22:52:55 +00:00
Kristoffer Dalby
9399754489
Remove protobuf share/unshare generated go
2022-02-21 22:48:27 +00:00
Kristoffer Dalby
9d1752acbc
Remove protobuf share/unshare
2022-02-21 22:48:14 +00:00
Kristoffer Dalby
6da2a19d10
Remove grpc share/unshare functions
2022-02-21 22:45:04 +00:00
Kristoffer Dalby
9ceac5c0fc
Remove CLI and tests for Shared node
2022-02-21 22:44:08 +00:00
Kristoffer Dalby
f562ad579a
Merge branch 'main' into configurable-mtls
2022-02-21 21:44:49 +00:00
github-actions[bot]
bbadeb567a
docs(README): update contributors
2022-02-21 21:41:48 +00:00
Kristoffer Dalby
69cdfbb56f
Merge pull request #320 from restanrm/feat-improve-acls-usage
...
Improvements on the ACLs and bug fixing
2022-02-21 21:41:15 +00:00
Adrien Raffin-Caboisse
d971f0f0e6
fix(acls_test): fix comment in go code
2022-02-21 21:48:05 +01:00
Adrien Raffin-Caboisse
650108c7c7
chore(fmt): apply fmt
2022-02-21 21:46:40 +01:00
Adrien Raffin-Caboisse
baae266db0
Update acls_test.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-02-21 20:25:41 +01:00
Adrien Raffin-Caboisse
50af44bc2f
fix: add error checking in acl and poll
...
If aclPolicy is not defined, in updateAclPolicy, return an error.
2022-02-21 20:06:31 +01:00
Nico Rey
e3bcc88880
Linter: make linter happy
2022-02-21 15:22:36 -03:00
Nico Rey
14e49885fb
metrics/kustomize: update Kustomize examples
2022-02-21 12:51:25 -03:00
Nico Rey
fbc1843889
metrics/tests: update tests
2022-02-21 12:51:05 -03:00
Nico Rey
45d5ab30ff
metrics/cfg: add a new entry for the Prometheus listen address
2022-02-21 12:50:44 -03:00
Nico Rey
d5fd7a5c00
metrics: add a new router and listener for Prometheus' metrics endpoint
2022-02-21 12:50:15 -03:00
Justin Angel
b5a59d4e7a
updating changelog and docs
2022-02-21 10:20:11 -05:00
Adrien Raffin-Caboisse
211fe4034a
chore(linter): ignore tt var as it's generated code (vscode)
2022-02-21 16:10:20 +01:00
Justin Angel
daa75da277
Linting and updating tests
2022-02-21 10:09:23 -05:00
Adrien Raffin-Caboisse
25550f8866
chore(format): run prettier on repo
2022-02-21 16:06:20 +01:00
Adrien Raffin-Caboisse
4bbe0051f6
chore(machines): apply lint
2022-02-21 10:02:59 +01:00
Adrien Raffin-Caboisse
5ab62378ae
tests(machines): test all combinations of peer filtering
2022-02-21 09:58:19 +01:00
Adrien Raffin-Caboisse
f006860136
feat(machines): untie dependency with class for filter func
...
The dependency to the `headscale` struct makes tests harder to do.
This change allow to easily add some tests for this quite sensible function.
2022-02-21 09:58:19 +01:00
Adrien Raffin-Caboisse
9c6ce02554
fix(machines): use ListAllMachines function
...
added a simple filter to remove the current node
2022-02-21 09:58:19 +01:00
Adrien Raffin-Caboisse
960412a335
fix(machines): simplify complex if check
...
This should fix the performance issue with computation of `dst` variable. It's also easier to read now.
2022-02-21 09:58:19 +01:00
Kristoffer Dalby
ecb3ee6bfa
Merge branch 'main' into feat-improve-acls-usage
2022-02-21 08:51:21 +00:00
Adrien Raffin-Caboisse
5242025ab3
fix(machines): renaming following review comments
2022-02-20 23:50:08 +01:00
Adrien Raffin-Caboisse
b3d0fb7a93
fix(machine): revert modifications
...
Using h.ListAllMachines also listed the current machine in the result. It's unnecessary (I don't know if it's harmful).
Breaking the check with the `matchSourceAndDestinationWithRule` broke the tests. We have a specificity with the '*' destination that isn't symetrical.
I need to think of a better way to do this. It too hard to read.
2022-02-20 23:47:04 +01:00
Adrien Raffin-Caboisse
5e167cc00a
fix(tests): fix naming issues related to code review
2022-02-20 23:00:31 +01:00
Adrien Raffin-Caboisse
d00251c63e
fix(acls,machines): apply code review suggestions
2022-02-20 21:26:20 +01:00
Adrien Raffin-Caboisse
4f9ece14c5
Apply suggestions from code review on changelog
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no >
2022-02-20 20:47:12 +01:00
Kristoffer Dalby
7bf2a91dd0
Merge branch 'main' into configurable-mtls
2022-02-20 14:33:23 +00:00
Justin Angel
385dd9cc34
refactoring
2022-02-20 09:06:14 -05:00
Kristoffer Dalby
602291df61
Merge pull request #338 from juanfont/update-contributors
2022-02-19 23:13:08 +00:00
github-actions[bot]
5245f1accc
docs(README): update contributors
2022-02-19 22:48:26 +00:00
Kristoffer Dalby
91babb5130
Merge pull request #336 from ohdearaugustin/topic/fix-contributors-action
2022-02-19 21:08:53 +00:00
ohdearaugustin
8798efd353
contributor: set specific version
2022-02-19 21:36:08 +01:00
Kristoffer Dalby
66a12004e7
Merge branch 'main' into topic/renovatebot
2022-02-19 19:34:30 +00:00
Kristoffer Dalby
74621e2750
Merge pull request #332 from e-zk/main
...
Fix spelling error
2022-02-19 19:34:24 +00:00
Kristoffer Dalby
74c3c6bb60
Merge branch 'main' into main
2022-02-19 19:32:34 +00:00
Kristoffer Dalby
84b98e716a
Merge pull request #334 from ohdearaugustin/topic/renovatebot-codeowner
...
CODEOWNER: add renovate config ohdearaugustin
2022-02-19 19:32:21 +00:00
ohdearaugustin
e9f13b6031
CODEOWNER: add renovate config ohdearaugustin
2022-02-19 20:28:08 +01:00
ohdearaugustin
fe6d47030f
renovatebot: configure
2022-02-19 20:15:53 +01:00
ohdearaugustin
a19550adbf
prettier: renovatebot.yml
2022-02-19 19:49:12 +01:00
ohdearaugustin
3db88d27de
github/workflows: init renovatebot
2022-02-19 19:49:12 +01:00
e-zk
a6b7bc5939
Fix spelling error
2022-02-20 03:14:51 +10:00
Kristoffer Dalby
397b6fc4bf
Merge branch 'main' into docs-acl-modifications
2022-02-18 20:13:10 +00:00
Kristoffer Dalby
7d5e6d3f0f
Merge pull request #330 from kradalby/codeowners
...
Add ohdearaugustin to CODEOWNERS for config and docs
2022-02-18 20:12:29 +00:00
Kristoffer Dalby
7a90c2fba1
Merge branch 'main' into codeowners
2022-02-18 20:11:33 +00:00
Kristoffer Dalby
5cf215a44b
Merge pull request #325 from juanfont/kradalby-patch-4
...
Update changelog for 0.13.0
2022-02-18 20:11:03 +00:00
Kristoffer Dalby
7916fa8b45
Add ohdearaugustin to CODEOWNERS for config and docs
2022-02-18 19:57:03 +00:00
Kristoffer Dalby
5fbef07627
Update changelog for 0.13.0
2022-02-18 18:54:27 +00:00
Kristoffer Dalby
21df798f07
Merge branch 'main' into feat-improve-acls-usage
2022-02-18 17:19:19 +00:00
Kristoffer Dalby
67bb1fc9dd
Merge pull request #324 from m-tanner-dev0/patch-1
2022-02-18 07:18:22 +00:00
Tanner
61bfa79be2
Update README.md
...
change flippant language
2022-02-17 17:55:40 -08:00
Adrien Raffin-Caboisse
f073d8f43c
chore(lint): ignore linting on test_expandalias
...
This is a false positive on the way the function is built.
Small tests cases are all inside this functions, making it big.
2022-02-17 09:32:55 +01:00
Adrien Raffin-Caboisse
5f642eef76
chore(lint): more lint fixing
2022-02-17 09:32:54 +01:00
Adrien Raffin-Caboisse
d8c4c3163b
chore(fmt): apply make fmt command
2022-02-17 09:32:54 +01:00
Adrien Raffin-Caboisse
9cedbbafd4
chore(all): update some files for linter
2022-02-17 09:32:51 +01:00
Adrien Raffin-Caboisse
aceaba60f1
docs(changelog): bump changelog
2022-02-17 09:30:09 +01:00
Adrien Raffin-Caboisse
7b5ba9f781
docs(acl): add configuration example to explain acls
2022-02-17 09:30:09 +01:00
Adrien Raffin
de59946447
feat(acls): rewrite functions to be testable
...
Rewrite some function to get rid of the dependency on Headscale object. This allows us
to write succinct test that are more easy to review and implement.
The improvements of the tests allowed to write the removal of the tagged hosts
from the namespace as specified here: https://tailscale.com/kb/1068/acl-tags/
2022-02-17 09:30:09 +01:00
Adrien Raffin
97eac3b938
feat(acl): update frequently the aclRules
...
This call should be done quite at each modification of a server resources like RequestTags.
When a server changes it's tag we should rebuild the ACL rules.
When a server is added to headscale we also should update the ACLRules.
2022-02-17 09:30:08 +01:00
Adrien Raffin
fb45138fc1
feat(acls): check acl owners and add bunch of tests
2022-02-17 09:30:08 +01:00
Adrien Raffin
e9949b4c70
feat(acls): simplify updating rules
2022-02-17 09:30:08 +01:00
Adrien Raffin
e482dfeed4
feat(machine): add ACLFilter if ACL's are enabled.
...
This commit change the default behaviour and remove the notion of namespaces between the hosts. It allows all namespaces to be only filtered by the ACLs. This behavior is closer to tailsnet.
2022-02-17 09:30:05 +01:00
Jamie Greeff
9b7d657cbe
Return all peers instead of peers in same namespace
2022-02-17 09:27:59 +01:00
Adrien Raffin-Caboisse
55d746d3f5
docs(acls-proposal): wording comment
...
A hidden thing was implied in this document is that each person should have his own namespace.
Hidden information in spicification isn't good.
Thank's @kradalby for pointing it out.
2022-02-16 09:16:25 +01:00
Adrien Raffin-Caboisse
c364c2a382
chore(acl-proposals): apply prettier
2022-02-15 09:53:22 +01:00
Adrien Raffin-Caboisse
e540679dbd
docs(acl-proposals): integrate comments
2022-02-15 09:52:05 +01:00
Adrien Raffin-Caboisse
86b329d8bf
chore(docs): create proposals directory
2022-02-15 09:27:33 +01:00
Adrien Raffin-Caboisse
7bdd7748e4
fix(acl): add missing internal namespace communications
2022-02-10 12:03:03 +01:00
Adrien Raffin-Caboisse
0426212348
docs(acls): add example use case
2022-02-10 10:42:26 +01:00
Adrien Raffin-Caboisse
85cf443ac6
docs(acls): Issues with ACL and proposition
2022-02-08 16:59:35 +01:00
Justin Angel
1b2fff4337
Merge branch 'main' into configurable-mtls
2022-02-02 11:54:49 -05:00
Justin Angel
af25aa75d9
Merge branch 'configurable-mtls' of github.com:arch4ngel/headscale into configurable-mtls
2022-01-31 10:27:57 -05:00
Justin Angel
da5250ea32
linting again
2022-01-31 10:27:43 -05:00
Kristoffer Dalby
168b1bd579
Merge branch 'main' into configurable-mtls
2022-01-31 12:28:00 +00:00
Justin Angel
9de5c7f8b8
updating default
2022-01-31 07:22:17 -05:00
Justin Angel
52db80ab0d
Merge branch 'configurable-mtls' of github.com:arch4ngel/headscale into configurable-mtls
2022-01-31 07:19:14 -05:00
Justin Angel
0c3fd16113
refining and adding tests
2022-01-31 07:18:50 -05:00
Justin Angel
310e7b15c7
making alternatives constants
2022-01-30 10:46:57 -05:00
Justin Angel
d44b2a7c01
adding default for tls_client_auth_mode
2022-01-30 07:26:28 -05:00
Kristoffer Dalby
0609c97459
Merge branch 'main' into configurable-mtls
2022-01-29 20:15:58 +00:00
Justin Angel
c98a559b4d
linting/formatting
2022-01-29 14:15:33 -05:00
Justin Angel
5935b13b67
refining
2022-01-29 13:35:08 -05:00
Justin Angel
9e619fc020
Making client authentication mode configurable
2022-01-29 12:59:31 -05:00