Add tailscale support
This commit is contained in:
parent
13edf87a4e
commit
38166183dc
8 changed files with 76 additions and 4 deletions
|
@ -50,7 +50,7 @@ PKG_MULTIMEDIA="ffmpeg mpv vlc"
|
|||
PKG_GAMESUPPORT="sixaxis jslisten evtest rg351p-js2xbox gptokeyb textviewer 351files jstest-sdl \
|
||||
gamecontrollerdb jelosaddons libgo2 rclone sdljoytest"
|
||||
|
||||
PKG_EXPERIMENTAL=""
|
||||
PKG_EXPERIMENTAL="tailscale"
|
||||
|
||||
### Project/Device specific items
|
||||
if [ "${PROJECT}" == "Rockchip" ]
|
||||
|
|
11
packages/jelos/sources/autostart/common/097-tailscale
Normal file
11
packages/jelos/sources/autostart/common/097-tailscale
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present kkoshelev (https://github.com/kkoshelev)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ "$(get_setting tailscale.up)" == "1" ]
|
||||
then
|
||||
set_setting tailscale.up 0
|
||||
nohup tailscale down &
|
||||
fi
|
8
packages/network/tailscale/config/tailscaled.defaults
Normal file
8
packages/network/tailscale/config/tailscaled.defaults
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Set the port to listen on for incoming VPN packets.
|
||||
# Remote nodes will automatically be informed about the new port number,
|
||||
# but you might want to configure this in order to set external firewall
|
||||
# settings.
|
||||
PORT="41641"
|
||||
|
||||
# Extra flags you might want to pass to tailscaled.
|
||||
FLAGS=""
|
29
packages/network/tailscale/package.mk
Normal file
29
packages/network/tailscale/package.mk
Normal file
|
@ -0,0 +1,29 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2022-present kkoshelev (https://github.com/kkoshelev)
|
||||
|
||||
PKG_NAME="tailscale"
|
||||
PKG_VERSION="1.26.1"
|
||||
PKG_ARCH="aarch64"
|
||||
PKG_SITE="https://tailscale.com/"
|
||||
PKG_URL="https://pkgs.tailscale.com/stable/tailscale_${PKG_VERSION}_arm64.tgz"
|
||||
PKG_DEPENDS_TARGET="toolchain wireguard-tools wireguard-linux-compat"
|
||||
PKG_SHORTDESC="Zero config VPN. Installs on any device in minutes, manages firewall rules for you, and works from anywhere."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
pre_unpack() {
|
||||
mkdir -p $PKG_BUILD
|
||||
tar --strip-components=1 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tgz -C $PKG_BUILD tailscale_${PKG_VERSION}_arm64
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin/
|
||||
cp ${PKG_BUILD}/tailscale ${INSTALL}/usr/bin/
|
||||
cp ${PKG_BUILD}/tailscaled ${INSTALL}/usr/bin/
|
||||
|
||||
mkdir -p ${INSTALL}/usr/config
|
||||
cp -R ${PKG_DIR}/config/tailscaled.defaults ${INSTALL}/usr/config
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service tailscaled.service
|
||||
}
|
24
packages/network/tailscale/system.d/tailscaled.service
Normal file
24
packages/network/tailscale/system.d/tailscaled.service
Normal file
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Tailscale node agent
|
||||
Documentation=https://tailscale.com/kb/
|
||||
Wants=network-pre.target
|
||||
After=network-pre.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/storage/.config/tailscaled.defaults
|
||||
ExecStartPre=/usr/bin/tailscaled --cleanup
|
||||
ExecStart=/usr/bin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port $PORT $FLAGS
|
||||
ExecStopPost=/usr/bin/tailscaled --cleanup
|
||||
|
||||
Restart=on-failure
|
||||
|
||||
RuntimeDirectory=tailscale
|
||||
RuntimeDirectoryMode=0755
|
||||
StateDirectory=tailscale
|
||||
StateDirectoryMode=0700
|
||||
CacheDirectory=tailscale
|
||||
CacheDirectoryMode=0750
|
||||
Type=notify
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="3c24c9b"
|
||||
PKG_VERSION="3c24c9b" # TODO(kk): update package version after PR is merged.
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -1823,7 +1823,7 @@ CONFIG_NET_CORE=y
|
|||
# CONFIG_GTP is not set
|
||||
# CONFIG_MACSEC is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_TUN is not set
|
||||
CONFIG_TUN=y
|
||||
# CONFIG_TUN_VNET_CROSS_LE is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_NLMON is not set
|
||||
|
|
|
@ -1823,7 +1823,7 @@ CONFIG_NET_CORE=y
|
|||
# CONFIG_GTP is not set
|
||||
# CONFIG_MACSEC is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_TUN is not set
|
||||
CONFIG_TUN=y
|
||||
# CONFIG_TUN_VNET_CROSS_LE is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_NLMON is not set
|
||||
|
|
Loading…
Reference in a new issue