#!/usr/bin/env bash set -euo pipefail # shellcheck source=deploy/proxmox/ct-config.sh source "$(dirname "${BASH_SOURCE[0]}")/../proxmox/ct-config.sh" base='arch: amd64 features: nesting=1 unprivileged: 1' has_tun_passthrough <<< "$base dev0: /dev/net/tun" has_tun_passthrough <<< "$base dev1: path=/dev/net/tun,mode=0666" # Manual Tailscale-style setup: adding dev0 on top makes the CT fail to start (EEXIST). has_tun_passthrough <<< "$base lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file" if has_tun_passthrough <<< "$base"; then exit 1; fi if has_tun_passthrough <<< "$base dev0: /dev/net/tunnel"; then exit 1; fi printf '5 CT config checks passed\n'