Frairable/README.md
2024-01-07 17:40:06 +01:00

45 lines
3.1 KiB
Markdown

# Frairable
Free your Airable-hindered Frontier Smart radio, at least somewhat.
## What? Why?
Some newer radios (you know, those boxes with speakers and antennas playing music) built around Frontier Smart no longer use the Frontier Nuvola services, and thus sadly, [KIMB-technologies/Radio-API](https://github.com/KIMB-technologies/Radio-API) no longer works with them. Instead, they seem to use [airable.wifiradiofrontier.com](https://airable.wifiradiofrontier.com/), which comes with its own quirks:
- Devices no longer "log in" the old way and don't expose an unique ID.
- Every request uses a fresh authorization header.
- You may have been struck by a 403 while trying to access that Airable link. Say goodbye to sniffing around on your own, and goodbye to replaying requests easily!
- Marking stations as favs and adding new stations is now handled on the device itself, instead of being handled by the server.
- API requests are performed through HTTPS (port 443) instead of HTTP (port 80)...
- ... yet (at least with the device I own,) you can throw any certificate at the device and it will eat it up. **MITM ahoy!**
This repo contains a single php file that sits in between your radio and the Airable API, adding new menu entries to the server's responses.
## How can I use this?
### TL;DR
- Set up a web server on ports 80 and 443,
- Use `index.php` for every request,
- Redirect `airable.wifiradiofrontier.com` to your proxying device (f.e. via a DNS adblocker such as Pi-hole),
- Play around with the `radios` folder next to `index.php`.
### My setup
The way I've set it up on my Raspberry Pi 4b is absolutely cursed and there's certainly better ways to do it.
- Home Assistant OS
- Yes, I know running custom software outside of addons (which are just neatly packaged docker containers with special rules) isn't supported, but if it works in such a restrictive environment, then it surely works everywhere.
- [linuxserver/nginx](https://docs.linuxserver.io/images/docker-nginx/)
- Easy to set up, supports a wide range of platforms, and I don't need any of the fancyness that comes with linuxserver/swag (certbot) as it sits in my local network.
- The default config uses `index.php` for all requests, which is exactly what we want! Yay!
- Mounted such that `index.php` and the `radios` dir end up as `www`
- AdGuard Home to redirect `airable.wifiradiofrontier.com` to my raspi.
- desktop.json contains a stream hosted using the following:
- [Icecast](https://icecast.org/) or another web radio server
- I'm personally using [AzuraCast](https://www.azuracast.com/), which uses Icecast under the hood, but with arm64 support!
- [butt](https://danielnoethen.de/butt/)
- This is really just if you want to f.e. stream your PC audio to your internet radio.
## Any hints for following your footsteps?
- `mitmweb --set connection_strategy=lazy --ssl-insecure --mode reverse:https://airable.wifiradiofrontier.com@443`
- The dumps folder contains some things which might get useful if Airable ever goes down / if anyone wants to come up with a fully self-hosted replacement.