Edfited README

This commit is contained in:
fduncanh
2021-12-21 14:11:36 -05:00
parent 91cefb2db4
commit 2670e55a0a
3 changed files with 40 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
<h1 id="uxplay-1.44-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.44: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
<p>This project is a GPLv3 open source unix AirPlay2 Mirror server for Linux, macOS, and *BSD. It is now hosted at the github site <a href="https://github.com/FDH2/UxPlay">https://github.com/FDH2/UxPlay</a> (where development and user-assistance now takes place), although it initially was developed by <a href="http://github.com/antimof/Uxplay">antimof</a> using code from <a href="https://github.com/FD-/RPiPlay">RPiPlay</a>, which in turn derives from <a href="https://github.com/KqsMea8/AirplayServer">AirplayServer</a>, <a href="https://github.com/juhovh/shairplay">shairplay</a>, and <a href="https://github.com/EstebanKubata/playfair">playfair</a>. (The antimof site is mainly inactive, but periodically posts updates pulled from the <a href="https://github.com/FDH2/UxPlay">main UxPlay site</a>).</p>
<p>Its main use is to act like an AppleTV for screen-mirroring (with audio) of iOS/iPadOS/macOS clients (iPhones, iPads, MacBooks) in a window on the server display (with the possibility of sharing that window on screen-sharing applications such as Zoom) on a host running Linux, macOS, or other unix. UxPlay supports a “legacy” form of Apples AirPlay Mirror protocol introduced in iOS 12; client devices running iOS/iPadOS 12 or later are supported, as is a (nonfree) Windows-based AirPlay-client software emulator, AirMyPC. Older (32-bit) client devices that can only run iOS 9.3 or iOS 10.3 are currently partially supported by UxPlay: reports indicate that screen-mirroring video works, audio is a work in progess. (Details of what is publically known about Apples AirPlay2 protocol can be found <a href="https://github.com/SteeBono/airplayreceiver/wiki/AirPlay2-Protocol">here</a> and <a href="https://emanuelecozzi.net/docs/airplay2">here</a>).</p>
<p>Its main use is to act like an AppleTV for screen-mirroring (with audio) of iOS/iPadOS/macOS clients (iPhones, iPads, MacBooks) in a window on the server display (with the possibility of sharing that window on screen-sharing applications such as Zoom) on a host running Linux, macOS, or other unix. UxPlay supports a “legacy” form of Apples AirPlay Mirror protocol introduced in iOS 12; client devices running iOS/iPadOS 12 or later are supported, as is a (non-free) Windows-based AirPlay-client software emulator, AirMyPC. Older (32-bit) client devices that can only run iOS 9.3 or iOS 10.3 are currently partially supported by UxPlay: reports indicate that screen-mirroring video works, audio is a work-in-progress, but is correctly decrypted. (Details of what is publically known about Apples AirPlay2 protocol can be found <a href="https://github.com/SteeBono/airplayreceiver/wiki/AirPlay2-Protocol">here</a> and <a href="https://emanuelecozzi.net/docs/airplay2">here</a>).</p>
<p>The UxPlay server and its client must be on the same local area network, on which a <strong>Bonjour/Zeroconf mDNS/DNS-SD server</strong> is also running (only DNS-SD “Service Discovery” service is strictly necessary, it is not necessary that the local network also be of the “.local” mDNS-based type). On Linux and BSD Unix servers, this is usually provided by <a href="https://www.avahi.org">Avahi</a>, through the avahi-daemon service, and is included in most Linux distributions (this service can also be provided by macOS, iOS or Windows servers).</p>
<p>Connections to the UxPlay server by iOS/MacOS clients can be initiated both in AirPlay Mirror mode (which streams lossily-compressed AAC audio while mirroring the client screen, or in the alternative AirPlay Audio mode which streams Apple Lossless (ALAC) audio without screen mirroring (the accompanying metadata and cover art in this mode is not displayed). <em>Switching between these two modes during an active connection is possible: in Mirror mode, close the mirror window and start an Audio mode connection, switch back by initiating a Mirror mode connection.</em> <strong>Note that Apple DRM (as in Apple TV app content on the client) cannot be decrypted by UxPlay, and (unlike with a true AppleTV), the client cannot run a http connection on the server instead of streaming content from one on the client.</strong></p>
<p>UxPlay uses GStreamer Plugins for rendering audio and video, and does not offer the alternative Raspberry-Pi-specific audio and video renderers available in <a href="https://github.com/FD-/RPiPlay">RPiPlay</a>. It is tested on a number of systems, including (among others) Debian 11.2, Ubuntu 20.04 and 21.10, Linux Mint 20.2, OpenSUSE 15.3, macOS 10.15.7, FreeBSD 13.0.</p>
@@ -87,8 +87,8 @@
<p>Some extra GStreamer packages for special plugins may need to be installed (or reinstalled: a user using a Wayland display system as an alternative to X11 reported that after reinstalling Lubuntu 18.4, UxPlay would not work until gstreamer1.0-x was installed, presumably for Waylands X11-compatibility mode). Different distributions may break up GStreamer 1.x into packages in different ways; the packages listed above in the build instructions should bring in other required GStreamer packages as dependencies, but will not install all possible plugins.</p>
<h3 id="failure-to-decrypt-all-video-andor-audio-streams-from-a-particular-older-client">5. Failure to decrypt ALL video and/or audio streams from a particular (older) client:</h3>
<p>This triggers an error message, and will be due to use of an incorrect protocol for getting the AES decryption key from the client.</p>
<p>Modern Apple clients use a more-encrypted protocol than older ones. Which protocol is used by UxPlay depends on the client <em>User-Agent</em> string (reported by the client and now shown in the terminal output). iOS 9 and 10 clients only use iTunes FairPlay encryption on the AES decryption key they send to the server. Somewhere around iOS sourceVersion 330 (part of the User-Agent string) Apple started to further encrypt it by a sha-512 hash with a “shared secret” created during the Server-Client pairing process. The sourceVersion 330 above which the extra decryption step is carried out is set in lib/global.h if you need to change it. (This applies only to audio decryption; the AES key used for video decryption has used extra encryption with the “shared-secret” since iOS 9).</p>
<p>The third-party non-free Windows software <em>AirMyPC</em> (a commercial AirPlay emulator) uses an unhashed AES key for both audio and video encryption. <em>AirMyPC</em> has a distinctive <em>User-Agent</em> string, which is detected using two other settings in lib/global.h that can be adjusted if necessary. These settings might be useful if other AirPlay-emulators need support. Uxplay declares itself to be an AppleTV2,1 with sourceVersion 220.68; this can also be changed in global.h.</p>
<p>Modern Apple clients use a more-encrypted protocol than older ones. Which protocol is used by UxPlay depends on the client <em>User-Agent</em> string (reported by the client and now shown in the terminal output). iOS 9 and 10 clients only use iTunes FairPlay encryption on the AES decryption key they send to the server. Somewhere around iOS sourceVersion 330 (part of the User-Agent string) Apple started to further encrypt it by a sha-512 hash with a “shared secret” created during the Server-Client pairing process. The sourceVersion 330 above which the extra decryption step is carried out is a guess for a value bigger than 320 and smaller than 380, and is set in lib/global.h if you need to change it. (This applies only to audio decryption; since at least iOS 9, the AES key used for video decryption is derived from a hash of a key formed from the “streamConnectionID” received from the client with the <em>hashed</em> audio AES key.)</p>
<p>The third-party non-free Windows software <em>AirMyPC</em> (a commercial AirPlay emulator) uses an even older protocol: it not only uses the unhashed AES key for audio, but also uses a video AES key derived as above, but using the <em>unhashed</em> audio AES key. <em>AirMyPC</em> has a distinctive <em>User-Agent</em> string, which is detected using two other settings in lib/global.h that can be adjusted if necessary. These settings might be useful if other AirPlay-emulators using this protocol need support. Uxplay declares itself to be an AppleTV2,1 with a sourceVersion 220.68 taken from an AppleTV3,1; this can also be changed in global.h. (It is crucial for UxPlay to declare this old value of sourceVersion, as it prompts the client to use a less-encrypted older “legacy” protocol to make the connection with the UxPlay server; it is probably not necessary for UxPlay to claim to be such an old AppleTV model.)</p>
<h1 id="changelog">ChangeLog</h1>
<p>1.44 2021-12-13 Omit hash of aeskey with ecdh_secret if sourceVersion &lt;= 280.33 (this supports AirMyPC); internal rearrangement of where this hash is done. Replace decodebin by h264-specific elements in the GStreamer video pipeline. Fully report initial communications between client and server in -d debug mode.</p>
<p>1.43 2021-12-07 Various internal changes, such as tests for successful decryption, uniform treatment of informational/debug messages, etc., updated README.</p>

View File

@@ -14,10 +14,10 @@ Its main use is to act like an AppleTV for screen-mirroring (with audio) of iOS/
on the server display (with the possibility of
sharing that window on screen-sharing applications such as Zoom)
on a host running Linux, macOS, or other unix. UxPlay supports a "legacy" form of Apple's AirPlay Mirror protocol introduced
in iOS 12; client devices running iOS/iPadOS 12 or later are supported, as is a (nonfree) Windows-based
in iOS 12; client devices running iOS/iPadOS 12 or later are supported, as is a (non-free) Windows-based
AirPlay-client software emulator, AirMyPC. Older (32-bit) client devices that can only run iOS 9.3 or iOS 10.3 are
currently partially supported by UxPlay: reports indicate that
screen-mirroring video works, audio is a work in progess.
screen-mirroring video works, audio is a work-in-progress, but is correctly decrypted.
(Details of what is publically known about Apple's AirPlay2 protocol can be found
[here](https://github.com/SteeBono/airplayreceiver/wiki/AirPlay2-Protocol) and
[here](https://emanuelecozzi.net/docs/airplay2)).
@@ -400,12 +400,20 @@ Modern Apple clients use a more-encrypted protocol than older ones.
Which protocol is used by UxPlay depends on the client _User-Agent_ string (reported by the client and now shown in the terminal output).
iOS 9 and 10 clients only use iTunes FairPlay encryption on the AES decryption key they send to the server.
Somewhere around iOS sourceVersion 330 (part of the User-Agent string) Apple started to further encrypt it by a sha-512 hash with a "shared secret" created
during the Server-Client pairing process. The sourceVersion 330 above which the extra decryption step is carried out is set in lib/global.h if you need to
change it. (This applies only to audio decryption; the AES key used for video decryption has used extra encryption with the "shared-secret" since iOS 9).
during the Server-Client pairing process. The sourceVersion 330 above which the extra decryption step is carried out is
a guess for a value bigger than 320 and smaller than 380, and is set in lib/global.h if you need to
change it. (This applies only to audio decryption; since at least iOS 9, the AES key used for video decryption
is derived from a hash of a key formed from the "streamConnectionID" received from the client with the _hashed_ audio AES key.)
The third-party non-free Windows software _AirMyPC_ (a commercial AirPlay emulator) uses an unhashed AES key for both audio and video encryption. _AirMyPC_ has
a distinctive _User-Agent_ string, which is detected using two other settings in lib/global.h that can be adjusted if necessary. These settings might be useful if
other AirPlay-emulators need support. Uxplay declares itself to be an AppleTV2,1 with sourceVersion 220.68; this can also be changed in global.h.
The third-party non-free Windows software _AirMyPC_ (a commercial AirPlay emulator) uses an even older protocol:
it not only uses the unhashed AES key for audio, but also uses a video AES key derived as above, but using the _unhashed_
audio AES key. _AirMyPC_ has a distinctive _User-Agent_ string, which is detected using two other settings in lib/global.h
that can be adjusted if necessary. These settings might be useful if
other AirPlay-emulators using this protocol need support. Uxplay declares itself to be an AppleTV2,1 with a
sourceVersion 220.68 taken from an AppleTV3,1;
this can also be changed in global.h. (It is crucial for UxPlay to declare this old value of sourceVersion, as it prompts the client to use
a less-encrypted older "legacy" protocol to make the connection with the UxPlay server; it is probably not necessary for UxPlay to
claim to be such an old AppleTV model.)
# ChangeLog
1.44 2021-12-13 Omit hash of aeskey with ecdh_secret if sourceVersion <= 280.33 (this supports AirMyPC);

View File

@@ -19,12 +19,12 @@ the server display (with the possibility of sharing that window on
screen-sharing applications such as Zoom) on a host running Linux,
macOS, or other unix. UxPlay supports a "legacy" form of Apple's AirPlay
Mirror protocol introduced in iOS 12; client devices running iOS/iPadOS
12 or later are supported, as is a (nonfree) Windows-based
12 or later are supported, as is a (non-free) Windows-based
AirPlay-client software emulator, AirMyPC. Older (32-bit) client devices
that can only run iOS 9.3 or iOS 10.3 are currently partially supported
by UxPlay: reports indicate that screen-mirroring video works, audio is
a work in progess. (Details of what is publically known about Apple's
AirPlay2 protocol can be found
a work-in-progress, but is correctly decrypted. (Details of what is
publically known about Apple's AirPlay2 protocol can be found
[here](https://github.com/SteeBono/airplayreceiver/wiki/AirPlay2-Protocol)
and [here](https://emanuelecozzi.net/docs/airplay2)).
@@ -510,18 +510,27 @@ decryption key they send to the server. Somewhere around iOS
sourceVersion 330 (part of the User-Agent string) Apple started to
further encrypt it by a sha-512 hash with a "shared secret" created
during the Server-Client pairing process. The sourceVersion 330 above
which the extra decryption step is carried out is set in lib/global.h if
you need to change it. (This applies only to audio decryption; the AES
key used for video decryption has used extra encryption with the
"shared-secret" since iOS 9).
which the extra decryption step is carried out is a guess for a value
bigger than 320 and smaller than 380, and is set in lib/global.h if you
need to change it. (This applies only to audio decryption; since at
least iOS 9, the AES key used for video decryption is derived from a
hash of a key formed from the "streamConnectionID" received from the
client with the *hashed* audio AES key.)
The third-party non-free Windows software *AirMyPC* (a commercial
AirPlay emulator) uses an unhashed AES key for both audio and video
encryption. *AirMyPC* has a distinctive *User-Agent* string, which is
detected using two other settings in lib/global.h that can be adjusted
if necessary. These settings might be useful if other AirPlay-emulators
need support. Uxplay declares itself to be an AppleTV2,1 with
sourceVersion 220.68; this can also be changed in global.h.
AirPlay emulator) uses an even older protocol: it not only uses the
unhashed AES key for audio, but also uses a video AES key derived as
above, but using the *unhashed* audio AES key. *AirMyPC* has a
distinctive *User-Agent* string, which is detected using two other
settings in lib/global.h that can be adjusted if necessary. These
settings might be useful if other AirPlay-emulators using this protocol
need support. Uxplay declares itself to be an AppleTV2,1 with a
sourceVersion 220.68 taken from an AppleTV3,1; this can also be changed
in global.h. (It is crucial for UxPlay to declare this old value of
sourceVersion, as it prompts the client to use a less-encrypted older
"legacy" protocol to make the connection with the UxPlay server; it is
probably not necessary for UxPlay to claim to be such an old AppleTV
model.)
ChangeLog
=========