- removed unused network oanet

- added new network definition 'allip' which can be used in networks where intranet and internet-addresses shall be indexed
- added a auto-switch-off for global search if there are no global peers

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7030 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 1802c54317
commit 171f2bd84e

@ -0,0 +1,26 @@
# Network definition file to grant all IPs as search domain
# general network definition
network.unit.name = allip
network.unit.description = Intranet and Internet Search Portal
network.unit.domain = any
network.unit.dht = false
network.unit.dhtredundancy.junior = 1
network.unit.dhtredundancy.senior = 1
network.unit.dht.partitionExponent = 0
network.unit.remotecrawl.speed = 600
# each network may use different yacy distributions.
# the auto-updater can access network-specific update locations
network.unit.update.location0 = http://yacy.net/index.html
network.unit.update.location1 = http://latest.yacy.de
network.unit.update.location2 = http://www.yacystats.de/yacybuild/
network.unit.update.location2.key = MIIBtTCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYIAAn8bzmhk8EWOj9h+7zng1o3OlgI+LsG7lI7kVsDxyzMB/WYTpO+NKWoibFjQDFN92TKBQVAA8DQciHfolqcFfVAot9/3ipamXVGz29OAxz8i0Wty6KI6w50YrL2xAkWjx7jSBghJKlnKx3V0PaDCWqz37ogQvuxLKBFORyAjbv3O
network.unit.update.location3 = https://latestyacy.f1ori.de/
# properties for in-protocol response authentication:
network.unit.protocol.control = uncontrolled
# white/blacklists
network.unit.access.whitelist = 10\..*,127.*,172.(1[6-9]|2[0-9]|3[0-1])\..*,169.254.*,192.168.*,localhost
network.unit.access.blacklist =

@ -1,20 +0,0 @@
# Network definition file for the oanet network
network.unit.name = oanet
network.unit.description = Open Access Community
network.unit.domain = global
network.unit.search.time = 4
network.unit.dht = false
network.unit.dhtredundancy.junior = 1
network.unit.dhtredundancy.senior = 1
network.unit.dht.partitionExponent = 0
network.unit.remotecrawl.speed = 6
network.unit.bootstrap.seedlist0 = http://yacy.dyndns.org:1519/www/seed.txt
network.unit.update.location0 = http://yacy.net/index.html
network.unit.update.location1 = http://latest.yacy.de
network.unit.protocol.control = uncontrolled
network.unit.access.whitelist = 10\..*,127.*,172.(1[6-9]|2[0-9]|3[0-1])\..*,169.254.*,192.168.*,localhost
network.unit.access.blacklist =

@ -4,7 +4,7 @@
# general network definition
network.unit.name = webportal
network.unit.description = Personal Web Portal
network.unit.description = Personal Web Search Portal
network.unit.domain = global
network.unit.search.time = 4
network.unit.dht = false

@ -1,4 +1,4 @@
defaults/yacy.network.freeworld.unit
defaults/yacy.network.webportal.unit
defaults/yacy.network.intranet.unit
defaults/yacy.network.oanet.unit
defaults/yacy.network.allip.unit

@ -168,7 +168,7 @@ public class yacysearch {
int itemsPerPage = Math.min((authenticated) ? (snippetFetchStrategy.isAllowedToFetchOnline() ? 100 : 1000) : (snippetFetchStrategy.isAllowedToFetchOnline() ? 10 : 100), post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative
int offset = (newsearch) ? 0 : post.getInt("startRecord", post.getInt("offset", 0));
boolean global = post.get("resource", "local").equals("global");
boolean global = post.get("resource", "local").equals("global") && sb.peers.sizeConnected() > 0;
final boolean indexof = (post != null && post.get("indexof","").equals("on"));
String urlmask = null;

@ -362,8 +362,8 @@ public final class CrawlStacker {
//boolean local = hostAddress.isSiteLocalAddress() || hostAddress.isLoopbackAddress();
//assert local == yacyURL.isLocalDomain(url.hash()); // TODO: remove the dnsResolve above!
return (local) ?
("the host '" + host + "' is local, but local addresses are not accepted") :
("the host '" + host + "' is global, but global addresses are not accepted");
("the host '" + host + "' is local, but local addresses are not accepted: " + Domains.dnsResolve(host).getHostAddress()) :
("the host '" + host + "' is global, but global addresses are not accepted: " + Domains.dnsResolve(host).getHostAddress());
}
public String urlInAcceptedDomainHash(final byte[] urlhash) {

@ -108,10 +108,10 @@ public final class SearchEvent {
this.IAneardhthash = null;
this.localSearchThread = null;
this.order = new ReferenceOrder(query.ranking, query.targetlang);
boolean remote = (query.domType == QueryParams.SEARCHDOM_GLOBALDHT) || (query.domType == QueryParams.SEARCHDOM_CLUSTERALL);
if (remote && peers.sizeConnected() == 0) remote = false;
final long start = System.currentTimeMillis();
if ((query.domType == QueryParams.SEARCHDOM_GLOBALDHT) ||
(query.domType == QueryParams.SEARCHDOM_CLUSTERALL)) {
if (remote) {
final int fetchpeers = 12;
// initialize a ranking process that is the target for data

@ -405,6 +405,7 @@ public final class yacy {
server.terminate(false);
server.interrupt();
server.close();
/*
if (server.isAlive()) try {
// TODO only send request, don't read response (cause server is already down resulting in error)
final DigestURI u = new DigestURI((server.withSSL()?"https":"http")+"://localhost:" + serverCore.getPortNr(port), null);
@ -413,6 +414,7 @@ public final class yacy {
} catch (final IOException ee) {
Log.logConfig("SHUTDOWN", "termination signal to server socket missed (server shutdown, ok)");
}
*/
Client.closeAllConnections();
MultiThreadedHttpConnectionManager.shutdownAll();

Loading…
Cancel
Save