HowTo:Enable P2P using Bonjour

From iFolder

This HOWTO will show you how to add p2p (Peer-to-Peer) functionality to the Folder Client using Apple's Bonjour (formerly known as Rendezvous). This document will eventually include information on also enabling the new Wide Area Bonjour which will allow you to share iFolders across the internet without using a central iFolder server.

Table of contents

Requirements

iFolder 1.1
mDNSResponder (http://developer.apple.com/networking/bonjour) (Apple's Bonjour)

Apple provides an install for Windows you can download and install without having to build anything. Linux users will have to compile and install Bonjour if your distribution doesn't contain a working copy. Most of the new distributions have a working version of mDNSResponder. Macintosh users don't need to download anything as it is already installed and running on OS X machines.

Just tell me how to get it working without building it

Unfortunately there is no way to get this component working without first getting some code and building it. We are working to provide packaged installs for all of the platforms.

Getting the Source Code

The only way to get the Simias-Bonjour source code is to get the source from CVS. For information on using CVS with Forge, look here:

http://forge.novell.com/modules/xfmod/cvs/cvspage.php/ifolder/

The bonjour module is the module you want to check out. If you use the web browser, you can have it create a tarball to download the source code if you need it.

Building and Installing

The bonjour module has dependencies on Simias so make sure you follow the instructions for building Simias (in the Building iFolder HOWTO) and do the same for building the bonjour module.

To configure and build the bonjour module, change into the root of the module and run:

 ./autogen.sh --prefix=<simias prefix>

where <simias prefix> is set to the same prefix where Simias was built and installed. This must be the same prefix because it installs additional libraries and configuration which enable the p2p functionality. If you are building from a dist tarball you'll need to run ./configure instead of ./autogen.sh.

To build and install the bonjour module, run:

 make install

Configuring iFolder with Bonjour

Once you have installed the bonjour module, you'll need to edit a configuration file to enable it (the pre-built packages take care of this for you). The file you need to edit is:

$prefix/etc/simias-client-bootstrap.config

In this file you are looking for the line:

 <Service name="Bonjour Domain" assembly="Simias.Bonjour.dll" 
 enabled="False" type="Thread" class="Simias.mDns.Service" />

The line needs to change to have "True" where it shows "False" like this:

 <Service name="Bonjour Domain" assembly="Simias.Bonjour.dll" 
 enabled="True" type="Thread" class="Simias.mDns.Service" />

This will only enable bonjour support if you have never run iFolder. When iFolder is run this bootstrap file gets copied to your Simias data directory and is named Simias.config. If you have already run iFolder, you also need to update your Simias.config file. It has the same format as shown above. It's located in a different location depending on the platform.

On Linux and Macintosh:

 ~/.local/share/simias/Simias.config

On Windows:

 $HOME_DIR\Local Settings\Application Data\simias\Simias.config

Running iFolder

After making the configuration changes, the next time you launch the iFolder client, you'll have a new domain called "Peer to Peer" (it shows up as a server when creating a new iFolder). Any iFolders you create in that domain can be shared with other users running iFolder with Bonjour enabled... without a server. Create an iFolder in the Peer to Peer server and share it. When you go to add users, you'll see all of the users with Bonjour enabled iFolder running. When you add them to your iFolder, they will immediately get a notification that an iFolder has been share with them. From this point iFolder acts as it normally does with the exception that syncing will only happen with both machines are on the network.

You will now have p2p iFolder using Bonjour.

Setting up Wide Area Bonjour

Wide Area Bonjour will give you the ability to communicate using the bonjour module but go across a WAN or internet instead of the local LAN.

-- More information to be added