---
date: 2025-01-21
title: Miraidon (Airplay Server)
---

## Reference Impls

- https://github.com/mikebrady/shairport-sync/tree/master?tab=readme-ov-file
- https://github.com/ckdo/airplay2-receiver
  - registers mdns service
  - starts http server on port `7000`
    - forwards requests to `AP2Handler`
    - SETUP
      - should receive a bplist
        - if it contains `streams`
          - TODO
        - else
          - seems to be sending event?
          -
    - GET
    - POST
- service Discovery uses mdns/bonjour

  - feature flags are in a SRV record
  - TODO: how do I set up an mdns responder
  - [mdns_sd](https://docs.rs/mdns-sd/latest/mdns_sd/)

- seems like the actual transfers themselves use http over a different port

```
= wlp0s20f3 IPv6 4431B2384B11@Akristip-l-PF4BWXDJ              AirTunes Remote Audio local
   hostname = [akristip-l-PF4BWXDJ.local]
   address = [fd71:e5f3:3440:f95e:dbf9:f904:c567:1ab9]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
=     lo IPv4 4431B2384B11@Akristip-l-PF4BWXDJ              AirTunes Remote Audio local
   hostname = [akristip-l-PF4BWXDJ.local]
   address = [127.0.0.1]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
= wlp0s20f3 IPv4 4431B2384B11@Akristip-l-PF4BWXDJ              AirTunes Remote Audio local
   hostname = [akristip-l-PF4BWXDJ.local]
   address = [192.168.1.212]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
= virbr0 IPv4 4431B2384B11@Akristip-l-PF4BWXDJ              AirTunes Remote Audio local
   hostname = [akristip-l-PF4BWXDJ.local]
   address = [192.168.122.1]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
= docker0 IPv4 4431B2384B11@Akristip-l-PF4BWXDJ              AirTunes Remote Audio local
   hostname = [akristip-l-PF4BWXDJ.local]
   address = [172.17.0.1]
   port = [5000]
   txt = ["pw=false" "txtvers=1" "ch=2" "cn=0,1" "ek=1" "et=0,1" "sv=false" "da=true" "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
^CGot SIGINT, quitting.
```

```json
["pw=false",
 "txtvers=1",
  "ch=2",
   "cn=0,1", "ek=1" "et=0,1" "sv=false" "da=true"  "sr=44100" "ss=16" "md=0,1,2" "vn=65537" "tp=TCP,UDP" "vs=105.1" "am=ShairportSync" "fv=4.3.4" "sf=0x4"]
```
