2024-03-10 10:58:53 +11:00
|
|
|
# jrouter
|
|
|
|
|
2024-03-31 09:33:21 +11:00
|
|
|
Home-grown alternative implementation of Apple Internet Router 3.0
|
|
|
|
|
|
|
|
## Goals
|
|
|
|
|
|
|
|
* Full compatibility with Apple Internet Router 3.0
|
|
|
|
* Function on modern operating systems
|
|
|
|
* EtherTalk support
|
2024-04-27 21:45:45 +10:00
|
|
|
* Be observable (there's a HTTP server with a `/status` page)
|
2024-03-31 09:33:21 +11:00
|
|
|
|
|
|
|
TashTalk could be a stretch goal, if I can acquire one!
|
|
|
|
|
2024-04-17 09:21:14 +10:00
|
|
|
## Caveats
|
|
|
|
|
|
|
|
Things I plan to fix Real Soon Now:
|
|
|
|
|
2024-04-17 17:37:50 +10:00
|
|
|
* ✅ Fixed ~~It currently listens to all AppleTalk and AARP traffic on the EtherTalk port.
|
2024-04-17 17:36:36 +10:00
|
|
|
This might not play well with other AppleTalk software, e.g. netatalk.~~
|
2024-04-17 17:37:50 +10:00
|
|
|
* ✅ Fixed ~~Also it currently uses the default Ethernet address for the interface for
|
2024-04-17 17:36:36 +10:00
|
|
|
sending packets. I plan to add the ability to configure a different address.~~
|
|
|
|
You can now configure a different Ethernet address for the EtherTalk
|
|
|
|
interface. I haven't tested it with netatalk or tashrouter on the same
|
|
|
|
host, but I think using a distinct Ethernet address would help them coexist.
|
2024-04-27 21:45:45 +10:00
|
|
|
* It currently ignores other AppleTalk routers on the EtherTalk side. This is
|
|
|
|
the next main thing to implement to make it work with e.g. netatalk.
|
|
|
|
* Some packet types need splitting to fit within limits. Some of these aren't
|
|
|
|
implemented yet (mainly encapsulated).
|
|
|
|
* I plan to add a Prometheus metrics endpoint and at least add log levels /
|
|
|
|
verbosity config.
|
|
|
|
* The AURP implementation is mostly there, but not fully complete. The main
|
|
|
|
thing missing is sequence number checking.
|
2024-04-17 09:21:14 +10:00
|
|
|
|
|
|
|
Things I plan to fix At Some Point:
|
|
|
|
|
|
|
|
* For expediency I made it act as a _seed router_. At some point I might add
|
|
|
|
"soft seed" functionality.
|
|
|
|
|
|
|
|
|
2024-03-31 09:33:21 +11:00
|
|
|
## How to use
|
|
|
|
|
2024-04-27 21:45:45 +10:00
|
|
|
WARNING: It Sorta Works™
|
2024-04-15 11:38:30 +10:00
|
|
|
|
|
|
|
First, set up a `jrouter.yaml` (use the one in this repo as an example).
|
|
|
|
|
|
|
|
TODO: explain the configuration file
|
|
|
|
|
|
|
|
Building and running:
|
|
|
|
|
|
|
|
```shell
|
2024-04-15 11:42:12 +10:00
|
|
|
sudo apt install libpcap-dev
|
2024-04-15 11:38:30 +10:00
|
|
|
go install gitea.drjosh.dev/josh/jrouter@latest
|
|
|
|
sudo setcap 'CAP_NET_BIND_SERVICE=ep CAP_NET_RAW=ep' ~/go/bin/jrouter
|
|
|
|
~/go/bin/jrouter
|
|
|
|
```
|
|
|
|
|
|
|
|
* `NET_BIND_SERVICE` is needed to bind UDP port 387 (for talking between AIRs)
|
|
|
|
* `NET_RAW` is needed for EtherTalk
|
|
|
|
|
|
|
|
TODO: instructions for non-Linux machines
|