-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
87 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
permissions: | ||
contents: write | ||
|
||
name: release | ||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
- '!v*.*.*-**' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Unshallow clone | ||
run: git fetch --prune --unshallow | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.22.x' | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
args: release --clean --skip=validate | ||
version: latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
#!/bin/sh | ||
getent group xdpderper >/dev/null || groupadd -r xdpderper | ||
getent passwd xdpderper >/dev/null || useradd -r -g xdpderper -s /bin/bash -c "XDPDERP server" xdpderper | ||
getent group derper >/dev/null || groupadd -r derper | ||
getent passwd derper >/dev/null || useradd -r -g derper -s /bin/bash -c "DERP server" derper | ||
|
||
mkdir /etc/derper | ||
chown -R derper:derper /etc/derper | ||
# Detect the correct configuration directory | ||
if [ -f /etc/os-release ]; then | ||
. /etc/os-release | ||
case "$ID" in | ||
rhel|centos|fedora|rocky|almalinux) | ||
CONFIG_DIR="/etc/sysconfig" | ||
;; | ||
debian|ubuntu) | ||
CONFIG_DIR="/etc/default" | ||
;; | ||
*) | ||
echo "Unknown OS. Defaulting to /etc/default" | ||
CONFIG_DIR="/etc/default" | ||
;; | ||
esac | ||
else | ||
# Fallback if /etc/os-release is not available | ||
if [ -d /etc/sysconfig ]; then | ||
CONFIG_DIR="/etc/sysconfig" | ||
else | ||
CONFIG_DIR="/etc/default" | ||
fi | ||
fi | ||
|
||
# Create necessary directories | ||
mkdir -p /etc/derper | ||
mkdir -p /var/cache/derper/certs | ||
mkdir -p /var/lib/derper | ||
|
||
# Create a configuration file if it doesn't exist | ||
if [ ! -f "$CONFIG_DIR/derper" ]; then | ||
echo "# Configuration file for DERP server" > "$CONFIG_DIR/derper" | ||
echo "HOSTNAME=your-default-hostname.example.com" >> "$CONFIG_DIR/derper" | ||
echo "Configuration file created at $CONFIG_DIR/derper" | ||
else | ||
echo "Configuration file already exists at $CONFIG_DIR/derper" | ||
fi | ||
|
Submodule tailscale
updated
7 files
+0 −1 | Makefile | |
+26 −251 | ssh/tailssh/tailssh.go | |
+2 −86 | ssh/tailssh/tailssh_test.go | |
+8 −10 | tailcfg/tailcfg.go | |
+6 −6 | tailcfg/tailcfg_clone.go | |
+12 −10 | tailcfg/tailcfg_view.go | |
+9 −9 | util/dnsname/dnsname.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
cd tailscale | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
echo "Latest upstream tag: $latest_tag" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
[Unit] | ||
Description=Tailscale XDPDERP Server | ||
After=network.target | ||
StartLimitIntervalSec=0 | ||
StartLimitBurst=0 | ||
|
||
[Service] | ||
Type=simple | ||
User=xdpderper | ||
Group=xdpderper | ||
ExecStart=/usr/bin/xdpderper | ||
ExecStart=xdpderper --dst-port=3478 --mode=xdpdrv | ||
Restart=on-failure | ||
RestartSec=5 | ||
LimitNOFILE=1048576 | ||
|
||
# Hardening measures | ||
PrivateTmp=yes | ||
ProtectSystem=full | ||
NoNewPrivileges=yes | ||
ProtectHome=yes | ||
ProtectKernelTunables=yes | ||
ProtectKernelModules=yes | ||
ProtectControlGroups=yes | ||
LimitNOFILE=990000 | ||
AmbientCapabilities=CAP_NET_BIND_SERVICE | ||
User=0 | ||
Group=0 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |