Search this site


Metadata

Articles

Projects

Presentations

xboxproxy - an xbox system link proxy

Background

In an effort to be able to play Halo 2 with some out of state friends, I wrote an xbox system link proxy that would essentially bridge only xbox network traffic across across layer 3 networks using UDP. Written in C and uses libpcap and libnet. A later update added multicast support so Apple's Rendezvous (mdns) protocol could span subnets and networks.

It's a very simple program that simple takes certain packets and forwards them to other known xbox proxies. The xbox system link bridge will let you essentially bridge the broadcast and multicast traffic across multiple networks using these proxy bridge-points.

How does it work?

The xbox system link uses ethernet addresses (Layer 2) to indicate destination address and UDP (Layer 4) to send data. If you aren't familiar with the OSI model, then the layer information won't help you here. Basically, the 3 layers we care about for this system link proxy are ethernet (layer 2) and udp (layer 4). There's a special mention for the ip layer (layer 3) but that will be explained shortly.

System link packets come in two flavors: broadcast and unicast. In Halo 2, when you go to look for system link games, your xbox will send ethernet broadcast packets probing for available games. Broadcast packets are received by every network device on your layer 2 segment, this usually means your subnet or immediate network. Other xbox systems who are hosting games will respond directly to your xbox using your xbox's ethernet address (MAC address) as the destination. This process is called "discovery." After the discovery process completes and your xbox knows about other xboxes hosting games on the network, it begins direct communication to the known xboxes. When you try to join a game, your xbox sends packets directly to the other xbox you are connecting to. Direct communication continues until you quit the game.

A special note needs to be made, becuase you can't simple skip over layer 3 (the ip layer). We know now that addressed communication uses ethernet addresses, and we also know that the payloads are inside UDP packets, but what about the IP layer? The IP layer has addresses of its own, among other kinds of flags. Xboxes use the IP of 0.0.0.1 to communicate. This is nothing *too* special, but if you want to sniff only your xbox's traffic, then you can simply filter for that ip and you'll get it.

The proxy works by listening for broadcast packets from any xboxes on the immediate network. Any broadcast packets are forwarded to any known proxies over UDP. The proxy also keeps track of ethernet addresses by proxy. So if a packet from "my" xbox wants to talk to another xbox, the proxy will know which proxy that target xbox is on, and only forward the packet to that proxy.

This is a very simple system, and I don't have to know anything about the system link protocol beyond what the underlying layers are used for communication.

I later did some investigating into iTunes music shares. iTunes uses mdns (Apple calls it Rendezvous) for "discovery" of other iTunes music shares. The discovery is done over a protocol called multicast. Adding mdns support to the proxy/bridge program was quite trivial, and I have tested that it does in-fact work. You can use it to listen to iTunes music shares which are not on your immediate network.

Where can I download it?

download xboxproxy

What OS's are known to work?

  • FreeBSD 4.x/5.x/-current
  • Fedora 3 Linux 64bit
  • RH9 (Requires Fedora 4 binaries of libpcap and libnet)
  • Solaris 10 SPARC

How do I use it?

Requirements:
  • libpcap
  • libnet 1.0 or 1.1.x (both are supported)
Build instructions:
  • Unpack it with tar -zxf proxy-2.1.tar.gz
  • cd proxy-2.1
  • ./configure
  • make
  • make install
Use instructions:
Usage: ./proxy [-bxm] [-u] [-s <server>] [-i <dev>] [-d <debuglevel>] [-p <port>] [-h]
-x              forward xbox system link packets
-b              forward broadcast traffic
-m              forward multicast packets
-u              use udp encapsulation instead of tcp (default)
-s <server>     specify another proxy to send packets to
-i <dev>        ethernet device to sniff packets on
-d <level>      specify debug level, (0-1000)
-p <port>       which port to send data on when talkin to other proxies
-f <bpf filter> an additional bpf filter string you wish to use
-h              this message!

26 responses to 'xboxproxy - an xbox system link proxy'

Showing last 15 comments... (Click here to view all comments)

bobsupercow wrote at Tue Feb 13 10:58:07 2007...
@meanses,

Are you still pursuing the project you were talking about? If so, if you don't mind email me when you're done. bobsupercow@hotmail.com  I would love to see this as a Windows executable. Thanks

Jordan Sissel wrote at Tue Feb 13 11:03:44 2007...
bobsupercow and meanses,

There are a few xbox/ps2/etc game proxies out there for windows. Xlink Kai is one of them that seems to be quite popular. I've never used it, but feel free to try it out.

Then again, xlink kai is global, where as a campus-wide-only system would be pretty cool as far as the "you're playing with people in your area"-factor goes.

bobsupercow wrote at Tue Feb 13 17:31:13 2007...
@Jordan

Yeah, both Kai and XBC don't work on my campus because their servers are blacklisted. But a program where you could create a campus-wide network would be fantastic. If Kai or XBC were to publish their source code it would be pretty simple to change it from trying to connect to a global server to connecting to a local server running on campus...but I don't see them doing that anytime soon. ;)

Ctrl Phreak wrote at Tue Feb 27 14:34:47 2007...
I also have started a project in java similar to the above.  I have webhosting and am pending approval on SorceForge.  indented audience is primarily windows but java should let it be universal.

Currently I am laying out the framework classes, and requirements.  If anyone would like to join my team (currently only me) fire me an e-mail at xbox@whitehatblackhat.com.  I would love to help coordinate as many people that would like to help out such a program's development.

Ctrl Phreak wrote at Tue Feb 27 14:38:48 2007...
Jordan,
Much like your program, I have no intent on creating a system where users can search for new games.  Rather, I would like to make a system that makes the boundaries between LAN's invisible to XBOX's.  Are you willing to share any information on your packet handling system?  I understand if you do not, but it would be much easier than trying from scratch, or dechipering C, as i am not very familiar with the language.

Thank-you for your time,
Ctrl Phreak

Inv wrote at Sat Mar 3 02:07:18 2007...
Ctrl Phreak:  Look into openvpn.  You can setup a bridge with other VPNs, and with ebtable, you can make it so only xbox traffic for system link goes over the bridge (since it uses a specific IP and port).  Look into the broute option for ebtable, so that non-xbox traffic still goes to your normal ethernet port.

Ctrl Phreak wrote at Sat Mar 3 11:23:22 2007...
Inv,
I have used openVPN before with little success.  That would be close to what i want with the execption that ebtable is linux only (no?) and openVPN would provide not Xbox specific stats, such as MAC, ping etc....or do you know if that kinda thing would be possible?

topprospect wrote at Mon Dec 17 13:37:37 2007...
Jordan: Have you tried this with Halo 3?  I am able to see other System Link games, but I can't join them.  I'm running xboxproxy with -x -b -m.

TrueFranco wrote at Sat Mar 8 12:19:44 2008...
I ported to windows and is working very good
Thanks to Jordan

electro-maniacal wrote at Sun Jul 20 20:44:33 2008...
Hey Jordan:

Great little program.

A friend of mine and was able to build xboxproxy on ubuntu after some slight modifications. We then tested it between two dorms for several hours playing 16 player games of halo3. Luckily the network was fast enough to keep our ping times low enough to pass the xbox360 ping filter. We had some trouble at first setting up the game because the network was getting confused with people randomly creating games and looking for games on each subnet. One connection at a time and all was well.

Anyone interested in using ubuntu will need to change "struct fd_set" to just "fd_set" on line 522 of main.c. You will need to have libnet1-dev and libpcap0.8-dev installed. Make sure you don't have libpthread-dev installed (you will obviously need libc6-dev & friends).

Glad to see someone ported it to windows. I wonder if it will be fast enough to handle xbox360 syslink traffic. Do you have a link for that?

Ben wrote at Mon Aug 11 12:38:17 2008...
This app is fantastic.  Works great with OpenVPN here.  I found to get it to compile on ubuntu 8.04 I had to do what electro-maniacal suggests, but also to keep it from segfaulting I had to add:

#include <netinet/ether.h>

underneath:

#ifdef HAVE_NETINET_IF_ETHER_H
#include <net/if.h>
#include <netinet/if_ether.h>

Now that I've done that, I've been playing halo 2 all day over my VPN :D

Thanks Jordan!

TrueFranco wrote at Thu Aug 21 08:53:13 2008...
Here is the windows version.
Just install winpcap and Vcredist include in the rar archive ,edit runme.bat and run runme.bat.
Good luck

http://rapidshare.com/files/139025069/xboxproxy.rar.html

rik wrote at Mon Dec 22 18:11:19 2008...
Awwwsome rig.

Thanks a lot.  btw, the code changes posted by electro-maniacal and Ben gave me a flawless build for my Knoppmyth R5.5 backend machine. 

As a tester, I got my ass handed to me playing Colin McRae (remotely this time, instead of actually going over to my friend's house across town with my xbox, which is the normal way I get it handed to me).

nick wrote at Mon Mar 9 06:24:36 2009...
guys just use XBC its the one i used for years and its great or Xlink but XBC was prefered

Aaron wrote at Thu Sep 24 00:44:07 2009...
Cheers mate helped alot


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment: