For some time now, I’ve been unable to connect to the iTunes Store from my computers at home… I believe this happened when I upgraded from the 9.0x series of iTunes to the 9.1x series. As it turns out, Apple apparently decided to have iTunes try to connect to a malformed URL which DansGuardian (my proxy web filtering stuff) rejects cause it’s… you know… malformed.
As a developer of software that occasionally makes its way into the iTunes store, I’ve become increasingly frustrated about why it does not work anymore, and tonight I finally decided to try to do something about it.
I ran across this thread, which explains the problem, but none of their solutions were good ones for me. I’m currently running Ubuntu 9.10, which shipped with an older version of DansGuardian, and I did not install DansGuardian from source. Apparently a newer release of DandGuardian (2.10 and later, to be precise) contains a fix which allows malformed URLs of the flavor Apple seems to enjoy. So, my options were to:
- Upgrade my home server to be a newer version of Ubuntu (not my favorite choice, as my experience with upgrading Ubuntu on servers at work has been rocky in the past)
- Try to get the new version of DansGuardian that ships with Ubuntu 10.04 installed w/out upgrading the whole box (usually a bad idea, as it was compiled with assumptions about how things are set up in 10.04, which may differ from 9.10)
- Downgrade iTunes to 9.0x series
- Replace the existing DansGuardian with a newer version I compiled from source
This last option is what I did for a few reasons:
- I don’t want to have to make massive changes to my whole box just for one small software change
- I can simply compile a new DansGuardian executable with the same options that were used in the package-managed version, and it should be a drop in replacement
- No need to upgrade or change any of my current configuration
So, the process:
- Download the source of DG from the dansguardian folks.
- Unpack the tarball, then descend into the directory it creates and issue the following configure command:
./configure --localstatedir=/var --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --with-proxygroup=dansguardian --with-proxyuser=dansguardian
- Resolve any dependencies that configure wants (I needed to install the pcre development packages)
- make will spit out a new executable in
mv /usr/sbin/dansguardian /usr/sbin/dansguardian-old
mv ./src/dansguardian /usr/sbin/dansguardian
DansGuardian started right up with no issues. I then started up iTunes and the store connects just fine. The rest of DansGuardian seems to be working fine as well.
If you find this at all useful, or have a suggestion for improvement, please leave me a comment. Thanks!