Creating a private Network
This is a small guide how to create a private Network with Phex.
It was originally written by Arne Babenhauserheide ( http://draketo.de )
There are two simple ways to create a private network with Phex:
- A very simple one, where all of your pals need to be at least a bit computer-savvy and
- One for a group of people who don't know a mouse from a squeaking pet, but for which you must be a good deal more computer-savvy.
1) is really simple:
just tell your pals to set their network in Phex to your chosen network name and to connect to your initial-ip or dyndns-host.
You can set your Network in the Network-menu, "choose network".
Then go to the network pane and "add" your IP to the favourites, select it and "connect". Voila.
("Your IP" means an IP, which is online most of the time. All others have to add this, so you have to supply the IP or dyndns-host to them. If you're setting up a private network in a LAN, you can just use the internal IPs, which should be mostly static)
For this to work, a significant partition of your Phex' need to be set to allow ultrapeer mode in options->network. If that doesn't suffice, you might have to set them to "force ultrapeer mode".
And please share your experiences in the Phex-Private-Network-Board.
2) is a bit harder:
What you need:
- You must be able to build Phex from source.
- You need either a dedicated GWebCache (which I might explain at some other time) or a host or a set of hosts which is/are permanently online and reacheable either via a static IP or via a dynamic DNS-address. (This is what you'll use, if you follow these steps)
- You have to deploy customized Phex-jars or Programs to the members of your group.
How to begin:
- Pick a network Name.
This is in some way your passcode. Without it, noone can enter your network.
- Open src/phex/common/Cfg.java and read in there, how to customize it further.
- Open src/phex/resources/version.properties and set the
privatebuild.number to 01.
Increase it by 1 for every beta or stable release you make.
- Open src/phex/resources/phex.hosts and replace any contents by a list of
your static hosts (static IP or dynamic dns-address).
One line for every adress. Only IP:Port or Hostname:Port.
- Build the project (go into build and type ant, if you have ant installed,
else you have to find out how to get it yourself, for example by asking in the Phex Forum).
- Give it to your peers and give them the address of your static hosts
(static IP or dyndns-adress).
This host is necessary for the first connection, later on
it should become obsolete, as soon as all programs have been deployed,
but only if your private network is big enough, that there are always
and at all times some people online.
Your peers should add these static hosts to their favourites
- After the network ran for some time, when you want to deploy a new version,
copy the contents of [private-network-name]_phex.hosts from your
config-files ( in $HOME/.phex/ ) into src/phex/resources/ .
Then build the Program again. Now new members should be able to enter
the private network without always having to rely on the static host
(but you should keep it online, just as safety. That bit of hassle you
avoid isn't worth angry or helpless users.)
I hope you are successful in creating your private network.
-- Arne Babenhauserheide ( http://draketo.de )