Merge branch 'main' into changelog

This commit is contained in:
Kristoffer Dalby 2021-12-07 13:21:17 +00:00 committed by GitHub
commit f60f62792a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 114 additions and 4 deletions

28
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: "Bug report"
about: "Create a bug report to help us improve"
title: ""
labels: ["bug"]
assignees: ""
---
**Bug description**
<!-- A clear and concise description of what the bug is. Describe the expected bahavior
and how it is currently different. If you are unsure if it is a bug, consider discussing
it on our Discord server first. -->
**To Reproduce**
<!-- Steps to reproduce the behavior. -->
**Context info**
<!-- Please add relevant information about your system. For example:
- Version of headscale used
- Version of tailscale client
- OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version
- Kernel version
- The relevant config parameters you used
- Log output
-->

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Issues must have some content
blank_issues_enabled: false
# Contact links
contact_links:
- name: "headscale usage documentation"
url: "https://github.com/juanfont/headscale/blob/main/docs"
about: "Find documentation about how to configure and run headscale."
- name: "headscale Discord community"
url: "https://discord.com/invite/XcQxk2VHjx"
about: "Please ask and answer questions about usage of headscale here."

View File

@ -0,0 +1,15 @@
---
name: "Feature request"
about: "Suggest an idea for headscale"
title: ""
labels: ["enhancement"]
assignees: ""
---
**Feature request**
<!-- A clear and precise description of what new or changed feature you want. -->
<!-- Please include the reason, why you would need the feature. E.g. what problem
does it solve? Or which workflow is currently frustrating and will be improved by
this? -->

28
.github/ISSUE_TEMPLATE/other_issue.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: "Other issue"
about: "Report a different issue"
title: ""
labels: ["bug"]
assignees: ""
---
<!-- If you have a question, please consider using our Discord for asking questions -->
**Issue description**
<!-- Please add your issue description. -->
**To Reproduce**
<!-- Steps to reproduce the behavior. -->
**Context info**
<!-- Please add relevant information about your system. For example:
- Version of headscale used
- Version of tailscale client
- OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version
- Kernel version
- The relevant config parameters you used
- Log output
-->

10
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,10 @@
<!-- Please tick if the following things apply. You… -->
- [] read the [CONTRIBUTING guidelines](README.md#user-content-contributing)
- [] raised a GitHub issue or discussed it on the projects chat beforehand
- [] added unit tests
- [] added integration tests
- [] updated documentation if needed
- [] updated CHANGELOG.md
<!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. -->

View File

@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
- name: Install dependencies
run: |

2
.gitignore vendored
View File

@ -17,6 +17,8 @@
/headscale
config.json
config.yaml
derp.yaml
*.hujson
*.key
/db.sqlite
*.sqlite3

View File

@ -34,6 +34,11 @@ const (
// LoadACLPolicy loads the ACL policy from the specify path, and generates the ACL rules.
func (h *Headscale) LoadACLPolicy(path string) error {
log.Debug().
Str("func", "LoadACLPolicy").
Str("path", path).
Msg("Loading ACL policy from path")
policyFile, err := os.Open(path)
if err != nil {
return err
@ -67,6 +72,8 @@ func (h *Headscale) LoadACLPolicy(path string) error {
}
h.aclRules = rules
log.Trace().Interface("ACL", rules).Msg("ACL rules generated")
return nil
}

6
app.go
View File

@ -418,12 +418,12 @@ func (h *Headscale) Serve() error {
err = h.ensureUnixSocketIsAbsent()
if err != nil {
panic(err)
return fmt.Errorf("unable to remove old socket file: %w", err)
}
socketListener, err := net.Listen("unix", h.cfg.UnixSocket)
if err != nil {
panic(err)
return fmt.Errorf("failed to set up gRPC socket: %w", err)
}
// Handle common process-killing signals so we can gracefully shut down:
@ -441,7 +441,7 @@ func (h *Headscale) Serve() error {
networkListener, err := net.Listen("tcp", h.cfg.Addr)
if err != nil {
panic(err)
return fmt.Errorf("failed to bind to TCP address: %w", err)
}
// Create the cmux object that will multiplex 2 protocols on the same port.

View File

@ -54,6 +54,8 @@ tls_letsencrypt_challenge_type: HTTP-01
tls_cert_path: ""
tls_key_path: ""
log_level: info
# Path to a file containg ACL policies.
acl_policy_path: ""

7
docs/README.md Normal file
View File

@ -0,0 +1,7 @@
# Official headscale documentation
- [Configuration](Configuration.md)
- [Running](Running.md)
- [DNS](DNS.md)
- [TLS](TLS.md)
- [Glossary](Glossary.md)