A few months ago I started to research streaming my iTunes library over the Internet. Basically, I was at work staring at my empty iTunes library and knew that it was possible to stream locally on the LAN over TCP/IP. IP is IP, right? How hard could it be? Well, it turns out, not that hard at all. Here's all you need to do. And yes, it even works with iTunes 6, contrary to popular belief. I've only shared from an OS X iTunes share. I'm sure if you have an SSH server for Windows you can do this with a PC iTunes share too.
First, you need to make sure you've got iTunes sharing enabled. You probably even want to make sure it's working before you leave home or wherever you've shared your library. So on the computer you want to stream the music to, you need something called
Rendezvous Proxy. Download the software from that link. It's available for both Windows and Mac. Both are configured the same. Just make sure you have Java installed, if you don't already on the PC. Mac OS X should already have Java support and can be updated via Software Update. Don't worry that it hasn't been updated since 2003. It's still perfectly functional.
Next, you'll need to configure Rendezvous Proxy. Add a host and set the following options:
IP Address: 127.0.0.1 (I'll explain that in a minute)
Port: 3690
Host Label: Home iTunes (or whatever you want the shared library to display as)
Service Text: (optional)
Service Type: _daap._tcp. (iTunes Host)
The IP address is localhost (127.0.0.1) and port 3690 because we're going to set up an SSH tunnel from this port on your local computer to the iTunes host. 3690 is an arbitrary port that can be anything BUT 3689 (the actual iTunes sharing port). This way, the local iTunes can "find" the music being shared, but still be able to share its own library.
Now that you've got the proxy configured, we're ready to establish the SSH tunnel from your local computer to the iTunes share. Obviously, you'll need an SSH client. OS X users will just be able to run Terminal, PC users will have to find an SSH client that supports tunneling. You'll have to figure this one out on your own. I strictly stream from my Mac library to another Mac, but I've also successfully done it with a PC using the SSH Client from ssh.com. Before you actually establish the tunnel, you may need to adjust your firewall or open a port accordingly. This is port 22 for the SSH tunnel. If you're sharing from OS X, don't forget to turn on the SSH server (remote login sharing).
The tunnel from OS X can be established with the following command:
ssh -l user -L 3690:127.0.0.1:3689 home.ip.ext
where "user" is your username on the remote server (your OS X user login sharing iTunes).
"-L 3690:127.0.0.1:3689" opens a port 3690 on your local computer and tunnels it to 3689 on the remote server.
"home.ip.ext" is your public IP at the remote side, allowing SSH connections.
This can also be done with the ssh.com client for Windows. You'll have to play around in the profile settings under the tunneling tab and fill in the blanks based on my previous descriptions. Once you establish the tunnel, the remote iTunes share should pop up right away. It takes a few seconds to connect and make sure your ISP gives you a decent upstream connection from home. Your bandwidth requirements vary based on what quality (bit rate) your MP3s are, plus you'll need some extra for the SSH tunnel. Remember, SSH is encrypting your MP3 stream through the tunnel. I'm fine off my cable modem and I've read most good DSL connections are fine with this setup.
Have fun!