Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > Development & Coding > Development Open Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Development Open Discussion Anything else about the Phex development


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old February 28th, 2010
Devotee
 
Join Date: December 21st, 2009
Posts: 29
hustnn is flying high
Default How to setup the gnutella network using phex

If I own 5 machines in the local network.Then I want to build the local gnutella network using the phex, what should I do? Can I build the local gnutella network in LAN?How?

How to make my node become the ultraPeer?
Reply With Quote
  #2 (permalink)  
Old June 4th, 2011
Disciple
 
Join Date: June 2nd, 2011
Location: Bremen (Germany)
Posts: 17
giorgiob is a great assister to others; your light through the dark tunnel
Default

I would like to do a similar experiment as a test.

I would like to build a network with 2 or 3 computers and have one servent running on each node.
As far as I understand, a servent has a number of IP addresses where it looks for other running servents at startup.

Question: Where (in the code) are these addresses configured in phex?
Is it possible to have them read from a configuration file?


I would also be interested to know how to switch a phex servent to ultra peer mode (in case this is possible).
Reply With Quote
  #3 (permalink)  
Old June 5th, 2011
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

Both is possible:

Ultrapeer: You can force Phex to be ultrapeer by setting the preference:
Connection.ForceToBeUltrapeer = true
or modify class PrivateNetworkConstants.DEFAULT_FORCE_TOBE_ULTRAPE ER

Otherwise check Servent.isAbleToBecomeUltrapeer() for the conditions that need to apply for a servent to become ultrapeer.


The file src/main/resources/phex/resources/phex.hosts contains a list of hosts Phex tries to connect to on startup.
If you like to create a real private network, there are a few code changes that need to be applied. There should be some outdated instructions in the forum and on the Phex wiki. If you like to experiment with it and like to help to incorporate this into the source with an easy "private" switch, it would be very cool.

Gregor
__________________
Reply With Quote
  #4 (permalink)  
Old June 6th, 2011
Disciple
 
Join Date: June 2nd, 2011
Location: Bremen (Germany)
Posts: 17
giorgiob is a great assister to others; your light through the dark tunnel
Default

Since I would like to write an application that exchanges files using phex, I would like to set up my local network to test it first, i.e. I want that
  1. phex connects to specific hosts in my network
  2. phex does not look for further peers on the internet, even if it is connected to the internet
I do not understand exactly why I need to change the source code, shouldn't it be sufficient to change the hosts file?

Anyway, I will look at instructions in the forum before I proceed.

Thanks for the feedback.
Reply With Quote
  #5 (permalink)  
Old June 17th, 2011
Disciple
 
Join Date: June 2nd, 2011
Location: Bremen (Germany)
Posts: 17
giorgiob is a great assister to others; your light through the dark tunnel
Default

I have managed to get Ubuntu on some old computer and start phex from there. I also started phex on my main computer and both servents are connected to each other.
So, I have a network of two computers. Now I have a folder phex in my home directory. It contains three folders: download, incomplete, shared

I have put a file (some mp3 whose file name contains the word "bach") in folder shared. From phex I have added the shared folder to Library -> Shared Files. But now, if I start a search on the other phex servent (search for "bach") I get no result.

Does anyone have an idea as to what I might be doing wrong?

Thank you in advance and many greetings
Giorgio

Last edited by giorgiob; June 17th, 2011 at 01:13 PM.
Reply With Quote
  #6 (permalink)  
Old June 19th, 2011
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

This is the kind of problem I was talking about when you create our own private network.
The problem is, if both servents have not connected to the public Gnutella network, they still assume they are firewalled. If both servents are firewalled they will determine that they can't download from each other... so they want display search results.

In the class Servent.isFirewalled() try to return false as a fixed value. I'm not sure if this is already all that is needed. Somewhere there should a forum thread or a wiki page I think that explains all steps..
__________________
Reply With Quote
  #7 (permalink)  
Old June 19th, 2011
Disciple
 
Join Date: June 2nd, 2011
Location: Bremen (Germany)
Posts: 17
giorgiob is a great assister to others; your light through the dark tunnel
Default

Thanks for the hint! It works now.

Maybe there should be a more sophisticated way to determine whether a servent can download from another servent. I.e., if two servents are on the same local network, this should be possible even if they are behind a firewall.

The next problem I have is that both servents also get connected to external servents, even though I have used my own hosts file.
Can it be that external servents have my servents in their caches and try to connect to my servents when they are online? This would mean that my servents to do not try to connect to external servents but external servents find them anyway.
Reply With Quote
  #8 (permalink)  
Old June 19th, 2011
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

Yes but how do you determine whether two servents are on the same local network.
You can't relay on the same IP range, they could be in two different networks. The only reliable way would be to use some multicast channel, which could also be used for a more efficient communication inside a local network.
Though there are many ideas to make this better and more efficient, we had no time and developers yet to implement this.

You need to change your network name to prevent external servents from connecting. You can do this through the Phex UI (Switch Network) or hard wire it in the PrivateNetworkConstants.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 08:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.