No description
  • Go 73.4%
  • Nix 24.2%
  • Shell 2.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-25 18:19:09 +02:00
packaging lower the ticker to 1 second and hookcontainers to shrink race conditions 2026-11-13 05:19:50 +02:00
.gitignore add nix flake 2026-11-25 18:12:12 +02:00
build.sh chore: create debian package 2026-11-01 15:16:14 +02:00
compose.yaml feat: add a ticker so it actually works and some other stuff 2026-11-01 06:10:21 +02:00
flake.lock add nix flake 2026-11-25 18:12:12 +02:00
flake.nix update flake 2026-11-25 18:19:09 +02:00
go.mod use deploy labels instead of environment variables 2026-11-11 13:37:55 +02:00
go.sum use deploy labels instead of environment variables 2026-11-11 13:37:55 +02:00
LICENSE use deploy labels instead of environment variables 2026-11-11 13:37:55 +02:00
main.go allow docker to forward packets 2026-11-15 20:48:37 +02:00
mise.toml add nix flake 2026-11-25 18:12:12 +02:00
nfpm.yaml chore: create debian package 2026-11-01 15:16:14 +02:00
README.md add nix flake 2026-11-25 18:12:12 +02:00

ucnet

I wrote 80% of the code myself.

How to use (this only works for Debian 13 Trixie):

Add a networks(case sensitive) deploy label to the services you want in a network

Example:

services:
  box-default:
    image: busybox
    command: sleep infinity
    deploy:
      labels:
        networks: default

  box-backend:
    image: busybox
    command: sleep infinity
    deploy:
      labels:
        networks: backend

  box-both:
    image: busybox
    command: sleep infinity
    deploy:
      labels:
        networks: default,backend

How to install

Setup pkg.bar registry:

sudo curl https://pkg.bar/debian/repository.key -o /etc/apt/keyrings/forgejo-irazz.asc
echo "deb [signed-by=/etc/apt/keyrings/forgejo-irazz.asc] https://pkg.bar/debian trixie main" | sudo tee -a /etc/apt/sources.list.d/forgejo.list
sudo apt update

Install the package

sudo apt install ucnet

Requires ipset and iptables to be installed on the machines and br_netfilter to be loaded

modprobe br_netfilter
sysctl net.bridge.bridge-nf-call-iptables   # should now print = 1

echo br_netfilter > /etc/modules-load.d/br_netfilter.conf

Nix

The repo has a flake. ipset and iptables come with it; you still need to load br_netfilter and run ucnet as a service yourself.

nix run git+https://git.irazz.lol/irazz/ucnet

Or add it to your flake inputs:

inputs.ucnet.url = "git+https://git.irazz.lol/irazz/ucnet";
# then use inputs.ucnet.packages.${system}.default

it was super fun writing this