Tuner Summary

Tuner is a minimalist proxy server written in bash to allow any content owner to publish data using the Apple's iTunes Music Store interface. It uses a hostfile entry to convince iTunes that the local proxy is a valid iTMS server, and then acts as a go between to let iTunes get data from any URL.

How Exactly Does It Work?

After installing Tuner, on reboot a StartupItem located at /Library/StartupItems/Tuner is activated. It starts a script (/Library/StartupItems/Tuner/check.sh) whose purpose in life is to execute the command:

/Library/StartupItems/Tuner/retrieveURL.sh | sudo /Library/StartupItems/Tuner/nc -l -p 42139 > /Library/StartupItems/Tuner/output.txt

This command starts retrieveURL.sh, which cycles, waiting for nc (netcat) to dump data received on localhost:42139 into a buffer file. Once something has been received, it parses out the requested URL, and uses cURL to retrieve the XML content from any URL. retrieveURL.sh then sends it's data back through the netcat connection which leads to iTunes.

Netcat is a small utility which allows you to talk directly to a network pipe from a shell script. You can find out more about it on it's Sourceforge page.

As soon as the connection is complete, netcat exits, and the retrieveURL.sh script is finished. check.sh, which has been cycling quietly in the background, sees this and restarts it with the same command.

The Tuner directory is available for download so you can examine the source for a clearer idea.

Why a bash script? Why not a language suited to the purpose?

Mostly hack value. Also, I wanted the source to be easy to view and poke at.

What kind of content does iTunes accept?

iTunes requires that you send it it's own brand of XML. You can see the XML tuneDial generates by going to a playlist like this one: http://www.tunedial.org/playlist.php?fileID=20

How do you form a URL to access your content after installing Tuner


The itms:// tells iTunes to open it. workaround.phobos.apple.com is specified in your /etc/hosts file to redirect you to localhost. Port 42139 is an arbitrary port I chose so that you don't block up the default port (80). /url= is probably unnecessary, but makes it easier to parse out the real URL. The remainder of the URL is the actual address of an XML page that iTMS can display.

Where can I find all the changes it made to my system

In /Library/StartupItems/ there's a Tuner directory. This entire directory is placed there by the installer.
The line "workaround.phobos.apple.com" is added to /etc/hosts

Why is it Mac only?

Because that's what I use on a daily basis. It shouldn't be difficult to get running on a Windows box, and if you do let me know and I'll host a download or post a download link.

What iOS versions are you testing?

Once tuneDial is ready for iOS, I will post an update to the homepage with specific models and iOS versions. I have been lucky enough to receive sponsorship for this project from Orchard, who is providing several models of iPhone to use for testing purposes. Of course, the latest information on new iOS updates can be found on Apple's website or the news section of MacRumors.

37 Playlists Linked In
tuneDial © 2016, Robert Warwick
All material is owned by its poster.
All brands, product names, logos, images, multimedia elements, and technologies are trademarks or registered trademarks of their respective holders, and are hereby acknowledged.
Vague Genres
Show All
Classical or Art Music
Contemporary African
Electronic Dance
Hip Hop
Latin American
R and B