No description
- Go 73.4%
- Nix 24.2%
- Shell 2.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| packaging | ||
| .gitignore | ||
| build.sh | ||
| compose.yaml | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| mise.toml | ||
| nfpm.yaml | ||
| README.md | ||
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