GNU/Linux CLAT daemon written in Go
  • Go 93.8%
  • Shell 6.2%
Find a file
2026-07-19 01:24:14 +02:00
common Initial commit 2026-07-19 01:01:57 +02:00
nft Initial commit 2026-07-19 01:01:57 +02:00
rules Initial commit 2026-07-19 01:01:57 +02:00
tayga tayga.go: Stopped assuming the path of Tayga, relying on $PATH from systemd instead 2026-07-19 01:21:57 +02:00
.gitignore .gitignore: Ignored makepkg packages 2026-07-19 01:24:14 +02:00
go.mod Initial commit 2026-07-19 01:01:57 +02:00
go.sum Initial commit 2026-07-19 01:01:57 +02:00
goxlat.service Initial commit 2026-07-19 01:01:57 +02:00
LICENSE.md Initial commit 2026-07-19 01:01:57 +02:00
main.go Initial commit 2026-07-19 01:01:57 +02:00
PKGBUILD Initial commit 2026-07-19 01:01:57 +02:00
README.md Initial commit 2026-07-19 01:01:57 +02:00

Goxlat

GNU/Linux CLAT daemon written in Go, utilizing Apalrd's Tayga as the backend
Licenced under GPLv3

How it works

Goxlat will do it's best to find out the NAT64 prefix and the interface that routes towards it
It then inserts ip rules, moving the priority 0 rule "lookup local", to priority 1100, adding a lookup into the table no. 464 for ipv6 traffic (important later).
Then NFTables table is inserted with rules marking packets as 0x464 if they're coming from xlat0 interface, or if they're new and sourced from NAT64 prefix on the PLAT-facing interface.
This allows the backend to reuse the main interface's IP, while also allowing for a IPv6-only server usecase, where IPv4 public traffic is delivered to the server over IPv6 transit from the PLAT. A possible usecase would be fixing SPF email filtering for IPv4 email sources, for IPv6-only NAT64'd mail servers.

Dependencies

  • Go >= 1.26.5 (Tested on Arch Linux latest, 18-Jul-2026)
  • Apalrd's Tayga
  • NFTables (The nft command)

Installation

Arch Linux

Clone the git repository and run makepkg -si

git clone https://git.fibermouse.xyz/mkowalski/goxlat.git
cd goxlat
makepkg -si

Manual

Clone the repo

git clone https://git.fibermouse.xyz/mkowalski/goxlat.git
cd goxlat

Build the go binary

go build -o goxlat main.go

Copy the binary to /usr/bin/

cp goxlat /usr/bin/

Copy the service file

cp goxlat.service /usr/lib/systemd/system/

Usage

Enable the systemd service

systemctl enable --now goxlat