View Single Post
  #7 (permalink)  
Old July 7th, 2002
Krieger88 Krieger88 is offline
Connoisseur
 
Join Date: July 4th, 2002
Posts: 274
Krieger88 is flying high
Default

I added a few lines of code to my version of LimeWire so it will only connect to LimeWire/AquaLime ultrapeers. In case you are willing to compile LimeWire yourself this might help you:

Just edit the .../core/com/limegroup/gnutella/ManagedConnection.java and replace the initialize() method with the following one.

(lines 345 following)
public void initialize()
throws IOException, NoGnutellaOkException, BadHandshakeException {
//Establish the socket (if needed), handshake.
if (_isRouter)
super.initialize(); //no timeout for bootstrap server
else {
super.initialize(CONNECT_TIMEOUT);
if (getUserAgent() != null) {
if (getUserAgent().indexOf("Lime") == -1) // close connection if non-LimeWire
this.close();
}
}
//Start the thread to empty the output queue
new OutputRunner();
}


I know that relying on the user agent string in the handshake is not very safe, but it works.
Reply With Quote