Doughnut
Doughnut copied to clipboard
Discussion about the user agent of Doughnut.
Podcasting services rely heavily on User-Agent
header to serve best-suited audio format and for analytics. The Open Podcast Analytics Working Group (OPAWG) maintains lists of audio user agents and RSS user agents. While it's technically possible to customize the user agents for various components of Doughnut. This issue serves as a thread to discuss the proper format for the user agent of Doughnut.
Some resources of best practises of user agents:
- https://developers.whatismybrowser.com/learn/browser-detection/user-agents/user-agent-best-practices
- https://podinfra.net/app-developers/rss-scrapers.html.
Update Aug.28:
Since we have a website for Doughnut, it's better to include the site URL like how Overcast does.
Update Jul.12:
Here's the examples of current (default) user agents of Doughnut:
-
URLSession
requests:Doughnut/1656606889 CFNetwork/1385 Darwin/22.0.0
-
WKWebView
:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Doughnut
- Media Playback:
AppleCoreMedia/1.0.0.22A5295h (Macintosh; U; Intel Mac OS X 13_0; zh_cn)
After examining user agents from various podcast clients, the above user agents should be acceptable (can be identified from the keyword Doughnut
) except for media playback.
PR #92 implements a distinguishable user agent for Player
in the following format:
Doughnut/x.y.z.build (+https://doughnutapp.com/; Podcast Client; macOS Version x.y.x (Build xxxxxx))
Example:
Doughnut/2.0.0-rc.1.1653423049 (+https://doughnutapp.com/; Podcast Client; macOS Version 13.0 (Build 22A5295h))
Previous thoughts (Jun 6.):
Currently I propose:-
Doughnut/x.y.z.build CFNetwork/x.y.z Darwin/x.y.z (arch)
forURLSession
requests of audio downloads, feeds and images. Example:Doughnut/2.0.0.1654319012 CFNetwork/1333.0.4 Darwin/21.5.0 (arm64)
-
AppleCoreMedia/x.y.z.build (Macintosh; U; Intel Mac OS X x_y; lang) Doughnut/x.y.z.build.arch
(same prefix forAVPlayer
, but with Doughnut version postfix) for audio streaming. Example:AppleCoreMedia/1.0.0.21F79 (Macintosh; U; Intel Mac OS X 12_4; en_us) Doughnut/2.0.0.1654319012.arm64
-
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/x.y.z (KHTML, like Gecko) Doughnut/x.y.z.build.arch
(same prefix forWKWebView
, but with Doughnut version postfix) for the webView. Example:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Doughnut/2.0.0.1654319012.arm64
Feel free to share your ideas :-).