- added more selection criteria for network seed list

- enhanced up script
pull/1/head
Michael Peter Christen 12 years ago
parent 252bb51f98
commit 3d9ce9cd04

@ -1,5 +1,7 @@
#!/bin/bash
cd "`dirname $0`"
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
./up1.sh localhost:$port
./apicall.sh "/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
#port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
#./up1.sh localhost:$port

@ -1,10 +0,0 @@
#!/bin/bash
cd "`dirname $0`"
if which curl &>/dev/null; then
curl -s "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
elif which wget &>/dev/null; then
wget -q -O - "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
else
exit 1
fi

@ -284,6 +284,10 @@ public class Network {
boolean dark = true;
Seed seed;
final boolean complete = (post != null && post.containsKey("ip"));
final boolean onlyIncomingDHT = (post != null && post.containsKey("onlydhtin"));
final boolean onlyNode = (post != null && post.containsKey("onlynode"));
final long onlyAgeOverDays = post == null ? 0 : post.getLong("onlyageoverdays", 0);
final long onlySizeLessDocs = post == null ? Long.MAX_VALUE : post.getLong("onlysizelessdocs", Long.MAX_VALUE);
Iterator<Seed> e = null;
final boolean order = (post != null && post.get("order", "down").equals("up"));
final String sort = (post == null ? null : post.get("sort", null));
@ -315,6 +319,10 @@ public class Network {
seed = e.next();
assert seed != null;
if (seed != null) {
if (onlyIncomingDHT && !seed.getFlagAcceptRemoteIndex()) continue;
if (onlyNode && !seed.getFlagRootNode()) continue;
if (seed.getAge() < onlyAgeOverDays) continue;
if (seed.getLinkCount() > onlySizeLessDocs) continue;
if((post != null && post.containsKey("search")) && peerSearchPattern != null /*(wrongregex == null)*/) {
boolean abort = true;
Matcher m = peerSearchPattern.matcher (seed.getName());

Loading…
Cancel
Save