update to headscale-0.18.0, from Laurent Cheylus (maintainer)

This commit is contained in:
sthen 2023-01-23 10:11:09 +00:00
parent 8d2983215d
commit 3b485d39ed
5 changed files with 1872 additions and 2079 deletions

View File

@ -1,13 +1,11 @@
ONLY_FOR_ARCHS = amd64
# this depends on modernc.org/libc; as of v1.16.8 it only has code to
# support amd64 on OpenBSD.
#
# recheck when updating; 1.17 adds arm64 and 1.20 adds i386
ONLY_FOR_ARCHS = amd64 i386 arm64
# this depends on modernc.org/libc; version v1.21.5 supports amd64, i386 and
# arm64 only on OpenBSD.
COMMENT = open source implementation of the Tailscale control server
MODGO_MODNAME = github.com/juanfont/headscale
MODGO_VERSION = v0.16.4
MODGO_VERSION = v0.18.0
DISTNAME = headscale-${MODGO_VERSION}
@ -23,12 +21,11 @@ PERMIT_PACKAGE = Yes
WANTLIB += c pthread
MODULES = lang/go
MODGO_LDFLAGS += -X ${MODGO_MODNAME}/cmd/headscale/cli.Version=${MODGO_VERSION}
MODGO_LDFLAGS += -X ${MODGO_MODNAME}/cmd/headscale/cli.Version=$\
${MODGO_VERSION:S/v//}
WRKDIST = ${WRKSRC}
SUBST_VARS += VARBASE
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/headscale
${INSTALL_DATA} ${WRKSRC}/derp-example.yaml ${PREFIX}/share/examples/headscale/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,25 @@
Index: config-example.yaml
--- config-example.yaml.orig
+++ config-example.yaml
@@ -14,7 +14,7 @@ server_url: http://127.0.0.1:8080
# Address to listen to / bind to on the server
@@ -46,7 +46,7 @@ grpc_allow_insecure: false
#
-listen_addr: 0.0.0.0:8080
+listen_addr: 127.0.0.1:8080
# Address to listen to /metrics, you may want
# to keep this endpoint private to your internal
@@ -39,7 +39,7 @@ grpc_allow_insecure: false
# and Tailscale clients.
# The private key file which will be
# autogenerated if it's missing
-private_key_path: /var/lib/headscale/private.key
# For production:
# /var/lib/headscale/private.key
-private_key_path: ./private.key
+private_key_path: ${SYSCONFDIR}/headscale/private.key
# The Noise section includes specific configuration for the
# TS2021 Noise protocol
@@ -58,7 +58,7 @@ noise:
#
# For production:
# private_key_path: /var/lib/headscale/noise_private.key
- private_key_path: ./noise_private.key
+ private_key_path: ${SYSCONFDIR}/headscale/noise_private.key
# List of IP prefixes to allocate tailaddresses from.
# Each prefix consists of either an IPv4 or IPv6 address,
@@ -87,7 +87,8 @@ derp:
@@ -111,7 +111,8 @@ derp:
#
# paths:
# - /etc/headscale/derp-example.yaml
@ -29,21 +29,30 @@ Index: config-example.yaml
# If enabled, a worker will be set up to periodically
# refresh the given sources and update the derpmap
@@ -111,7 +112,7 @@ node_update_check_interval: 10s
@@ -138,7 +139,7 @@ db_type: sqlite3
# SQLite config
db_type: sqlite3
-db_path: /var/lib/headscale/db.sqlite
+db_path: ${VARBASE}/headscale/db.sqlite
# For production:
# db_path: /var/lib/headscale/db.sqlite
-db_path: ./db.sqlite
+db_path: ${LOCALSTATEDIR}/db/headscale/db.sqlite
# # Postgres config
# If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank.
@@ -148,7 +149,7 @@ tls_client_auth_mode: relaxed
# Path to store certificates and metadata needed by
@@ -173,7 +174,7 @@ tls_letsencrypt_hostname: ""
# letsencrypt
-tls_letsencrypt_cache_dir: /var/lib/headscale/cache
+tls_letsencrypt_cache_dir: "${VARBASE}/headscale/.cache"
# For production:
# tls_letsencrypt_cache_dir: /var/lib/headscale/cache
-tls_letsencrypt_cache_dir: ./cache
+tls_letsencrypt_cache_dir: ${LOCALSTATEDIR}/db/headscale/cache
# Type of ACME challenge to use, currently supported types:
# HTTP-01 or TLS-ALPN-01
@@ -264,7 +265,7 @@ dns_config:
# Unix socket used for the CLI to connect without authentication
# Note: for production you will want to set this to something like:
# unix_socket: /var/run/headscale.sock
-unix_socket: ./headscale.sock
+unix_socket: ${LOCALSTATEDIR}/run/headscale.sock
unix_socket_permission: "0770"
#
# headscale supports experimental OpenID connect support,

View File

@ -1,11 +1,11 @@
@newgroup _headscale:869
@newuser _headscale:869:_headscale::headscale user:/nonexistent:/sbin/nologin
@newuser _headscale:869:_headscale::headscale user:${LOCALSTATEDIR}/db/headscale:/sbin/nologin
@rcscript ${RCDIR}/headscale
@mode 770
@group _headscale
@sample ${SYSCONFDIR}/headscale/
@owner _headscale
@sample ${VARBASE}/headscale/
@sample ${LOCALSTATEDIR}/db/headscale/
@mode
@owner
@group