Commit graph

296 commits

Author SHA1 Message Date
Juan Font Alonso 744c687d37 Fixed linting issues 2021-05-06 01:01:45 +02:00
Juan Font Alonso e17e10e0b7 Preauth keys kinda working 2021-05-06 00:59:26 +02:00
Juan Font Alonso 9ce8dc3fb6 Preload the namespace 2021-05-06 00:59:16 +02:00
Juan Font Alonso 3110dd1575 Added fields in Machine to store authkey + validation tests 2021-05-06 00:08:36 +02:00
Juan Font Alonso 486faa9656 WIP Working on authkeys + tests 2021-05-05 23:00:04 +02:00
Juan Font 03bb32083b
Merge pull request #20 from cure/preauthkeys_improvements
Preauthkeys improvements
2021-05-03 22:56:18 +02:00
Juan Font 13f809be87
Merge pull request #19 from juanfont/node-cmd-improve
List nodes in namespace + register under node command
2021-05-02 23:04:46 +02:00
Ward Vandewege b34e90c45d Fix bug in preauthkeys: namespace object was not populated in the return
value from CreatePreAuthKey and GetPreAuthKeys. Add tests for that bug,
and the rest of the preauthkeys functionality.

Fix path in `compress` Makefile target.
2021-05-02 14:58:05 -04:00
Juan Font Alonso 45e9001787 Register cmd under node 2021-05-01 20:05:10 +02:00
Juan Font Alonso c71c13366f Minor fix 2021-05-01 20:04:03 +02:00
Juan Font Alonso 404fee8361 Added list node functionality 2021-05-01 20:00:25 +02:00
Juan Font 8198d2f8ed
Merge pull request #18 from cure/add-actions
Add a basic CI workflow with github actions
2021-04-30 10:45:11 +02:00
Juan Font Alonso 68c21faf64 Check persistnt flag errors 2021-04-30 09:55:39 +02:00
Juan Font 3532eafd8c
Merge pull request #17 from juanfont/namespace-flag
Namespace is now a flag for all the commands
2021-04-30 09:55:17 +02:00
Juan Font Alonso 5648337e68 Removed trailing space 2021-04-30 09:53:44 +02:00
Ward Vandewege 491fb0adb3 Fix a few linter errors. 2021-04-29 21:14:50 -04:00
Ward Vandewege 283ca3b6f8 Add ci workflow. 2021-04-29 21:14:50 -04:00
Juan Font Alonso b83318bfb3 Namespace is now a flag for all the commands 2021-04-30 00:23:26 +02:00
Juan Font 51139afa50
Merge pull request #16 from juanfont/cmd-funcs-to-cli
Reorganise the CLI structure
2021-04-29 09:49:23 +02:00
Juan Font Alonso 7646bd8fd4 CLI stuff should be in the cmd/ path 2021-04-28 16:55:29 +02:00
Juan Font Alonso 77e5255fdd Move the CLI functiontionality to the CLI package 2021-04-28 16:15:45 +02:00
Juan Font 8f67bdba8c
Merge pull request #15 from cure/add-first-tests
Add first tests
2021-04-27 23:53:27 +02:00
Ward Vandewege f5010fd75b Add test for our config validation rules. 2021-04-26 20:30:06 -04:00
Ward Vandewege 37601f6b4d Add a very simple test. 2021-04-26 19:22:28 -04:00
Juan Font 031c91a545
Merge pull request #13 from cure/add-Makefile
Add a Makefile with a few targets.
2021-04-25 22:40:34 +02:00
Ward Vandewege 6aedc1111b Add a Makefile with a few targets. The default is 'build'. The build
target calls the new version-at-commit.sh script which will
automatically populate the version variable inside the Headscale binary.

Once we start tagging releases on the git tree, that will come in handy.

The Makefile also has a 'test' target (does nothing yet, no tests yet)
and a 'dev' target, which runs linters, tests, and finally builds.
2021-04-25 10:31:52 -04:00
Juan Font 6fa84004b3
Merge pull request #11 from xpzouying/zy/fix-remove-dup-close-db
fix: remove db twice
2021-04-25 00:35:46 +02:00
Juan Font 1bc4294241
Merge pull request #10 from cure/linter-warnings
Linter warnings
2021-04-25 00:29:18 +02:00
Juan Font c07f192dc4
Merge pull request #12 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2021-04-25 00:16:44 +02:00
The Gitter Badger 8c218189b0 Add Gitter badge 2021-04-24 21:26:38 +00:00
zy 07a9f95aeb fix: remove db twice
* fix: remove db twice.
* better for new error, use errors.New.
* Error strings should not be capitalized or end with punctuation.
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
2021-04-25 00:29:40 +08:00
Ward Vandewege f7c7b4873a Address a bunch of golangci-lint warnings. 2021-04-24 11:41:29 -04:00
Ward Vandewege f7b6c68d22 Address a bunch of golint warnings. 2021-04-24 11:26:50 -04:00
Juan Font d30b682a6e
Merge pull request #9 from cure/add-tls-autocert
Add support for TLS to the web service.
2021-04-24 11:28:31 +02:00
Ward Vandewege 426b4fd98a Add support for automatic TLS certificates via Let's Encrypt. Add a
configuration reference to the README.md file.
2021-04-23 22:55:01 -04:00
Ward Vandewege 1b30874cf8 Check for errors from the Serve() function. 2021-04-23 17:18:14 -04:00
Ward Vandewege 252c68c50a Add HTTPS support for the web endpoint with manually configured
certificate/key files.
2021-04-23 17:18:00 -04:00
Ward Vandewege c5a3d0b01c In absPath, skip empty paths. 2021-04-23 16:42:27 -04:00
Juan Font 328f6ea455
Merge pull request #8 from cure/relative-paths-in-config
Handle relative paths in private_key_path and derp_map_path
2021-04-23 09:40:52 +02:00
Ward Vandewege 683b151f19 If the configuration file contains relative paths (e.g. in the values
for private_key_path or derp_map_path), interpret them as relative to
the directory where the config.json file was read from.
2021-04-22 21:10:50 -04:00
Juan Font Alonso 9c40e829ec Create preauthkeys kinda working (not usable yet) 2021-04-23 00:40:42 +02:00
Juan Font Alonso 176eea4a84 WIP on PreAuthKeys 2021-04-23 00:25:01 +02:00
Juan Font Alonso 2555220a57 Merge branch 'main' of https://github.com/juanfont/headscale into main 2021-04-22 23:58:18 +02:00
Juan Font Alonso 3743f08c1f Minor fix on already defer db close 2021-04-22 23:55:07 +02:00
Juan Font 481a9a01f6
Merge pull request #6 from cure/add-standard-config-locations
Add additional locations to look for the config.json file
2021-04-22 00:52:06 +02:00
Ward Vandewege a71387f9d2 Add additional locations to look for the config.json file:
/etc/headscale and $HOME/.headscale
2021-04-21 17:33:09 -04:00
Juan Font Alonso eac85a31ed Merge branch 'main' of https://github.com/juanfont/headscale into main 2021-04-08 23:58:00 +02:00
Juan Font Alonso c284f3eefa Bump mod 2021-04-08 23:57:47 +02:00
Juan Font Alonso 541d676b98 Minor code reorg 2021-04-08 23:57:31 +02:00
Juan Font bdccd85533 Minor readme fixes 2021-03-18 23:02:36 +00:00