git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=http://localhost:8080/
|
@ -0,0 +1,35 @@
|
||||
yacyInit.sh - start/stop script
|
||||
provided by Matthias Kempka, 26.12.2004
|
||||
|
||||
INSTALLATION:
|
||||
This installation is tested on Debian systems. It is likely that other
|
||||
distributions have other paths.
|
||||
|
||||
1. copy yacyInit.sh (the init skript) to /etc/init.d
|
||||
2. edit /etc/init.d/yacyInit.sh and set the variables
|
||||
DAEMON_DIR - the installation directory of yacy (the direcory
|
||||
where the file startYACY.sh is).
|
||||
USER - the user whose rights the proxy should have. This should not
|
||||
be root. The user must have write access to DAEMON_DIR.
|
||||
PATH - The default path should be ok for most systems. Ensure that java is
|
||||
in the path, though.
|
||||
3. Link /etc/init.d in the runlevel-directories, these are the
|
||||
directories where the scripts reside that are called when entering
|
||||
a runlevel. On Debian systems, these are /etc/rc0.d, /etc/rc1.d and
|
||||
so on. I.e., as root issue the following commands. Note, that these
|
||||
settings are ok for Debian systems and most likely have to be
|
||||
adapted to work on other systems. Please write to lists@mkempka.de
|
||||
for comments on that.
|
||||
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc0.d/K05yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc1.d/K05yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc2.d/S95yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc3.d/S95yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc4.d/S95yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc5.d/S95yacyInit.sh
|
||||
ln -s /etc/init.d/yacyInit.sh /etc/rc6.d/K05yacyInit.sh
|
||||
|
||||
|
||||
TODO:
|
||||
- find log possibility when starting via the start-skript
|
||||
- create concept which user should start yacy
|
@ -0,0 +1,78 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# init script for the HTTP Proxy: yacy
|
||||
#
|
||||
# Provided by Matthias Kempka, 26.12.2004
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/local/bin:/usr/bin #ensure java is in the path
|
||||
DAEMON_DIR=/opt/yacy #installation directory
|
||||
USER=yacy #set to the user whose rights the proxy will gain
|
||||
|
||||
|
||||
CLASSPATH=$DAEMON_DIR/classes
|
||||
DAEMON=$DAEMON_DIR/startYACY.sh
|
||||
NAME="yacy"
|
||||
DESC="Yacy HTTP Proxy"
|
||||
PID_FILE=/var/run/$NAME.pid
|
||||
|
||||
# Don't run if not installed
|
||||
test -f $DAEMON || exit 0
|
||||
|
||||
JAVA=$(which java)
|
||||
|
||||
if [ -f $PID_FILE ]; then
|
||||
pid=$(cat "$PID_FILE")
|
||||
pidno=$( ps ax | grep "$pid" | awk '{ print $1 }' | grep "$pid" )
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -n "$pidno" ]; then
|
||||
echo "already running"
|
||||
exit 0
|
||||
fi
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --background --make-pidfile --chuid $USER\
|
||||
--pidfile $PID_FILE --startas $JAVA\
|
||||
-- -classpath $CLASSPATH yacy $DAEMON_DIR
|
||||
echo "$NAME."
|
||||
;;
|
||||
|
||||
stop)
|
||||
if [ -n "$pidno" ]; then
|
||||
echo -n "Stopping $DESC: "
|
||||
cd $DAEMON_DIR
|
||||
./stopYACY.sh
|
||||
timeout=20
|
||||
while [ -n "$pidno" ]
|
||||
do
|
||||
let timeout=$timeout-1
|
||||
if [ $timeout -eq 0 ]; then
|
||||
start-stop-daemon --stop --pidfile $PID_FILE --oknodo
|
||||
break
|
||||
fi
|
||||
echo -n "."
|
||||
sleep 1
|
||||
pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid )
|
||||
done
|
||||
echo "$NAME."
|
||||
cd -
|
||||
exit 0
|
||||
fi
|
||||
echo "not running."
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/yacyInit.sh
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Contact</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Contact</h2>
|
||||
|
||||
<p>YACY was developed and implemented by Michael Christen.
|
||||
<p>You can hire me for professional consultancy, customizations or integrations, not only for the proxy, but also for a broad range of skills in professional enterprise technology. I am specialized on Network Architecture/Security and on Billing Systems in the telecommunication market. If you like to have further information about my professional work, please ask for a CV.
|
||||
<p>Any feed-back is welcome!
|
||||
<p>Please email me at <img src="grafics/mcemailh.gif">. Please be specific in the subject, so that I can distiguish your mail from the many spam mails I get every day.
|
||||
<p><FONT SIZE="1"><i>The email-address presented here is not clickable and shown as an image to prevent that spam-senders can scan and parse the web page for address retrieval. Please re-type the address in your email application.</i></FONT>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Demonstration of Search Interface</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Online Demo</h2>
|
||||
|
||||
<p>Since YACY is a web-application, you can test it also online!
|
||||
There are currently a few well-known public installations of YACY that you can use to test the search functions.
|
||||
You will see there a lot of 'locked' menu's that you can only use if you are the peer-owner.
|
||||
However, the search function is public.</p>
|
||||
<p><b>Please respect the search results as a pure proof-of-concept.</b> It's upon <b>you</b> to further enhance the search results by participation in the network with your own peer.</p>
|
||||
<p>If you use any of the following search peers you must agree that the responsibility for the content of the web pages that these peers find does not belong to the peer-owner but belong to the owner of the web server where any found pages are stored.</p>
|
||||
|
||||
<p>Pick one of the following links:
|
||||
<ul>
|
||||
<li><a href="http://yacy.dyndns.org:8000"><b>Michael Christen's Root Peer (Frankfurt, Germany)</b></a></li>
|
||||
<li><a href="http://www.suma-lab.de:8080"><b>The Search-Engine Lab of the SuMa-eV (Hannover, Germany)</b></a></li>
|
||||
<li><a href="http://4o4.dyndns.org:8080/"><b>4o4's Peer (Brunswick, Germany)</b></a></li>
|
||||
<li><a href="http://yacy.guerrier.info/"><b>Olivier Guerrier's Peer (France)</b></a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY Proxy: details</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
YACY supports the following features:<br>
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Built-in Indexing and Search Engine</b></td><td>
|
||||
The proxy 'scrapes' the content that it passes and creates an index that can be shared between every YACY Proxy daemons.
|
||||
You can use the indexing feature for intranet indexing:
|
||||
you instantly have a search service at hand to index all intranet-served web pages.
|
||||
You don't need to set up a separated search service. And the used <a href="http://www.anomic.de/AnomicPlasma/index.html">PLASMA</a>
|
||||
indexing is not a naive quick-hack but an <a href="Technology.html">properly engineered and extremely fast algorithm</a>;
|
||||
it is capable of indexing a nearly unlimited number of pages, without slowing down the search process.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>p2p-Based Global Search Engine</b></td><td>
|
||||
The proxy contains an index-sharing p2p-based algorithm which creates a global distributed search engine.
|
||||
This spawns a world-wide global search index.
|
||||
The current release is a minimum implementation of this concept and shall prove it's functionality.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Caching HTTP and transparent HTTPS Proxy</b></td><td>
|
||||
With optional pre-fetching. HTTP 1.1 with GET/HEAD/POST/CONNECT is supported. This is sufficient for nearly all public web pages.
|
||||
HTTP headers are transparently forwarded. HTTPS connections through target port 443 are transparently forwarded, non-443 connections are suppressed to enhance security. Both (HTTP and HTTPS) proxies share the same proxy port, which is by default port 8080.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Privacy</b></td><td>
|
||||
The proxy protects your privacy, even with index sharing switched on. Please see the
|
||||
<a href="Technology.html">privacy secion in the documentation.</a>;
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Security</b></td><td>
|
||||
The proxy can block unwanted access by setting IP filters and http passwords.
|
||||
You can also enhance security by inspecting the source code, which is completely included.
|
||||
Check the code and re-build your own proxy.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Web/HTTP server</b></td><td>
|
||||
The built-in HTTP server is the interface to the local and global search service;
|
||||
the server may not only be used to administrate the proxy, but also to serve as an intranet/internet web server.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Ideal Internet Cafe Proxy Solution</b></td><td>
|
||||
Every Internet Cafe needs a caching proxy instead only a NAT to route the cafe's client traffic from the internet to maximize bandwidth.
|
||||
This can only be done using a <i>caching</i> proxy. This is naturally provided by the YACY Proxy. Future versions may also include
|
||||
billing support functions.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Terminal-Based</b></td><td>
|
||||
the proxy does not need to have a window-based environment and can run on a screen-less router; therefore you may run the proxy on your already existing servers, whatever they are since YACY Proxy is written in java and will run also on your platform.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Open-Source</b></td><td>
|
||||
This is a simple necessity for an application that implements a server.
|
||||
Don't use any other server software that does not come with the source code.
|
||||
<a href="Volunteers.html">Volunteers</a> to extent the proxy are welcome!
|
||||
If you think you have a great idea how to extend/enhance/fix the proxy, please let me know.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Easy Installation</b></td><td>
|
||||
You just need to decompress the release containter with your favourite decompressor (zip, rar, sit, tar etc. will do)
|
||||
and double-click the application wrapper for your OS. No restart necessary.
|
||||
Just double-click the application wrapper.
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Licence Model</b></td><td width="70%">
|
||||
This is GPL-based freeware/open-source software! The release comes with complete source code. See <a href="License.html">the license</a> for details.
|
||||
If you like the software, you <a href="Contact.html">may like to hire me<a> for professional consultancy, customizations or integrations.
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,78 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Download</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YaCy HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YaCy Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Download</h2>
|
||||
|
||||
<p>A first alpha version is available. Please consider that the application may behave not yet really performant, nor always correct. The basic functionality is available, but may contain bugs. Please see also the releases' 'wishlist.txt' with the list of all not-yet implemented features and known bugs.
|
||||
<p>download steps:</p><br>
|
||||
|
||||
<h3>1st Step: Agree With License</h3>
|
||||
<p>If you download the software, you must agree to the applications GPL-based <a href="License.html">license</a>.</p><br>
|
||||
|
||||
<h3>2nd Step: Install Java</h3>
|
||||
<p>To run YaCy, you need an installation and/or support for Java2.
|
||||
You can <a href="http://java.sun.com/j2se/1.4.2/download.html">download the Java Runtime Environment "JRE"</a> from the <a href="http://java.sun.com">Sun Microsystems Java Page</a></p><br>
|
||||
|
||||
<h3>3rd Step: Download YaCy</h3>
|
||||
<p>The Release comes in different flavours: a general one with application wrappers for Unix/Linux, Macintosh OS X and Windows, and a specialized Windows version with Windows installer. Please choose from either one.
|
||||
</p>
|
||||
|
||||
<p><font size="+1"><b>Latest Release:</b>
|
||||
The latest YaCy-release is 0.36. Download <a href="/yacy/release/yacy_v0.36_20050326.tar.gz"><font size="+1">YaCy 0.36</font></a> here.
|
||||
</font></p>
|
||||
|
||||
<p><table bgcolor="#EEEEEE" width="100%"><tr><td>
|
||||
<fieldset><legend><b>All current and historic releases:</b></legend>
|
||||
<font size="1">Please use one of the latest release for production.</font><br>
|
||||
<object classid="f" data="/cgi-bin/sitexplorer.cgi?/yacy/release/" type="text/html" width="100%" height="160" border="2">
|
||||
</object></fieldset></td></tr></table></p><br>
|
||||
|
||||
|
||||
<h3>4th Step: Proceed With Installation</h3>
|
||||
<p>Please go to the <a href="Installation.html">installation page</a>.
|
||||
<b>If you upgrade from a previous version of YaCy, please migrate your data</b>
|
||||
(simply move the DATA directory to your new application directory).</p><br>
|
||||
|
||||
<h3>Final Step: Your Contribution is Appreciated</h3>
|
||||
<p>Open-Source/Freeware needs your contribution!<ul></ul>
|
||||
Even if you are a non-programmer or first-time user of this software, <b>you</b> can help to
|
||||
<ul>
|
||||
<li>improve and extend functionality,</li>
|
||||
<li>security,</li>
|
||||
<li>ease-of-use and
|
||||
<li>usability</li>
|
||||
</ul>
|
||||
of this distribution by
|
||||
<ul>
|
||||
<li>giving feed-back,</li>
|
||||
<li>report bugs,</li>
|
||||
<li>suggest new functions or</li>
|
||||
<li>even get your hands on the source code or documentation.</li>
|
||||
</ul><br>
|
||||
When you find a bug, please help to further improve the application by sending me a bug-report.
|
||||
The report should describe a complete set of actions that are necessary to reproduce the error.
|
||||
Please contact me <a href="Contact.html">here</a>. Thank you!</p>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,168 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: FAQ</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>FAQ</h2>
|
||||
|
||||
<p>YACY is not only a distributed search engine, but also a caching HTTP proxy.
|
||||
Both application parts benefit from each other.</p>
|
||||
|
||||
|
||||
<h3>Why is this Search Engine also a Proxy?</h3>
|
||||
<p>
|
||||
We wanted to avoid that you start a search service ony for that very time when you submit a search query.
|
||||
This would give the Search Engine too less online time.
|
||||
So we looked for a cause the you would like to run the Search Engine during all the time that you are online.
|
||||
By giving you the surplus value of a caching proxy, the reason was found.
|
||||
The already built-in blacklist for the proxy is another surplus value.
|
||||
</p>
|
||||
|
||||
<h3>Why is this Proxy also a Search Engine?</h3>
|
||||
<p>YACY has a built-in <i>caching</i> proxy, which means that YACY has a lot of indexig information
|
||||
'for free' without crawling. This may not be a very usual function of a proxy, but a very useful one:
|
||||
you see a lot of information when you browse the internet and maybe you would like to search exactly
|
||||
only what you have seen. Beside this interesting feature, you can use YACY to index an intranet
|
||||
simply by using the proxy; you don't need to additionally set up another search/indexing process
|
||||
and maybe also of databases. YACY gives you an 'instant' database and an 'instant' search service.</p>
|
||||
|
||||
<h3>Can I Crawl The Web With YACY?</h3>
|
||||
<p>Yes! You can start your own crawl and trigger also distributed crawling, which means that your peer asks other peers to perform specific crawl tasks. You can specify many parameters that focus your crawl to a limited set of web pages.</p>
|
||||
|
||||
<h3>What do you mean with 'Global Search Engine'?</h3>
|
||||
<p>The integrated indexing and search service can not only be used localy, but also <i>globaly</i>.
|
||||
Every proxy distributes some contact information to all other proxies that can be reached in the internet,
|
||||
and proxies exchange <i>but do not copy</i> their indexes to each other.
|
||||
This is done in such a way, that every <i>peer</i> knows how to address the correct other
|
||||
<i>peer</i> to retrieve a special search index.
|
||||
Therefore the community of all proxies spawn a <i>distributed hash table</i> (DHT)
|
||||
which is used to share the <i>reverse word index</i> (RWI) to all operators and users of the proxies.
|
||||
The applied logic of distribution and retrieval of RWI's on the DHT combines all participating proxies to
|
||||
a <i>Distributed Search Engine</i>.
|
||||
To point out that this is in contrast to local indexing and searching,
|
||||
we call it a <i>Global Search Engine</i>.
|
||||
</p>
|
||||
|
||||
<h3>Is there a central server? Does the search engine network need one?</h3>
|
||||
<p>No. The network architecture does not need a central server, and there is none.
|
||||
In fact there is a root server which is the 'first' peer, but any other peer has the same rights and tasks to perform.
|
||||
We still distinguish three different <i>classes</i> of peers:
|
||||
<ul>
|
||||
<li><i>junior</i> peers are peers that cannot be reached from the internet because of routing problems or firewall settings;</li>
|
||||
<li><i>senior</i> peers can be accessed by other peers and</li>
|
||||
<li><i>principal</i> peers are like senior but can also upload network bootstrap information to ftp/http sites; this is necessary for the network bootstraping.</li>
|
||||
</ul>
|
||||
Junior peers can contribute to the network by submitting index files to senior/principal peers without beeing asked. (This function is currently very limited)
|
||||
</p>
|
||||
|
||||
<h3>Search Engines need a lot of terabytes of space, don't they? How much space do I need on my machine?</h3>
|
||||
<p>The global index is <i>shared</i>, but not <i>copied</i> to the peers.
|
||||
If you run YACY, you need an average of the same space for the index as you need for the cache.
|
||||
In fact, the global space for the index may reach the space of Terabytes, but not all of that on your machine!</p>
|
||||
|
||||
<h3>Search Engines must do crawling, don't they? Do you?</h3>
|
||||
<p>No. They <i>can</i> do, but we collect information by simply using the information that passes the proxy.
|
||||
If you <i>want</i> to crawl, you can do so and start your own crawl job with a certain search depth.</p>
|
||||
|
||||
<h3>Does this proxy with search engine create much traffic?</h3>
|
||||
<p>No, it may create <i>less</i>. Because it does not need to do crawling, you don't have additional traffic.
|
||||
In contrast, the proxy does <i>caching</i> which means that double-load of known pages is avoided and this possibly
|
||||
speeds up your internet connection. Index sharing makes some traffic, but is only performed during idle-time of the proxy and of your internet usage.</p>
|
||||
|
||||
<h3>Full-text indexing threads on my machine? This will slow down my internet browsing too much.</h3>
|
||||
<p>No, it does not, because indexing is only performed when the proxy is idle. This shifts the computing time to the moment when you read pages and you don't need computing time. Indexing is stopped automatically the next time you retrieve web pages through the proxy.</p>
|
||||
|
||||
<h3>Do I need a fast machine? Search Engines need big server farms, don't they?</h3>
|
||||
<p>You don't need a fast machine to run YACY. You also don't need a lot of space. You can configure the amount of Megabytes that you want to spend for the cache and the index. Any time-critical task is delayed automatically and takes place when you are idle surfing. Whenever internet pages pass the proxy, any indexing (or if wanted: prefetch-crawling) is interrupted and delayed. The root server runs on a simple 500 MHz/20 GB Linux system. You don't need more.</p>
|
||||
|
||||
<h3>Does the caching procedure slow down or delay my internet usage?</h3>
|
||||
<p>No. Any file that passes the proxy is <i>streamed</i> through the filter and caching process. At a certain point the information stream is duplicated; one copy is streamed to your browser, the other one to the cache. The files that pass the proxy are not delayed because they are <i>not</i> first stored and then passed to you, but streamed at the same time to you as it is streamed to the cache. Therefore your browser can do layout-while-loading as it would do without the proxy.</p>
|
||||
|
||||
<h3>How can you ensure actuality of the search results?</h3>
|
||||
<p>Nobody can. How can a 'normal' search engine ensure this? By doing 'brute force crawling'?
|
||||
We have a better solution for acuality: browsing results of all people who run YACY.
|
||||
Many people prefer to look at news pages every day, and by passing through the proxy the latest news also arrive in the distributed search engine.
|
||||
This may take place possibly faster than it happens with a normal/crawling search engine.
|
||||
And the search results reflect the 'general demand' of information, because it is the average of all contributors.</p>
|
||||
|
||||
<h3>I don't want to wait for search results much time. How much time takes a search?</h3>
|
||||
<p>Our architecture does not do peer-hopping, we also don't have a TTL (time to live). We expect that search results are <i>instantly</i> responded to the requester.
|
||||
This can be done by asking the index-owning peer <i>directly</i> which is in fact possible by using DHT's (distributed hash tables).
|
||||
Because we need some redundancy to catch up missing peers, we ask several peers simultanously. To collect their respond, we wait a little time of at most 10 seconds.
|
||||
The user may configure a search time different than 10 seconds, but this is our target of <i>maximum</i> search time.</p>
|
||||
|
||||
<h3>I am scared about the fact that the browsing results are distributed. What about privacy?</h3>
|
||||
<p>Don't be scared. We have an architecture that hides your private browsing profile from others. For example: no-one of the words that are indexed from
|
||||
the pages you have seen is stored in clear text on your computer. Instead, a hash is used which can not be computed back into the original word. Because
|
||||
Index files travel along peers you cannot state if a specific link was visited by you or another peer-user, so this frees you from beeing responsible
|
||||
about the index files on your machine.</p>
|
||||
|
||||
<h3>Do I need to set up and run a separate database?</h3>
|
||||
<p>No. YACY contains it's own database engine, which does not need any extra set-up or configuration.</p>
|
||||
|
||||
<h3>What kind of database do you use? Is it fast enough?</h3>
|
||||
<p>The database stores either tables or property-lists in filed AVL-Trees. These are height-regulated binary trees.
|
||||
Such a search tree ensures a logarithmic order of computation time. For example a search within an AVL tree with one million entries needs
|
||||
an average of 20 comparisments, and at most 24 in the worst case. This database is therefore extremely fast. It lacks an API like
|
||||
SQL or the LDAP protocol, but it does not need one because it provides a highly specialized database structure.
|
||||
The missing interface pays off with a very small organization overhead, which improves the speed further in comparisment with other databases
|
||||
with SQL or LDAP api's. This database is fast enough
|
||||
for millions of indexed web pages, maybe also for billions. The speed is sufficient for billions of pages, but not the file organization
|
||||
structure at the moment, because the tree-files would become too big. We will provide a solution at the time we need such big tables.</p>
|
||||
|
||||
<h3>Why do you use your own database? Why not use mySQL or openLDAP?</h3>
|
||||
<p>The database structure we need is very special. One demand is that the entries can be retrieved in logarithmic time <i>and</i> can be
|
||||
enumerated in any order. Enumeration in a specific order is needed to create conjunctions of tables very fast. This is needed when someone
|
||||
searches for several words. We implement the search word conjunction by pairwise and simultanous enumeration/comparisment of index trees/sequences.
|
||||
This forces us to use binary trees as data structure. Another demand is that we need the ability to have many index tables, maybe <i>millions
|
||||
of tables</i>. The size of the tables may be not big in average, but we need many of them. This is in contrast of the organization of
|
||||
relational databases, where the focus is on management of very large tables, but not of many of them. A third demand is the ease of
|
||||
installation and maintenance: the user shall not be forced to install a RBMS first, care about tablespaces and such. The integrated
|
||||
database is completely service-free.</p>
|
||||
|
||||
<h3>What does Senior Mode mean? What is Junior Mode?</h3>
|
||||
<p><i>Junior</i> peers are such peers that cannot be reached from other peers, while <i>Senior</i> peers can be contacted.
|
||||
If your peer has global access, it runs in Senior Mode. If it is hidden from others, it is in Junior Mode.
|
||||
If your peer is in Senior Mode, it is an access point for index sharing and distribution. It can be contacted for search requests and it collects index files
|
||||
from other peers. If your peer is in Junior Mode, it collects index files from your browsing and distributes them only to other Senior peers, but does not collect index files.
|
||||
</p>
|
||||
|
||||
<h3>Why should I run my proxy in Senior Mode?</h3>
|
||||
<p>Some p2p-based file sharing software assign non-contributing peers very low priority. We think that that this is not always fair since sometimes the operator
|
||||
does not always has the choice of opening the firewall or configuring the router accordingly. Our idea of 'information wares' and their exchange can also be
|
||||
applied to junior peers: they must contribute to the global index by submitting their index <i>actively</i>, while senior peers contribute <i>passively</i>.
|
||||
Therefore we don't need to give junior peers low priority: they contribute equally, so they may participate equally.
|
||||
But enough senior peers are needed to make this architecture functional.
|
||||
Since any peer contributes almost equally, either actively or passively, you should
|
||||
decide to run in Senior Mode if you can.
|
||||
</p>
|
||||
|
||||
<h3>My proxy says it runs in 'Junior Mode'. How can I run it in Senior Mode?</h3>
|
||||
<p>Open your firewall for port 8080 (or the port you configured) or program your router to act as a <i>virtual server</i>.</p>
|
||||
|
||||
<h3>How can I help?</h3>
|
||||
<p>First of all: run YACY in senior mode. This helps to enrich the global index and to make YACY more attractive.
|
||||
If you want to add your own code, you are welcome; but please contact the author first and discuss your idea to see how it may fit into the overall architecture.
|
||||
You can help a lot by simply giving us feed-back or telling us about new ideas. You can also help by telling other people about this software.
|
||||
And if you find an error or you see an exception, we welcome your defect report. Any feed-back is welcome.</p>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Impressum</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="Anomic Appliances and Consulting Impressum">
|
||||
<meta name="description" content="Anomic Impressum">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<script LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></script>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Impressum</h2>
|
||||
|
||||
<p>
|
||||
Dipl. Inf. Michael Christen<br>
|
||||
Finkenhofstrasse 9<br>
|
||||
60322 Frankfurt am Main<br>
|
||||
Germany<br>
|
||||
E-Mail: <img src="grafics/mcemailh.gif"><br>
|
||||
</p>
|
||||
<p>
|
||||
Trotz sorgfältiger inhaltlicher Kontrolle übernehme ich
|
||||
keine Haftung für die Inhalte externer Links.
|
||||
Für den Inhalt der verlinkten Seiten sind ausschliesslich
|
||||
deren Betreiber verantwortlich.
|
||||
Ich weise darauf hin, das eine Benutzung der angegebenen <a href="Demo.html">Demo-Peers</a> nur unter Beachtung der <a href="License.html">YaCy Applikationslizenz</a> erlaubt ist. Falls sie die Demo-Peers zur Web-Suche benutzen wollen, so ist dies nur zur Recherche von legalem Inhalt erlaubt. Die Verantwortung für den Inhalt der durch eine YaCy-Suche gefundene Webseite liegt nicht beim Betreiber des Such-Peers, sondern beim Betreiber der jeweiligen gefundenen Webseite; sie dürfen eine nicht von ihnen vorgenommene YaCy-Installation nur dann benutzen, wenn sie akzeptieren das der Peer-Betreiber nicht die Verantwortung für die verlinkten Webseiten übernimmt.
|
||||
</p>
|
||||
</font>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<script LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Installation</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Installation and Start-up of YACY</h2>
|
||||
|
||||
|
||||
<p>Since we provide YACY as a generic release for all operation systems and a special 'flavour' for Windows users, we distinguish two different processes for installation. Windows users may want to <a href="#wininst">switch to the Windows installation instructions</a>, however, the following description is more general and applies to all operation systems:
|
||||
|
||||
<h3><a name="geninst"></a>General Instructions:</h3>
|
||||
|
||||
<p>Please follow these steps:</p>
|
||||
<p><table border="0" cellspacing="1" cellpadding="5" width="100%">
|
||||
<tr><td width="30%" valign="top"><b>1st Step:<br>de-compress the release</b></td><td width="70%">
|
||||
<p>After <a href="http://www.yacy.net/yacy/Download.html">downloading</a>
|
||||
the latest release, simply decompress the archive with your favourite tool
|
||||
(which can be WinRar or WinZip on Windows, or Stuffit Expander on Mac OS X; Linux
|
||||
users type 'gunzip <release>.tar.gz' and 'tar -xf <release>.tar') and move the result to any place you want.</p>
|
||||
<p>If you upgrade from a previous version of YACY, <b>please migrate your settings and data</b>.
|
||||
This is very easy: simply move (not copy) your DATA directory from the application root directory of the old YACY installation to the new application root directory. If done so, you don't need to do the other remaining configuration steps below again.</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>2nd Step:<br>Configure Network Settings</b></td><td width="70%">
|
||||
<p>Change the proxy settings either in your network configuration or directly in you browser. Check the 'Use HTTP Proxy' flag and configure the IP and port according to the location of the proxy. If you do a single-user installation without changing the configuration in #2, the IP/Host shall be set to '127.0.0.1' or 'localhost', and the Port shall be set to '8080'.</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>3rd Step:<br>Start YACY</b></td><td width="70%">
|
||||
<p>We supply some wrapper shell scripts to start the java processes:
|
||||
<ul>
|
||||
<li>on a MS-Windows system, double-click the file 'startYACY.bat'</li>
|
||||
<li>on a Mac OS X system, double-click the file 'startYACY.command'</li>
|
||||
<li>on a Linux system, start the file 'startYACY.sh'</li>
|
||||
</ul>
|
||||
</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>4th Step:<br>Administrate the proxy</b></td><td width="70%">
|
||||
<p>After you started YACY, terminal-window will come up.
|
||||
That's the application; no windows, no user interface.
|
||||
You can now access YACY's administration interface by browsing to<br>
|
||||
<a href="http://localhost:8080"><tt>http://localhost:8080</tt></a><br>
|
||||
See the 'Settings' menu: you should set an administration password and checkt the access rules.
|
||||
The default settings are fine, so please change them only if you know what they mean.
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>5th Step:<br>Use YACY and it's search service</b></td><td width="70%">
|
||||
<p>Browse the internet using your web-browser. You should notice that your actions take effect as cache fill/cache hit log's in the httpProxy's terminal window. Whenever you vistited a page through the proxy, the page is indexed and can be search using the search page at
|
||||
<a href="http://localhost:8080"><tt>http://localhost:8080</tt></a>.
|
||||
Please be aware that if your settings allow to access the http-server, then anybode else can also search your index as well. If you don't want this, you must set the 'IP-Number filter' of the 'Server Access Settings' in the 'Settings' menu to a string that applies to you local network scheme, like
|
||||
'localhost,127.0.0.1,192.168*,10*', which should be fine in most cases.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></p>
|
||||
|
||||
<h3><a name="wininst"></a>Instructions for Windows and the Internet Explorer</h3>
|
||||
|
||||
<p><table border="0" cellspacing="1" cellpadding="5" width="100%">
|
||||
<tr><td width="30%" valign="top"><b>1st Step:<br>Run Installer</b></td><td width="70%">
|
||||
<p>The Windows release comes with it's own Installer in a single file. Just double-click the Installer file.</p>
|
||||
<p>If you upgrade from a previous version of YACY, <b>please migrate your settings and data</b>.
|
||||
This is very easy: simply move (not copy) your DATA directory from the application root directory of the old proxy installation
|
||||
to the new application root directory. If done so, you don't need to do the other remaining configuration steps below again.</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>2nd Step:<br>Configure Browser</b></td><td width="70%">
|
||||
<p>In your Internet Explorer, open 'Extras' -> 'Internet Options':<br>
|
||||
<img src="grafics/TutorialDWin1.gif"></p>
|
||||
<p>Select 'Connections':<br>
|
||||
<img src="grafics/TutorialDWin2.gif"></p>
|
||||
<p>Click on 'Settings' of the 'LAN-Settings', even if you are using a dial-up connection:<br>
|
||||
<img src="grafics/TutorialDWin3.gif"></p>
|
||||
<p>Check the 'Proxyserver' check-box:<br>
|
||||
<img src="grafics/TutorialDWin4.gif"></p>
|
||||
<p>Enter the location of YACY server. If YACY runs on the same machine as the Browser, set 'localhost'. If you have not changed the initial configuration, the port is '8080'. Check the 'No Proxy for local addess' button. Then hit 'Extended':
|
||||
<img src="grafics/TutorialDWin5.gif"></p>
|
||||
<p>Un-check the 'Use the same server for all protocols' - button. Then remove the proxy setting from 'FTP', 'Gopher' and 'Socks'. In the 'Exceptions' field, enter 'localhost;192.168;10':
|
||||
<img src="grafics/TutorialDWin6.gif"></p>
|
||||
<p>Close all windows by clicking on 'Ok'</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>3rd Step:<br>Start YACY</b></td><td width="70%">
|
||||
<p>The installer creates a link to the application on the desktop. Just double-click the 'YACY Console' icon.</p>
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>4th Step:<br>Administrate YACY</b></td><td width="70%">
|
||||
<p>After you started YACY, terminal-window will come up.
|
||||
That's the application; no windows, no user interface.
|
||||
You can now access YACY's administration interface by browsing to<br>
|
||||
<a href="http://localhost:8080"><tt>http://localhost:8080</tt></a><br>
|
||||
See the 'Settings' menu: you should set an administration password and checkt the access rules.
|
||||
The default settings are fine, so please change them only if you know what they mean.
|
||||
</td></tr>
|
||||
<tr><td width="30%" valign="top"><b>5th Step:<br>Use YACY and it's search service<br></b></td><td width="70%">
|
||||
<p>Browse the internet using your web-browser. You should notice that your actions take effect as cache fill/cache hit log's in the httpProxy's terminal window. Whenever you vistited a page through the proxy, the page is indexed and can be search using the search page at
|
||||
<a href="http://localhost:8080"><tt>http://localhost:8080</tt></a>.
|
||||
Please be aware that if your settings allow to access the http-server, then anybode else can also search your index as well. If you don't want this, you must set the 'IP-Number filter' of the 'Server Access Settings' in the 'Settings' menu to a string that applies to you local network scheme, like
|
||||
'localhost,127.0.0.1,192.168*,10*', which should be fine in most cases.
|
||||
</p>
|
||||
</td></tr>
|
||||
</table></p>
|
||||
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: License</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>License</h2>
|
||||
|
||||
<p>The copyright for YaCy belongs to Michael Peter Christen; Frankfurt, Germany; <img src="grafics/mcemailh.gif">.
|
||||
<p>This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the <a href="http://www.gnu.org/licenses/gpl.txt">GNU General Public License</a> as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.</p>
|
||||
<p>This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.</p>
|
||||
<p>It is allowed to freely copy and distribute this software
|
||||
as long as it is mentioned in connection with a link to the Anomic home page "http://www.anomic.de", or the YaCy home page "http://www.yacy.net".
|
||||
You are allowed to use this software for any legal purpose, private or commercial.</p>
|
||||
<p>You agree that Anomic/YaCy Software and the author(s) is/are not responsible for cost, loss of data or any harm that
|
||||
may be caused by usage of this softare or this documentation. The usage of this software is on your own
|
||||
risk. The installation and usage (starting/running) of this software may allow other people or application
|
||||
to access your computer and any attached devices and is highly dependent on the configuration of the software
|
||||
which must be done by the user of the software; Anomic/YaCy Software and the author(s) is/are also not responsible
|
||||
for proper configuration and usage of the software, even if provoked by documentation provided together with
|
||||
the software.</p>
|
||||
<p> This software is provided as-is, including possible bugs, errors, misbehaviours,
|
||||
failures, crashes, destructive effects to your software, data or system.
|
||||
Users and administrators of this software use and operate it on their own risk.</p>
|
||||
<p>Attention: YaCy is a content provider for a peer-to-peer based index sharing
|
||||
and distribution network. It's purpose is to provide a world-wide global search index.
|
||||
This application generates and distributes an index of files that passes the proxy and of files that are generated by web crawling, and crawling jobs that can be requested by other YaCy installations.
|
||||
If you run the application you must agree that this software distributes automatically certain information about your system and network configuration and it also distributes index files that are created from the internet content that passed your system.
|
||||
You must also agree that your system receives index transmissions from other peers and that your system is used by other peers to load internet content, index it and passes it again back to other peers.
|
||||
The author(s) of YaCy cannot guarantee that a misuse of the index passing procedure, causing harm to your system or privacy or causing illegal content or harmfull behavior to other internet servers, can be avoided; the author(s) take no responsibility for such cases; you must agree that you take complete responsibility for such case.
|
||||
You must agree that you take complete responsibility about the information that is stored on your system, even if this information was passed to you from other YaCy-peers without notification.
|
||||
You must also agree that you are responsible to protect any users of your search peer against the use of your peer to index/search for illegal content; your local law applies.
|
||||
You are not allowed to use this software to create or search for any information that is banned or illegal in your country.
|
||||
If you want to search for illegal information, you are not allowed to use this software in any way, neither using it as private installation nor using any other available YaCy search peer as source for such information.
|
||||
</p>
|
||||
|
||||
<p>If you like to make changes to the software, you may do it. But if you re-distribute
|
||||
the software you must maintain the original copyright notice including this complete license statement.</p>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Related Links</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YaCy HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YaCy Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Links</h2>
|
||||
|
||||
<p>Information related to YaCy and search engine / p2p technology</p><br>
|
||||
|
||||
<p>Other YaCy Project Sites
|
||||
<ul>
|
||||
<li><a href="http://www.suma-lab.de/yacy/"><b>German documentation</b></a> - from Alexander Schier</li>
|
||||
<li><a href="http://www.lmtm.de:33333/www/">another <b>German description</b></a> - from Andreas Rittershofer</li>
|
||||
<li><a href="http://www.yacy-forum.de"><b>Deutsches Forum</b></a></li>
|
||||
<li><a href="http://sourceforge.net/forum/?group_id=116142"><b>English Forum</b></a></li>
|
||||
<li><a href="http://freshmeat.net/projects/yacyproxy/"><b>YaCy at fresmeat.net</b></a> - Project Announcement Page (please click here to support the project and enhance Rating/Popularity)</li>
|
||||
<li><a href="http://sourceforge.net/projects/yacy/"><b>YaCy at sourceforge.net</b></a> - Project Services; Forum and (in the future) CVS Hosting.</li>
|
||||
</ul></p><br>
|
||||
|
||||
<p>Publications about YaCy
|
||||
<ul>
|
||||
<li>News-Feed on <a href="http://www.golem.de/0502/36260.html">golem.de</a></li>
|
||||
<li>Report and Interview on <a href="http://www.netzkritik.de/art/288.shtml">netzkritik.de</a></li>
|
||||
<li>Cited as <b>world-wide unique proof-of-concept for a distributed p2p search engine</b>
|
||||
in the German issue of the MIT's Magazine of Innovation <a href="http://www.technologyreview.de"><b>Technology Review</b></a> in an <a href="http://suma-ev.de/tech-rev1.html">article by Wolfgang Sander-Beuermann</a>; issue 02/2005, page 29</li>
|
||||
<li>Article in the german computer magazine <a href="http://www.heise.de/ct/inhalt.shtml"><b>c't</b></a> 2/2005, page 40: "<b>Suchmaschine sucht Tauschpartner</b>"</li>
|
||||
<li><a href="http://suma-ev.de/downloads/yacy-haz.pdf"><b>"Jedermanns Suchmaschine"</b> (german)</a> - press release in the <a href="http://www.haz.de">Hannoversche Allgemeine Zeitung</a>; issue #289, Dec 9th 2004, page 23</li>
|
||||
</ul></p><br>
|
||||
|
||||
<p>Partner Sites
|
||||
<ul>
|
||||
<li><a href="http://www.suma-lab.de"><b>The SuMa-Lab</b> (german)</a> - Project Server of the German Search-Engine association <a href="http://www.suma-ev.de/">SuMa-eV</a></li>
|
||||
</ul></p><br>
|
||||
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,577 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: News</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>News</h2>
|
||||
|
||||
<p>This is essentially the release change-log. We have a <a href="roadmap.txt">release roadmap</a> and releases published here will (hopefully) match the milestones from the roadmap's vision.
|
||||
|
||||
<p>Release list in reverse order:
|
||||
|
||||
<!--
|
||||
<br><p>
|
||||
<ul>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
|
||||
<br><p>v0.36_build20050326
|
||||
<ul>
|
||||
<li>Enhanced thread control and added performance menu: this can be used to steer scheduling tasks and for profiling.</li>
|
||||
<li>Enhanced search result ranking.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.35_build20050306
|
||||
<ul>
|
||||
|
||||
<li>new Features</li>
|
||||
<ul>
|
||||
<li>new user-profile management and remote access of profiles through the network-page</li>
|
||||
<li>new cookie-monitor. Will be used to manage cookie-filter</li>
|
||||
<li>new template engine and re-design of many administration pages as preparation for upcoming localization</li>
|
||||
<li>now permanent storage of passive peers</li>
|
||||
<li>enabled switch-of of proxy-cache</li>
|
||||
<li>new proxy-indexing monitor and moved proxy-indexing configuration to that new page</li>
|
||||
<li>more functions to DHT-management:</li>
|
||||
<ul>
|
||||
<li>remote indexing tagets now selected by DHT rule</li>
|
||||
<li>remote search now selects hierarchically with DHT-rule</li>
|
||||
</ul>
|
||||
<li>enhanced access control to YaCy administration</li>
|
||||
<ul>
|
||||
<li>passwords are now encoded to MD5-Hashes before stored to httpProxy.conf</li>
|
||||
<li>brute-force password-hack prevention by additional delay's</li>
|
||||
<li>added new 'steering' servlets for automated processes that need authorization</li>
|
||||
</ul>
|
||||
<li>re-design</li>
|
||||
<ul>
|
||||
<li>re-designed main menu: new sub-menu for proxy functions</li>
|
||||
<li>re-design of Network Monitor page</li>
|
||||
<li>re-design of seed database management and implementation of seed-action interface</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<li>fixed bugs:</li>
|
||||
<ul>
|
||||
<li>fixed a bug with cache-control</li>
|
||||
<li>fixed a bug with peer-list uploading</li>
|
||||
<li>fixed a bug that provoked indexing of YaCy's own web pages</li>
|
||||
<li>fixed a bug that prevented loading of some web pages: (JavaScript bug) doublequote/singlequote mixture removed</li>
|
||||
<li>better binary-check on files before indexing</li>
|
||||
<li>fixed misbehavior of Network-Page: re-design of enumeration method and auto-heal function in kelondroTree</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<br><p>v0.34_build20050208
|
||||
<ul>
|
||||
<li>Remote transmission of index (RWI) information to other peers with correct DHT position</li>
|
||||
<ul>
|
||||
<li>implemented two new yacy-protocol - commands: yacy/transferRWI and yacy/transferURL for RWI partition transfer</li>
|
||||
<li>selection of DHT positions and selection of correct RWI partitions for transmission</li>
|
||||
<li>performing full flush of index if peer is running in junior mode: now these juniors can contribute to the global index.</li>
|
||||
<li>default full receive of index transmission in senior peers; these peers will currently not transfer indexes. This is a test configuration and senior2senior RWI transmission will be enabled in future releases.</li>
|
||||
<li>Configuration flags (grant/do not grant) in 'Index Control' menu.</li>
|
||||
</ul>
|
||||
<li>Enhanced remote search</li>
|
||||
<ul>
|
||||
<li>selelction of less result values: less traffic, faster response.</li>
|
||||
<li>pre-sorting of results in remote peers before transmission: better results</li>
|
||||
</ul>
|
||||
<li>more properties in seeds</li>
|
||||
<ul>
|
||||
<li>Flags for "accept remote crawls" and "accept remote indexes"</li>
|
||||
<li>Flags for "grant index distribution" and "grant index receive"</li>
|
||||
<li>Control values for received/send RWI/URL</li>
|
||||
<li>All flag values are shown on Network page</li>
|
||||
</ul>
|
||||
<li>Bug-fixes:</li>
|
||||
<ul>
|
||||
<li>no re-set of remote crawl delay after re-connect</li>
|
||||
<li>proxy fail (shows white pages) fixed: better timeout value</li>
|
||||
<li>local indexing = off did not work, fixed.</li>
|
||||
<li>auto-heal of seed.db - fail</li>
|
||||
<li>many minor bug fixed</li>
|
||||
</ul>
|
||||
<li>new <a href="http://www.yacy-forum.de">german forum at http://www.yacy-forum.de</a>, provided by Roland Ramthun</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.33_build20050107
|
||||
<ul>
|
||||
<li>Support for Stop-Words; default stopwords are included; stopwords are excluded for indexing and in search query results</li>
|
||||
<li>Skin support</li>
|
||||
<li>New start/stop-script for unix/linux daemon init process</li>
|
||||
<li>File-Share entries can now have description entries</li>
|
||||
<li>Enhanced File-Sharing Menu</li>
|
||||
<ul>
|
||||
<li>Every entry can have a comment attached</li>
|
||||
<li>Comments or picture preview visible in file list</li>
|
||||
<li>File name and comment field can be indexed and globaly searched</li>
|
||||
<li>Files found with search interface are dynamically linked to the actual IP of the peer hosting the file</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.32_build20041221
|
||||
<ul>
|
||||
<li>New Crawling-Profiles for Crawl-Threads
|
||||
<ul>
|
||||
<li>every crawl start now defines it's own crawl job; new crawls do not interfere with previously started and still running jobs; all started jobs may run concurrently</li>
|
||||
<li>new crawl properties: accept url's containing '?'; flag for storage of pages in proxy cache; flags for local and remote indexing</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>New Design, new documentation, new mascot 'Kaskelix' (appears on search page), new home page location <a href="http://www.yacy.net/yacy">http://www.yacy.net/yacy</a></li>
|
||||
<li>Promotion-String on search page</li>
|
||||
<li>New shutdown-trigger (no more file polling, new stop scripts)</li>
|
||||
<li>Principal-peer gaining after file generation</li>
|
||||
<li>New 'Log'-menu: view the application log on the web interface</li>
|
||||
<li>Bug-fixes
|
||||
<ul>
|
||||
<li>Termination process should succeed now.</li>
|
||||
<li>Cross-Site-Scripting bug removed</li>
|
||||
<li>Removed deadlock occurred during concurrent crawl job starts</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<br><p>v0.31_build20041209
|
||||
<ul>
|
||||
<li>Integrated url filter for crawl jobs (Index Creation - page) and search requests (Search Page).</li>
|
||||
<li>Removed a bug that caused sudden termination when a not-valid url was crawled.</li>
|
||||
<li>Massively enhanced indexing speed by implementation of an additional word index cache.</li>
|
||||
<li>Added button to delete/empty the crawl url stack.</li>
|
||||
<li>Many minor changes.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.30_build20041125
|
||||
<ul>
|
||||
<li>Implemented Remote Crawling
|
||||
<ul>
|
||||
<li>Every Senior and Principal Peer may now start Remote Crawls: The initiating peer starts with the crawl and may assign URL's to qualified other peers. Those peers load the assigned resource, index them and return the index statistics back to the initiator. Executing peer may only be a Senior or Principal peer.</li>
|
||||
<li>Extended URL management: URL's are now organized in three different sets: Noticed-URL's (not loaded but possibly queued for crawling), Error-URL's (not loaded but may be re-loaded to avoid index loss in case of temporary target server downtime or network problems) and Loaded-URL's. The Loaded-URL's are again divided into six categories:</li>
|
||||
<ol>
|
||||
<li>remote index: retrieved by other peers</li>
|
||||
<li>partly remote/local index: result of search queries</li>
|
||||
<li>partly remote/local index: result of index transfer (to be implemented soon)</li>
|
||||
<li>local index: result of proxy fetch/prefetch</li>
|
||||
<li>local index: result of local crawling</li>
|
||||
<li>local index: result of remote crawling requests</li>
|
||||
</ol>
|
||||
<li>New monitoring pages: Local Index Monitor for results of LURL's (see above), cases 1-5 and the Global Index Monitor for case 6. Because the results of global crawls are not personal to the peer owner, the monitor page is not protected.</li>
|
||||
<li>Options to allow or disallow remote crawling; either as initiating or executing peer.</li>
|
||||
<li>Idle/Due-Time - management for each peer: to organize remote-crawl load-balancing, a delay time is used to schedule remote crawls. The seed management was extended to store and maintain these delay times.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Proxy Performance Enhancements
|
||||
<ul>
|
||||
<li>changed+enhanced caching algorithm; re-implemented routines</li>
|
||||
<li>process enhancements in httpc and httpd classes</li>
|
||||
<li>gzip-load mode in httpc fixed</li>
|
||||
<li>removed DNS bottleneck (the java DNS blocks while accessed simultanously)</li>
|
||||
<li>integrated DNS-prefetch</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Implemented Shut-Down Procedure
|
||||
<ul>
|
||||
<li>Integrated notifier procedure in all threads.</li>
|
||||
<li>The application now creates a file 'yacyProxy.control' after start-up.</li>
|
||||
<li>To stop the yacyProxy, remove the control file.</li>
|
||||
<li>Integrated a 'Shutdown' - button on the 'Status'-page which also triggers shut-down</li>
|
||||
<li>After shut-down is initiated the application first processes all scheduled crawling- and indexing tasks which may last some minutes in the worst case.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Removed bugs
|
||||
<ul>
|
||||
<li>URL normalization</li>
|
||||
<li>many minor bugs</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<br><p>v0.29_build20041022
|
||||
<ul>
|
||||
<li>New option to start explicit crawling jobs: a start url and a crawling depth
|
||||
(differently from the prefetch depth) can be set.</li>
|
||||
<li>Integrated monitoring interface for prefetch/crawling activities.
|
||||
The user can now observe the crawling and indexing activity in detail.
|
||||
There is also a report page that lists all newly indexed pages with the option
|
||||
to delete these indexes again. The interface also reports the initiator
|
||||
of the crawling/indexing tasks which can be currently either the prefetch mechanism
|
||||
or explicit crawling requests. In future releases the initiator may also refer to
|
||||
remote crawling requests.
|
||||
</li>
|
||||
<li>New caching procedure for database requests on file-system level.
|
||||
</li>
|
||||
<li>Extended blacklist url matching: parts of a domain may now be matched with wildcards '*'. (the url's path may be matched with regular expressions)</li>
|
||||
<li>The application will be re-named. Many parts now refer to the new application name 'yacy', but not all.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.28_build20041001
|
||||
<ul>
|
||||
<li>Search results are now searched again for characteristic word patterns.
|
||||
The patterns are statistically evaluated and are used to generate
|
||||
"search associations",
|
||||
shown as hints for further combined search.
|
||||
</li>
|
||||
<li>Parallelized peer propagation process. This results in very rapid bootstraping.
|
||||
</li>
|
||||
<li>Integrated new 'score' library for rapid element sorting - used for search
|
||||
patterns and rapid bootstraping. May help in future releases to speed up indexing.
|
||||
</li>
|
||||
<li>Minor bug-fixes.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.27_build20040924
|
||||
<ul>
|
||||
<li>Bug fix in remote search result preparation.</li>
|
||||
<li>Speed enhancements on search client when doing remote search.</li>
|
||||
<li>Small changes in file sharing interface.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.26_build20040916
|
||||
<ul>
|
||||
<li>Introduced new 'virtual' TLD (top-level-domain) '.yacy' that the proxy resolves into the peers IP and port numbers:</li>
|
||||
<ul>
|
||||
<li>Every yacy-peer can now be contacted using the peer's name as domain name:
|
||||
Proxies users can obtain any other proxy-hosted pages using the url 'http://<peer-name>.yacy'.</li>
|
||||
<li>Implemented sub-level domains for yacy TLD's: they are matched to subdirectories of the peer's individual web root HTDOCS. (see below)</li>
|
||||
</ul>
|
||||
<li>Support for individual web pages:</li>
|
||||
<ul>
|
||||
<li>Every proxy host can serve it's individual web page. We implemented two paths for each server: one default path pointing to <application-root>/htroot for administrative pages and an alternative path for individual use at <application-root>/DATA/HTDOCS.</li>
|
||||
<li>The individual web pages may be accessed either using the new '.yacy' TLD's through another proxy, or optionaly by using the peer's IP:port address. The recommended default address of a proxy is 'http://www.<peer-name>.yacy', which is mapped to <application-root>/DATA/HTDOCS/www/. </li>
|
||||
<li>Integrated an upload/download interface for individial web pages: additional accounts for uploaders and downloaders ensure appropriate authorization. The file-sharing web space can be browsed with an directory servlet. A default sub-domain is assigned to 'http://share.[peer-name].yacy', which is mapped into <application-root>/DATA/HTDOCS/share/.</li>
|
||||
<li>Web clients not using the proxy may contact the new individual default subdomains using the URLs http://<peer-IP>:<peer-port>/www/ and http://<peer-IP>:<peer-port>/share/.
|
||||
</ul>
|
||||
<li>Several Bug-fixes:</li>
|
||||
<ul>
|
||||
<li>Date bug appearing when accessing the proxy httpd with the proxy.</li>
|
||||
<li>Additional Time-out catch-up at httpc when a file is submitted without length tag. Also extended general retrieve - time.out.</li>
|
||||
<li>Terminal line restriction of 1000 bytes was too tight (cookies may have 4kb length).</li>
|
||||
<li>Introduced global general time measurement for peer synchronization and balanced hello - round-robin.</li>
|
||||
</ul>
|
||||
<li>Enhanced proxy-proxy - mode: 'no-proxy' settings as list of patterns to exceptional dis-allow usage of remote proxies.</li>
|
||||
<li>Implemented multiple default-paths for urls pointing to directories.</li>
|
||||
<li>Re-design of front-end menu structure.</li>
|
||||
<li>Integrated Interface for principal configuration in Settings page</li>
|
||||
<li>Re-named the release: integrated YACY name to emphasize that the proxy is mutating into the YACY Search Engine Node</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.25_build20040822
|
||||
<ul>
|
||||
<li>New Index Administration Menu Item: RWI's (Reverse Word Indexes) may now be inspected.
|
||||
Each reference in a word index can be displayed in detail, and optionally be deleted.</li>
|
||||
<li>Minor bug fixes in Bootstraping. Major Bug fixes in Index Storage (better Normal Form of URL's).</li>
|
||||
<li>Better display of cache content in the Cache Administration.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.24_build20040816
|
||||
<ul>
|
||||
<li>New 'Cache' Menu item: The proxy cache can now be inspected. It shows a directory list with http response headers and content to each file in the proxy cache.</li>
|
||||
<li>Faster Bootstraping: The connection policy was changed: as long as the proxy status is 'virgin', the most recent known connection is used for bootstraping; then later the least recent for peer distribution.</li>
|
||||
<li>Better Formatting in Network Menu.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.23_build20040808
|
||||
<ul>
|
||||
<li>Blacklists now provide management of several lists and more import options.</li>
|
||||
<li>code cleanup + many minor bugs</li>
|
||||
<ul>
|
||||
<li>Messages now work (corrected POST implementation, this also cleaned the way to index distribution); improved message sending, displaying etc.</li>
|
||||
<li>double links / unchecked '#', headlines wrong</li>
|
||||
<li>httpd-speedup (no more temporary files, template prefetch without double-load)</li>
|
||||
<li>much better Bootstraping and more intelligent yacy-peer updating</li>
|
||||
<li>auto-migration of new settings from httpProxy.init</li>
|
||||
<li>much better logging; extensive log configuration options for all parts of the application now in httpProxy.init</li>
|
||||
<li>better search requesting (more results)</li>
|
||||
<li>yacy protocol may now also use other proxies in proxy-proxy-mode</li>
|
||||
</ul>
|
||||
<li>more documentation</li>
|
||||
<ul>
|
||||
<li>permanent demo-page at yacy.net/home.html with wiki</li>
|
||||
<li>new FAQ at http://www.yacy.net/yacy/FAQ.html</li>
|
||||
<li>first step to move YACY to new home http://sourceforge.net/projects/yacy/</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.22_build20040711
|
||||
<ul>
|
||||
<li>More security bug fixes (dementia accountia, '..' usage in server path, server blacklist too tight for local clients)</li>
|
||||
<li>Another advance in better peer distribution and recognition (distinguishes between 'real' disconnected peers and 'hearsay' disconnected peers. Keeps track of online time. No preferences of principal peers in link distribution)</li>
|
||||
<li>An option to switch the peer to online mode without using the proxy. This makes life much easier for newbie's.</li>
|
||||
<li>A new message function. Within the Network page, one can hit the 'm' and may then send a message to the other peer. The owner of that
|
||||
peer can read the message in his/her private message inbox. This function is only in alpha statdium; it works only in rare cases and
|
||||
we don't know why. Only for testing.</li>
|
||||
<li>Cleaned up the mess of different database and configuration files. All run-time data is now accumulated in the new folder 'DATA'. If you previously generated an index and want to migrate, you simply need to put your old PLASMADB folder into the new DATA folder.</li>
|
||||
<li>Clean up of the source mess and partition of them into separate packages</li>
|
||||
<li>Some design enhancements of the online interface</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.21_build20040627
|
||||
<p>After an announcement on freshmeat.net we got many hits in the newly build p2p-network. We learned from the p2p-propagation behavior and
|
||||
implemented a lot of new routines to stabilize the YACY network.
|
||||
<ul>
|
||||
<li>Better peer analysis, statistics, propagation/distribution (more properties and bug fixes).</li>
|
||||
<li>No more JavaScript in online Interface. New template logic for httpd and new online interface look-and-feel, using the new features.</li>
|
||||
<li>New FAQ in documentation.</li>
|
||||
<li>Protection against hacker and virus attacks: new self-configuring client-IP blocking in serverCore.java</li>
|
||||
<li>More information and warnings about security settings to the operator to protect the own peer</li>
|
||||
<li>Network statistics and monitor shows status of remote peers and the distributed index</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.20_build20040614
|
||||
<p>The first step into the p2p-world: introduction the YACY (yet another cyberspace) p2p network propagation and information wares distribution system. YACY enables in this release a rudimentary index exchange so that you can use YACY to bootstrap a world-wide distributed search engine.</p>
|
||||
<ul>
|
||||
<li>Added status page on web interface and automatic opening of web browser on status page. Can be switched off on the satus page.</li>
|
||||
<li>Implemented still missing element removal and AVL balancing for element insterts in the kelondro database. This ensures logarithmic efforts on database access, which influences the proxy and the search service. Now only AVL balancing after removal must be implented, but it's missing is not critical.</li>
|
||||
<li>Added blacklist enhancements and web interface for blacklist editing from Alexander Schier.</li>
|
||||
<li>More and better documentation.</li>
|
||||
<li>Many minor bug fixes, i.e. non-cacheabilty of web interface, exception catch-up on startup when proxy is used before coloured lists are loaded.</li>
|
||||
<li>First p2p elements implemented: every peer on startup looks for other peers and announces it's own startup. The function does not yet actively implement an index exchange, but can repond to remote index queries.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.16_build20040503
|
||||
<p>This release is a major step to make the proxy enterprise-ready: we introduced several security mechanism and access
|
||||
restrictions for the proxy and the server. Every security setting can be configured through a web page. Thanks to the new
|
||||
HTTPS proxy, the proxy can now be considered as 'complete'.
|
||||
<ul>
|
||||
<li>implemented a HTTPS proxy, sharing the same proxy port with http;
|
||||
this does not help for more/better indexing since the SSL data is simply passed through.
|
||||
But we can now state to be a 'full' http and https proxy, usable in enterprise environments and internet cafe's.</li>
|
||||
<li>two security layers for web server and proxy access: implemented Client-IP - filtering, which adds a virtual Firewall to
|
||||
the application. Every client that does not match the client-IP-filter is blocked. The second layer is a PROXY password
|
||||
protection. All attributes can be configured through a new web page at http://localhost:8080 (standard configuration).</li>
|
||||
<li>to protect the configuration pages of the web server, we introduced a password protection for special pages on the web server.
|
||||
Every page that ends with '_p.html' has a protection; the corresponding account can also be set through the local web server.
|
||||
Users shall be encouraged to set this administration account first.</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.15_build20040318
|
||||
<ul>
|
||||
<li>Extensive code re-engineering</li>
|
||||
<ul>
|
||||
<li>Inserted and further generalized the proxy's genericServer into the AnomicFTPD project. After further enhancements within that project,
|
||||
it was re-inserted in the HTTPProxy. The Switchboard interface now belongs to the genericServer, which is now called the serverCore.</li>
|
||||
<li>Removed the old html parser and replaced it by the new htmlFilter library, which now parses the html files during reading from
|
||||
the remote server. Real-time parsing during streaming html pages is done extremely fast and does not slow down file passing through
|
||||
the proxy. The new htmlFile provides a filter interface, which is now used to filter out content that is defined by keywords.
|
||||
Currently the bluelist 'httpProxy.blue' is used to define these words.</li>
|
||||
<li>Re-engineered the crawler interface and implemented a crawler. Since the crawler does not work in all cases, it is still
|
||||
disabled in this release. You can switch it on by setting the prefetchDepth in the configuration file httpProxy.init</li>
|
||||
</ul>
|
||||
<li>Implemented a 304 response. This speeds up all responses in the case of a cache hit combined with a conditional request.
|
||||
Since this combination is fairly common, it noticeable speeds up the proxy.</li>
|
||||
<li>New documentation design</li>
|
||||
<li>New Search Page design</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<br><p>v0.14-build20040213
|
||||
<ul>
|
||||
<li>More Structure to the whole system to lay the basis for the Crawler</li>
|
||||
<ul>
|
||||
<li>The new structure will distinguish between the <i>httpd</i> with it's servlets, the file-servlet and proxy-servlet;
|
||||
the <i>crawler</i> which also holds responsibility for the http cache that is used by the http proxy and the <i>indexing</i>
|
||||
engine 'PLASMA', which is again accessed by the http file server. But even with the crawler concept on board here, we still don't have prefetch now.</li>
|
||||
<li>Moved plasmaTextProvider to httpCrawlerScraper, httpdProxyCache to httpCrawlerCache and httpdSwitchboard to httpCrawlerSwitchboard</li>
|
||||
<li>New configuration value proxyCacheSize: limits the memory amount of the cache; if the cache exceeds this value the oldest entries are deleted</li>
|
||||
</ul>
|
||||
<li>Bug fixes:</li>
|
||||
<ul>
|
||||
<li>Found and eliminated nasty bug that prevented using yahoo mail. (they send several cookies at once)</li>
|
||||
<li>No more indexing of url's with 'cgi' in name or ending with '.js', '.ico', or '.css' (checking content-type for 'text' is not enough; some servers do not transfer right value)</li>
|
||||
<li>Fixed search for words containing numbers and german Umlaute</li>
|
||||
<li>adopted acrypt.java to no using javax.crypt, this was not supported by debian blackdown java 1.3.1. Furthermore, removed -server - flag from httpProxy.sh, that also made blackdown to crash. (you probably want to insert that flag again in your installation)</li>
|
||||
</ul>
|
||||
<li>The proxy can now be configured to access another proxy</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.13-build20040210
|
||||
<ul>
|
||||
<li>Bug fixes:</li>
|
||||
<ul>
|
||||
<li>removed forced unzipping for special cases: either if the file to be transported is 'naturally' in gzip format (.gz, .tgz and .zip) or if zipping would not make sense because it would not yield any compression, as for images. Now the 'Accept-Encoding', created by the browser and send to the server has omitted gzip attributes in this cases. This should lead to less overhead (no gzip en/de-coding) and thus to more speed.</li>
|
||||
<li>now transport of httpc failure response body (especially 404; seemed to be unneccesary, but is not)</li>
|
||||
<li>search result bug (mixed up appearence) removed</li>
|
||||
</ul>
|
||||
<li>Performance and structure enhancements:</li>
|
||||
<ul>
|
||||
<li>Extended database capabilities to hold content of dynamic size; new files kelondroRA.java, kelondroAbstractRA.java, kelondroFileRA.java, kelondroDyn.java</li>
|
||||
<li>Used new database features to store the response header information for all files in the cache into one database file. This saves 50% of the number of files in the cache (no more need for the .header - files)</li>
|
||||
<li>Implemented a scheduling that moved the time of cache creation into an proxy-idle - time. This reduces the file operation on a single user system by 50% during web page retrievement.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.12-build20040204
|
||||
<ul>
|
||||
<li>now a <a href="roadmap.txt">release roadmap</a> exists</li>
|
||||
<li>enhanced proxy and caching:</li>
|
||||
<ul>
|
||||
<li>integrated blacklist 'httpProxy.black' idea and data from Alexander Schier: forced 404 response for blacklisted hosts. This can be used to 'switch off' specific domains, especially AGIS servers. Can also be used for child protection/parental control. Does not filter content!</li>
|
||||
<li>cache write bug if same file and directory name is used (can be done in URL, but not in cache file system) removed. </li>
|
||||
<li>detailed 404 debugging response in case of failure</li>
|
||||
<li>new config value maxSessions for limit the number of concurrent connections to the proxy</li>
|
||||
<li>Host property bug in httpc for HTTP/1.1 servers removed: now better access to more servers</li>
|
||||
</ul>
|
||||
<li>enhanced indexing and searching:</li>
|
||||
<ul>
|
||||
<li>implemented rudimentary ranking and ordering of search results either by quality or by date</li>
|
||||
<li>implemented bluelist 'httpProxy.blue': filtering of all blue-listed words in search expression, result-url and result-description</li>
|
||||
<li>bugfix for combined search, fixed date attached to search results</li>
|
||||
</ul>
|
||||
<li>first contact with <a href="http://gnugle.sourceforge.net">Gnugle</a> project and knowledge exchange</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.11-build20040124
|
||||
<ul>
|
||||
<li>non-empty field servlet bug in index.java</li>
|
||||
<li>greatly enhanced indexing</li>
|
||||
<ul>
|
||||
<li>better structure: new classes plasmaIndexEntry, plasmaSearch, plasmaIndex, plasmaIndexCache, plasmaURL</li>
|
||||
<li>index entry caching and transparent flushing implemented</li>
|
||||
</ul>
|
||||
<li>catch-up of sleeping connections, enhanced idle check in genericServer.java</li>
|
||||
</ul>
|
||||
|
||||
<br><p>v0.1-build20040119
|
||||
<ul>
|
||||
<li>first time published on www.anomic.de!</li>
|
||||
<li>client user agent forwarding according to 'yellow'-list</li>
|
||||
<li>plasma database</li>
|
||||
<ul>
|
||||
<li>new database sub-path DATABASE</li>
|
||||
<li>new file kelondroRecords.java + kelondroTree.java</li>
|
||||
<li>plasmaStore now saves and retrieves transparently urls in the kelondro database</li>
|
||||
<li>no more XSUMP path, was not necessary for condenser; url attributes will be stored in new DB</li>
|
||||
<li>indexing implemented; still imperformant since that needs caching (later)</li>
|
||||
<li>rudimentary index access through new web page index.html and servlet index.java</li>
|
||||
</ul>
|
||||
<li>better client timeout -> better idle check -> no job queue blocking</li>
|
||||
<li>new interface genericServerHandler.java</li>
|
||||
</ul>
|
||||
|
||||
<br><p>build20040110
|
||||
<ul>
|
||||
<li>blackboard as global configuration set for all threads with global function scheduler</li>
|
||||
<ul>
|
||||
<li>new files httpdSwitchboard.java and plasmaSwitchboard with job control and global config</li>
|
||||
<li>new file plasmaStore.java</li>
|
||||
<li>the plasma blackboard saves its data into plasmaBlackboard.conf</li>
|
||||
<li>cgi control over blackboard (try http://proxy/test.html)</li>
|
||||
<li>new test file HTROOT/switchboard.[html,java]; try http://proxy/switchboard.html</li>
|
||||
</ul>
|
||||
<li>condensement on cache (indexing pre-process)</li>
|
||||
<li>renamed file htmlParser to plasmaTextProvider</li>
|
||||
<li>new file plasmaCondenser.java</li>
|
||||
<li>test output of word list per page</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>build20040107
|
||||
<ul>
|
||||
<li>better/more configuration</li>
|
||||
<ul>
|
||||
<li>moved httpd.conf to httpProxy.conf</li>
|
||||
<li>new loglevel attribute for server and proxy in httpProxy.conf</li>
|
||||
<li>new clientTimeout attribute for client-proxy connections in httpProxy.conf</li>
|
||||
</ul>
|
||||
<li>advanced cache-control</li>
|
||||
<ul>
|
||||
<li>transparent gunzip upon loading of gzip-encoded streams in httpc, all cache files are now unzipped</li>
|
||||
<li>much better cache control, according to RFC standards and recommendations, really usable now</li>
|
||||
</ul>
|
||||
<li>implemented scheduler</li>
|
||||
<ul>
|
||||
<li>idle check in genericServer as scheduler trigger</li>
|
||||
<li>new experimental scheduler in httpProxy for new cache arrivals</li>
|
||||
<li>added acrypt.java for different encoding tools</li>
|
||||
<li>added htmlParser.java and implemented scheduled parsing of selected html resources</li>
|
||||
<li>a subdirectory XSUMP is now filled with to-be-indexed text files</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>build20040105
|
||||
<ul>
|
||||
<li>advanced header transport transparency</li>
|
||||
<ul>
|
||||
<li>added CaseInsensitiveMap.java, a TreeMap with case-insensitive comparator</li>
|
||||
<li>management of reverse mapping of header symbols</li>
|
||||
<li>better handling of cookies (the yahoo-bug was attacked, but still not eliminated)</li>
|
||||
</ul>
|
||||
<li>advanced error case behavior</li>
|
||||
<ul>
|
||||
<li>implemented 404 response when server or files unreachable</li>
|
||||
<li>fixed behavior when file download is interrupted and broken file is in cache</li>
|
||||
<li>fixed session termination bug</li>
|
||||
</ul>
|
||||
<li>advanced cache behavior</li>
|
||||
<ul>
|
||||
<li>fixed loading of stale files from cache in some cases</li>
|
||||
<li>203 response instead 200 for files that come from cache</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>build20031229
|
||||
<ul>
|
||||
<li>minor bugs ("#!/bin/sh" in shell scripts; +%Y instead +%y; 755, 644 acc rigths)</li>
|
||||
<li>major changes in caching load/transport</li>
|
||||
<li>added wishlist.txt</li>
|
||||
<li>added changelog.txt</li>
|
||||
<li>implemented automatic webinterface access if no host given</li>
|
||||
<ul>
|
||||
<li>extended httpd.java to access FileServlets from httpdFileServlet.java</li>
|
||||
</ul>
|
||||
<li>file servlet with examples, parameter hand-over via get and post, text and multipart</li>
|
||||
<ul>
|
||||
<li>added GPL lib 'Template.java' from JavaBY Template Engine from Alexey Popov</li>
|
||||
<li>made changes in Template.java</li>
|
||||
<li>added httpdFileServlet.java and classProvider.java to implement template-based CGI file serving</li>
|
||||
<li>added subdir HTROOT with example files test.{java,http}</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<br><p>build20031218
|
||||
<ul>
|
||||
<li>first public release of YACY as AnomicHTTPProxy_20031218.tar.gz</li>
|
||||
<li>basic httpd proxy functions only</li>
|
||||
<li>first alpha-tester Alexander</li>
|
||||
</ul>
|
||||
|
||||
<br><p>build20031215
|
||||
<ul>
|
||||
<li>first public announcement of project idea on<br>
|
||||
<a href="http://www.heise.de/newsticker/foren/go.shtml?read=1&msg_id=4744034&forum_id=50682">
|
||||
<font size="1">http://www.heise.de/newsticker/foren/go.shtml?read=1&msg_id=4744034&forum_id=50682</font>
|
||||
</a><br>
|
||||
by Michael Christen</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Platforms</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Supported Platforms</h2>
|
||||
|
||||
<p>
|
||||
|
||||
<p><table border="0" cellspacing="1" cellpadding="1" width="100%">
|
||||
<tr><td colspan="2" width="100%" valign="top"><hr></td></tr>
|
||||
<tr><td width="30%" valign="top"><center><b>Any Java2 System</b></center></td><td width="70%">
|
||||
<p>YACY is written entirely in Java (Version Java2 / 1.2 and up). Any system that supports Java2 can run YACY. That means it runs on almost any commercial and free platforms and operation systems that are around. This includes of course Mac OS X, Windows (NT, W2K, XP) and Linux systems. For java support of your platform, please see the <a href="Installation.html">installation</a> documentation.</p>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" width="100%" valign="top"><hr></td></tr>
|
||||
<tr><td width="30%" valign="top"><center><b>Windows</b><br><img src="grafics/startupWin.gif"></center></td><td width="70%">
|
||||
The Proxy runs seamless on any Windows System and comes with an easy-to-use installer application. Just install and use the proxy like any other Windows application. Please download the Windows Release Flavour of YACY instead the generic one.
|
||||
</td></tr>
|
||||
<tr><td colspan="2" width="100%" valign="top"><hr></td></tr>
|
||||
<tr><td width="30%" valign="top"><center><b>Mac OS X</b><br><img src="grafics/startupMac.gif"></center></td><td width="70%">
|
||||
The general distribution includes a Mac OS X wrapper shell, which is double-clickable. The application can be monitored and administrated through a web server that you can open with your Safari browser.
|
||||
</td></tr>
|
||||
<tr><td colspan="2" width="100%" valign="top"><hr></td></tr>
|
||||
<tr><td width="30%" valign="top"><center><b>Linux/Unix</b><br><img src="grafics/startupLinux.gif"></center></td><td width="70%">
|
||||
The proxy environment is terminal-based, not windows-based. You can start the proxy in a console, and monitor it's actions through a log file. A wrapper shell script for easy startup is included. You can administrate the proxy remotely through the built-in http server with any browser.
|
||||
</td></tr>
|
||||
<tr><td colspan="2" width="100%" valign="top"><hr></td></tr>
|
||||
</table></p>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Technology</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Technology</h2>
|
||||
|
||||
<p>YACY consists mainly of four parts: the <b>p2p index exchange</b> protocol, based on http; a <b>spider/indexer</b>; a <b>caching http proxy</b> which is not only a simple <i>surplus value</i> but also an <i>informtaion provider</i> for the indexing engine and the built-in <b>database engine</b> which makes installation and maintenance of yacy very easy.</p>
|
||||
<center><img src="grafics/architecture.gif"></center>
|
||||
<p>All parts of this architecture are included in the YACY distribution. The YACY search engine can be accessed through the built-in http server.</p>
|
||||
|
||||
|
||||
<p><h3>Algorithms</h3>
|
||||
|
||||
<p>For our software architecture we emphasize that always the approriate data structure and algorithm is used
|
||||
to ensure maximum performance. <b>The right combination of structure and algorithm results in an ideal
|
||||
order of computability which is the key to performant application design.</b> We reject the myth that
|
||||
the Java language is not appropriate for time-critical software; in contrast to that myth we
|
||||
believe that Java with it's clean and save-to-use dynamic data structures is most notably qualified
|
||||
to implement highly complex algorithms.</p>
|
||||
|
||||
<p><table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Transparent HTTP and HTTPS Proxy and Caching:</b></td><td width="70%">
|
||||
The proxy implementation provides a fast content-passing, since every file that the proxy reads from the targeted server is streamed directly to the accessing client while the stream is copied to a RAM cache for later processing. This ensures that the proxy mode is extremely fast and does not interrupt browsing. Whenever the Proxy idles, it processes it's RAM cache to perform indexing and storage to a local file of the cache. Every HTTP header that was passed along with the file is stored in a database and is re-used later on when a cache hit appears. The proxy function has maximum priority above other tasks, like cache management or indexing functions.
|
||||
</td></tr>
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Fast Database Implementation:</b></td><td width="70%">
|
||||
We implemented a file-based AVL tree upon a random-access-file. Tree nodes can be dynamically allocated and de-allocated and an unused-node list is maintained. For the PLASMA search algorithm, an ordered access to search results are necessary, therefore we needed an indexing mechanism which stores the index in an ordered way. The database supports such access, and the resulting database tables are stored as a single file. The database does not need any set-up or maintenance tasks that must done by an administrator. It is completely self-organizing. The AVL property ensures maximum performance in terms of algorithmic order. Any database may grow to an unthinkable number of records: with one billion records a database request needs a theoretical maximum number of only 44 comparisments.
|
||||
</td></tr>
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Sophisticated Page Indexing:</b></td><td width="70%">
|
||||
The page indexing is done by the creation of a 'reverse word index': every page is parsed, the words are extracted and for every word a database table is maintained. The database tables are held in a file-based hash-table, so accessing a word index is extremely fast, resulting in an extremely fast search. Conjunctions of search words are easily found, because the search results for each word is ordered and can be pairwise enumerated. In terms of computability: the order of the searched access efford to the word index for a single word is O(log <number of words in database>). It is always constant fast, since the data structure provides a 'pre-calculated' result. This means, the result speed is <i>independent</i> from the number of indexed pages! It only slows down for a page-ranking, and is multiplied by the number of words that are searched simultanously. That means, the search efford for n words is O(n * log w). You can't do better (consider that n is always small, since you rarely search for more that 10 words).
|
||||
</td></tr>
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Massive-Parallel Distributed Search Engine:</b></td><td width="70%">
|
||||
This technology is the driving force behind the YACY implementation. A DHT (Distributed Hash Table) - like technique will be used to publish the word cache. The idea is, that word indexes travel along the peers <i>before</i> a search request arrives at a specific word index. A search for a specific word would be performed by computing the peer and point <i>directly</i> to the peer, that hosts the index. No peer-hopping or such, since search requests are time-critical (the user usually does not want to wait long). Redundancy must be implemented as well, to catch up the (often) occasions of disappearing peers. Privacy is ensured, since no peer can know which word index is stored, updated or passed since word indexes are stored under a word hash, not the word itself. Search mis-use is regulated by the p2p-laws of give-and-take: every peer must contribute in the crawl/proxy-and-index - process before it is allowed to search.
|
||||
</td></tr>
|
||||
|
||||
</table></p>
|
||||
|
||||
<p><h3>Privacy</h3>
|
||||
Sharing the index to other users may concern you about your privacy. We have made great efforts to keep and secure your privacy:
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Private Index and Index Movement</b></td><td width="70%">
|
||||
Your local word index does not only contain information that you created by surfing the internet, but also entries from other peers.
|
||||
Word index files travel along the proxy peers to form a distributed hash table. Therefore nobody can argue that information that
|
||||
is provided by your peer was also retrieved by your peer and therefore by your personal use of the internet. In fact it is very unlikely that
|
||||
information that can be found on your peer was created by you, since the search process targets only peers where it is likely because
|
||||
of the movement of the index to form the distributed hash table. During a test phase, all word indexes on your peer will be accessible.
|
||||
The future production release will constraint searches to indexes entries on your peer that have been created by other peers, which will
|
||||
ensure complete browsing privacy.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Word Index Storage and Content Responsibility</b></td><td>
|
||||
The words that are stored in your local word index are stored using a word hash. That means that not any word is stored, but only the word hash.
|
||||
You cannot find any word that is indexed as clear text. You can also not re-translate the word hashes into the original word. This means that
|
||||
you don't know actually which words are stored in your system. The positive effect is, that you cannot be responsible for the words that
|
||||
are stored in your peer. But if you want to deny storage of specific words, you can put them into the 'bluelist' (in the file httpProxy.bluelist).
|
||||
No word that is in the bluelist can be stored, searched or even viewed through the proxy.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Peer Communication Encryption</b></td><td>
|
||||
Information that is passed from one peer to another is encoded. That means that no information like search words,
|
||||
indexed URL's or URL descriptions is transported in clear text. Network sniffers cannot see the content that is exchanged.
|
||||
We also implemented an encryption method, where a temporary key, created by the requesting peer is used to encrypt the response
|
||||
(not yet active in test release, but non-ascii/base64 - encoding is in place).
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Access Restrictions</b></td><td>
|
||||
The proxy contains a two-stage access control: IP filter check and an account/password gateway that can be configured to access the proxy.
|
||||
The default setting denies access to your proxy from the internet, but allowes usage from the intranet. The proxy and it's security settings
|
||||
can be configured using the built-in web server for service pages; the access to this service pages itself can also be restricted again by using
|
||||
an IP filter and an account/password combination.
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Volunteers</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<h2>Volunteers</h2>
|
||||
|
||||
<p>YACY's architecture with the PLASMA search engine and
|
||||
the P2P-based distributed index was developed and implemented by Michael Peter Christen.
|
||||
|
||||
<p>However, this project is just at the beginning and needs contributions from other developers, since there are many ideas how this project can move on to a broad range of users.
|
||||
|
||||
<p>There are also some long-term targets. If the index-sharing someday works fine, maybe the browser producer like Opera or Konqueror would like to use the p2p-se to index the browser's cache and therefore provide each user with an open-source, free search engine.
|
||||
|
||||
<p>At this time, some contributions already have been made. These are:
|
||||
<ul>
|
||||
<li><b>Alexander Schier</b> did much alpha-testing, gave valuable feed-back on my ideas and suggested his own. He suggested and implemented large parts of the popular blacklist feature. He supplied the 'Log'-menu function, the skin-feature, many minor changes, bug fixes and the Windows-Installer - version of yacy. Alex also provides and maintaines the <a href="http://www.suma-lab.de/yacy/">german documentation</a> for yacy.</li>
|
||||
<li><b>Natali Christen</b> contributed the YACY logo and the design of the Kaskelix mascot.</li>
|
||||
<li><b>Wolfgang Sander-Beuermann</b>, executive board member of the German search-engine association <a href="http://www.suma-ev.de/">SuMa-eV</a>
|
||||
and manager of the meta-search-engine <a href="http://www.metager.de">metaGer</a> provided <a href="http://www.suma-lab.de/yacy/">web-space for the german documentation</a> and computing resources for a <a href="http://www.suma-lab.de:8080">demo peer</a>. He also pushed the project by arranging promotional events.</li>
|
||||
<li><b>Timo Leise</b> suggested and implemented an extension to the blacklist feature: part-of-domain matching.</li>
|
||||
<li><b>Martin Schwarze</b> wrote a <a href="http://suma-ev.de/downloads/yacy-haz.pdf">artikel/press release "Jedermanns Suchmaschine" about the YACY Projekt</a>; published in the <a href="http://www.haz.de">Hannoversche Allgemeine Zeitung</a>.</li>
|
||||
<li><b>Matthias Kempka</b> provided a linux-init start/stop - script</li>
|
||||
</ul>
|
||||
|
||||
<p>Further volunteers are very welcome.
|
||||
Please <a href="Contact.html">contact</a> me if you have something that you are willing to do for this project. In any case: before you start something to do, please ask me in advance if I would like to integrate it later. Thank You!</p>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 423 B |
After Width: | Height: | Size: 729 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: a freeware caching HTTP Proxy in Java with integrated search engine</title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
||||
<!-- <meta name="Content-Language" content="German, Deutsch, de, at, ch"> -->
|
||||
<meta name="Content-Language" content="English, Englisch">
|
||||
<meta name="keywords" content="YACY HTTP Proxy search engine spider indexer java network open free download Mac Windwos Software development">
|
||||
<meta name="description" content="YACY Software HTTP Proxy Freeware Home Page">
|
||||
<meta name="copyright" content="Michael Christen">
|
||||
<script src="navigation.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="style.css">
|
||||
<!-- Realisation: Michael Christen; Contact: mc<at>anomic.de-->
|
||||
</head>
|
||||
<body bgcolor="#fefefe" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalheader();
|
||||
//--></SCRIPT>
|
||||
<!-- ----- HERE STARTS CONTENT PART ----- -->
|
||||
|
||||
<H1>YACY<br><br>
|
||||
<FONT SIZE="4">p2p-based distributed Web Search Engine</FONT></H1><br>
|
||||
|
||||
<p><i>Für eine deutsche Dokumentation sehen sie bitte <a href="http://www.suma-lab.de/yacy/">hier</a> und <a href="http://www.lmtm.de:33333/www/">dort</a></i></p>
|
||||
<br>
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
|
||||
<tr><td valign="top" width="40"> </td><td>
|
||||
|
||||
The YACY project is a new approach to build a p2p-based Web indexing network.<br><br>
|
||||
<ul>
|
||||
<li>Crawl your own pages or start distributed crawling</li>
|
||||
<li>Search your own or the global index</li>
|
||||
</ul><br><ul>
|
||||
<li>Built-in caching http proxy, but usage of the proxy is not a requisite</li>
|
||||
<li>Indexing benefits from the proxy cache; private information is not stored or indexed</li>
|
||||
</ul><br><ul>
|
||||
<li>Filter unwanted content like ad- or spyware; share your web-blacklist with other peers</li>
|
||||
<li>Extension to DNS: use your peer name as domain name!</li>
|
||||
</ul><br><ul>
|
||||
<li>Easy to install! No additional database required!</li>
|
||||
</ul><br><ul>
|
||||
<li>No central server!</li>
|
||||
<li>GPL'ed, freeware</li>
|
||||
</ul>
|
||||
<br>
|
||||
Start today to contribute to the global index with our own YACY peer!
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<!-- ----- HERE ENDS CONTENT PART ----- -->
|
||||
<SCRIPT LANGUAGE="JavaScript1.1"><!--
|
||||
globalfooter();
|
||||
//--></SCRIPT>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,122 @@
|
||||
var appname = "YACY: a Java Freeware P2P-Based Search Engine with Caching HTTP Proxy";
|
||||
var thismenu = new Array(
|
||||
"index","FAQ","Details","Technology","Platforms","News","Demo","License","Download",
|
||||
"Installation","Volunteers","Deutsches Forum@http://www.yacy-forum.de","English Forum@http://sourceforge.net/forum/?group_id=116142","Links","Contact","","Impressum");
|
||||
var mainmenu = new Array(
|
||||
"YACY Home@http://www.yacy.net/index.html",
|
||||
"Products@http://www.yacy.net/Products/index.html",
|
||||
"Consulting@http://www.yacy.net/Consulting/index.html",
|
||||
"Profile@http://www.yacy.net/Profile/index.html",
|
||||
"Impressum@http://www.yacy.net/Impressum/index.html");
|
||||
var root = "http://www.yacy.net/";
|
||||
|
||||
function headline() {
|
||||
document.writeln("<table bgcolor=\"#4070A0\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">");
|
||||
document.writeln(
|
||||
"<tr>" +
|
||||
"<td width=\"230\" height=\"80\" rowspan=\"2\"><a href=\"" + root + "\">" +
|
||||
"<img border=\"0\" src=\"grafics/yacy.gif\" align=\"top\"></a></td>" +
|
||||
"<!--<td align=\"center\" valign=\"bottom\"><font size=\"3\" face=\"Helvetica, Arial\" color=\"#ffffff\"><b>N E T W O R K A P P L I A N C E S & C O N S U L T I N G</b></font></td>-->" +
|
||||
"<td align=\"center\" valign=\"top\"><font size=\"3\" face=\"Helvetica, Arial\" color=\"#ffffff\"><br><br><b>Y A C Y - D I S T R I B U T E D P 2 P - B A S E D W E B I N D E X I N G</b></font></td>" +
|
||||
"<td width=\"140\"></td>" +
|
||||
"</tr>" +
|
||||
"<tr>" +
|
||||
"<td colspan=\"3\" align=\"right\">");
|
||||
//tmenu();
|
||||
document.writeln("<br>");
|
||||
document.writeln("</td></tr></table>");
|
||||
}
|
||||
|
||||
function filename() {
|
||||
var p = window.location.pathname;
|
||||
return p.substring(p.lastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
function docname() {
|
||||
var f = filename()
|
||||
return f.substring(0, f.indexOf("."));
|
||||
}
|
||||
|
||||
function lmenu() {
|
||||
document.writeln("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
|
||||
var dn = docname();
|
||||
var printname;
|
||||
var pos;
|
||||
for (var i = 0; i < thismenu.length; ++i) {
|
||||
document.writeln("<tr><td height=\"2\"></td></tr>");
|
||||
if (thismenu[i] == "index") printname = "About"; else printname = thismenu[i];
|
||||
if (thismenu[i] == "") {
|
||||
document.writeln("<tr><td height=\"20\" class=\"white\" > </td></tr>");
|
||||
} else if (dn == thismenu[i]) {
|
||||
document.writeln("<tr><td height=\"20\" class=\"white\" bgcolor=\"#4070A0\" valign=\"middle\"> " + printname + "</td></tr>");
|
||||
} else {
|
||||
pos = thismenu[i].indexOf("@");
|
||||
if (pos >= 0)
|
||||
document.writeln("<tr><td height=\"20\" bgcolor=\"#BDCDD4\" valign=\"middle\"> <a href=\"" + thismenu[i].substring(pos + 1) + "\" class=\"dark\">" + thismenu[i].substring(0, pos) + "</b></td></tr>");
|
||||
else
|
||||
document.writeln("<tr><td height=\"20\" bgcolor=\"#BDCDD4\" valign=\"middle\"> <a href=\"" + thismenu[i] + ".html\" class=\"dark\">" + printname + "</b></td></tr>");
|
||||
}
|
||||
}
|
||||
document.writeln("</table>");
|
||||
}
|
||||
|
||||
function tmenu() {
|
||||
//document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">");
|
||||
|
||||
//document.writeln("<tr><td height=\"20\" class=\"white\" bgcolor=\"#BDCDD4\" align=\"center\" valign=\"middle\">");
|
||||
var linkpath;
|
||||
var printname;
|
||||
var pos;
|
||||
pos = mainmenu[0].indexOf("@");
|
||||
linkpath = mainmenu[0].substring(pos + 1);
|
||||
printname = mainmenu[0].substring(0, pos);
|
||||
document.writeln("<a href=\"" + linkpath + "\" class=\"white\"><font size=\"1\">" + printname + "</font></a> ");
|
||||
for (var i = 1; i < mainmenu.length; ++i) {
|
||||
pos = mainmenu[i].indexOf("@");
|
||||
linkpath = mainmenu[i].substring(pos + 1);
|
||||
printname = mainmenu[i].substring(0, pos);
|
||||
document.writeln("<font class=\"white\" size=\"2\">·</font> <a href=\"" + linkpath + "\" class=\"white\"><font size=\"1\">" + printname + "</font></a> ");
|
||||
}
|
||||
//document.writeln("</td></tr>");
|
||||
//document.writeln("</table>");
|
||||
}
|
||||
|
||||
|
||||
function globalheader() {
|
||||
document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">");
|
||||
|
||||
document.writeln("<tr><td>");
|
||||
//tmenu();
|
||||
document.writeln("</td></tr>");
|
||||
//document.writeln("<tr><td height=\"1\" bgcolor=\"#000000\"></td></tr>");
|
||||
document.writeln("<tr><td>"); headline(); document.writeln("</td></tr>");
|
||||
//document.writeln("<tr><td height=\"1\" bgcolor=\"#000000\"></td></tr>");
|
||||
document.writeln("<tr><td height=\"2\"></td></tr>");
|
||||
|
||||
document.writeln("<tr><td>" +
|
||||
"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">" +
|
||||
" <tr>" +
|
||||
" <td width=\"100\" valign=\"top\">");
|
||||
lmenu();
|
||||
document.writeln(" </td>" +
|
||||
" <td width=\"10\" valign=\"top\"></td>" +
|
||||
" <td valign=\"top\">");
|
||||
document.writeln(" <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">");
|
||||
document.writeln(" <tr><td height=\"2\"></td></tr>");
|
||||
|
||||
//if ((docname() != "index") && (docname() != "indexd")) {
|
||||
// document.writeln(" <tr><td height=\"20\" class=\"black\" align=\"center\" valign=\"middle\">" + appname + "</td></tr>");
|
||||
// document.writeln(" <tr><td height=\"1\" bgcolor=\"#000000\"></td></tr>");
|
||||
//}
|
||||
|
||||
document.writeln(" <tr><td><br>");
|
||||
}
|
||||
|
||||
function globalfooter() {
|
||||
document.writeln(" <br><br></td></tr></table>");
|
||||
document.writeln(" </td>" +
|
||||
" <td width=\"10\" valign=\"top\">");
|
||||
document.writeln(" </td>" +
|
||||
" </tr></table>" +
|
||||
"</td></tr></table>");
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
YACY Release Road Map
|
||||
|
||||
The milestones listed here may change while milestones are reached.
|
||||
This is just a vision of the possible evolution of the proxy.
|
||||
|
||||
0.1 http proxy with cache indexing
|
||||
- database
|
||||
- caching http proxy
|
||||
- search engine on cache entries, implementationb of reverse word indexes ("RWI"'s)
|
||||
- http server to access search function
|
||||
- proxy configuration through built-in httpd
|
||||
- simple prefetch without prefetch schemes
|
||||
- firewall for proxy and httpd access protection
|
||||
|
||||
0.2 peer fundamentals
|
||||
- first information 'ware': seeds, which are peer information records
|
||||
- seed categories:
|
||||
'junior' - for peers without server (like 'LO-ID'),
|
||||
'senior' - for peers with server (like 'HI-ID'),
|
||||
'principal' - for senior peers with ftp upload for superseeds lists
|
||||
- first p2p protocol commands:
|
||||
* 'Hello' - network bootstraping and seed propagation
|
||||
* 'Query' - for peer information and access granting
|
||||
* 'Search' - global naive search of RWI's throughout 'some' remote (other peer) RWI's
|
||||
- ftp integration for principal peers: to upload seed list-files to dedicated places, listed in superseed-files
|
||||
- blacklist distribution
|
||||
|
||||
0.3 distributed hash tables for reverse word indexes
|
||||
- next p2p-command:
|
||||
* 'Tell' - for information wares distribution
|
||||
- establishment of the DHT's structure for all information wares
|
||||
- performance of search of RWI's using the DHT's
|
||||
- more information ware: L-URL's (loaded-url register) and DHT's
|
||||
|
||||
0.4 local proxy prefetch and separate spider
|
||||
- prefetch schemes and local prefetch execution
|
||||
- spider order entry + interface
|
||||
- blacklists / hotlists
|
||||
- search patterns
|
||||
- search depth
|
||||
|
||||
0.5 advanced search functions
|
||||
- scheduled and exceptional ware propagation and distribution
|
||||
- next p2p-command:
|
||||
* 'Check' - for L-URL requesting
|
||||
|
||||
0.6 gloabl prefetching and global spidering
|
||||
- non-proxy mode, using a specialized prefetch schemes for such cases
|
||||
- more information wares: P-URL's (prefetch url's, not loaded), deadlinks
|
||||
- next p2p-command to support standalone-mode (non-proxy)
|
||||
* 'Job' - requesting of P-URL's
|
||||
- global prefetch execution with P-URL's
|
||||
- delegated index conjunction
|
||||
- delegated description provisioning
|
||||
|
||||
0.7 ? split-off of mature code
|
||||
- kelondro database
|
||||
- httpd/http-proxy
|
||||
- plasma indexing/searching
|
||||
- p2p-protocol handler
|
||||
|
||||
0.8 ? more interfaces
|
||||
- konqueror cache access
|
||||
- mozilla cache access
|
||||
- squid cache access
|
||||
- telnet command interface
|
||||
|
||||
0.9 ? pre-production release
|
||||
- bugfixes for all known bugs
|
||||
- user demands integration
|
||||
- proprietary functions
|
||||
|
||||
1.0 production release
|
@ -0,0 +1,63 @@
|
||||
|
||||
body {
|
||||
background-color:#F8F8FF;
|
||||
}
|
||||
|
||||
a, body, div, li, ol, span, table, td, tr, ul {
|
||||
color:#000000;
|
||||
bgcolor:#000000;
|
||||
font-family:Helvetica, sans-serif;
|
||||
font-size:13px;
|
||||
font-style:normal;
|
||||
line-height:14px;
|
||||
margin-top:0px;
|
||||
margin-bottom:0px;
|
||||
}
|
||||
|
||||
body, div, li, ol, span, table, td, tr, ul {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color:#0000FF;
|
||||
}
|
||||
|
||||
a.dark:hover {
|
||||
color:#0088BB;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a.white:hover {
|
||||
color:#EEFF00;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
*.white {
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
*.yellow {
|
||||
color:#EEDD00;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
*.dark {
|
||||
color:#111111;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
*.blue {
|
||||
color:#556699;
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
font-size:11px;
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Blacklist Manager</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Blacklist</h2>
|
||||
<p>This function provides an url filter to the proxy; any blacklisted url is blocked
|
||||
from loading. You can define several blacklists and activate them separately.
|
||||
You may also provide your blacklist to other peers by sharing them; in turn you may
|
||||
collect blacklist entries from other peers.</p>
|
||||
|
||||
<table border="0" cellspacing="10" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
|
||||
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
Edit List:
|
||||
<select name="blackLists" size="1">
|
||||
#{blackLists}#
|
||||
<option value="#[name]#" #(selected)#::selected#(/selected)#>#[name]# #(active)#not active::active#(/active)# #(shared)#not shared::shared#(/shared)#</option>
|
||||
#{/blackLists}#
|
||||
</select>
|
||||
<input type="submit" name="changelistbutton" value="select"><br>
|
||||
<br>
|
||||
New List:
|
||||
<input type="text" name="newlist">
|
||||
<input type="submit" name="newlistbutton" value="create">
|
||||
</td>
|
||||
<td valign="top" align="right">
|
||||
<input type="submit" name="activatelistbutton" value="enable/disable this list"><br>
|
||||
<input type="submit" name="sharelistbutton" value="share/do not share this list"><br>
|
||||
<input type="submit" name="dellistbutton" value="delete this list"><br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>Active List: #[filename]#</h3>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
these are the domain name / path patterns in this blacklist:<br>
|
||||
you can select them here for deletion<br>
|
||||
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="filename" value="#[filename]#">
|
||||
<select name="Itemlist" size="10">
|
||||
<!--<option disabled>blocked Sites</option>-->
|
||||
#{Itemlist}#
|
||||
::
|
||||
<option value="#[item]#">#[item]#</option>
|
||||
#{/Itemlist}#
|
||||
</select>
|
||||
<br>
|
||||
<input type="submit" name="delbutton" value="Delete URL pattern">
|
||||
<p>
|
||||
Enter new domain name / path pattern in the form:<br>
|
||||
"<domain>/<path-regexpr>":<br>
|
||||
<input type="text" name="newItem" size="50"><br>
|
||||
<input type="submit" name="addbutton" value="Add URL pattern">
|
||||
|
||||
</td>
|
||||
<td bgcolor="#889988" width="1px"></td>
|
||||
<td valign="top">
|
||||
</form>
|
||||
Import Blacklist Items from other YACY Peers:<br>
|
||||
<form action="sharedBlacklist_p.html" method="get">
|
||||
<input type="hidden" name="filename" value="#[filename]#">
|
||||
Host: <select name="hash">
|
||||
#{otherHosts}#
|
||||
<option value="#[hash]#">#[name]#</option>
|
||||
#{/otherHosts}#
|
||||
</select>
|
||||
<br>
|
||||
<input type="submit" value="Load new Blacklist Items">
|
||||
</form>
|
||||
|
||||
<p>Import Blacklist items from URL:<br>
|
||||
<form action="sharedBlacklist_p.html" method="get">
|
||||
<input type="hidden" name="filename" value="#[filename]#">
|
||||
URL: <input type="text" name="url">
|
||||
<br>
|
||||
<input type="submit" value="Load new Blacklist Items">
|
||||
</form>
|
||||
|
||||
<p>Import Blacklist items from File:<br>
|
||||
<form action="sharedBlacklist_p.html" method="get">
|
||||
<input type="hidden" name="filename" value="#[filename]#">
|
||||
File: <input type="text" name="file">
|
||||
<br>
|
||||
<input type="submit" value="Load new Blacklist Items">
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
#(status)#
|
||||
::
|
||||
<b>#[item]#</b> was removed from Blacklist
|
||||
::
|
||||
<b>#[item]#</b> was added to the BlackList
|
||||
#(/status)#
|
||||
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,259 @@
|
||||
// Blacklist_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPProxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last change: 02.08.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Blacklist_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.data.*;
|
||||
|
||||
public class Blacklist_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
listManager.switchboard = (plasmaSwitchboard) env;
|
||||
|
||||
listManager.listsPath = new File(listManager.switchboard.getRootPath(),listManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
|
||||
|
||||
serverObjects prop = new serverObjects();
|
||||
String line;
|
||||
String HTMLout = "";
|
||||
String out = "";
|
||||
String removeItem = "removeme";
|
||||
int numItems=0;
|
||||
int i=0;
|
||||
|
||||
String filenames[] = listManager.getListslistArray("proxyBlackLists");
|
||||
String filename = "";
|
||||
|
||||
|
||||
if(post != null && post.containsKey("blackLists")){ //Blacklist selected
|
||||
filename = (String)post.get("blackLists");
|
||||
}else if(post != null && post.containsKey("filename")){
|
||||
filename = (String)post.get("filename");
|
||||
}else if(filenames.length > 0){ //first BlackList
|
||||
filename = filenames[0];
|
||||
}else{ //No BlackList
|
||||
//No file
|
||||
filename = ""; //?
|
||||
System.out.println("DEBUG: No Blacklist found");
|
||||
}
|
||||
prop.put("status", 0);//nothing
|
||||
|
||||
|
||||
//List Management
|
||||
|
||||
//Del list
|
||||
if( post != null && post.containsKey("dellistbutton") ){
|
||||
|
||||
File BlackListFile = new File(listManager.listsPath, filename);
|
||||
BlackListFile.delete();
|
||||
|
||||
//Remove from all BlackLists Lists
|
||||
listManager.removeListFromListslist("proxyBlackLists", filename);
|
||||
listManager.removeListFromListslist("proxyBlackListsActive", filename);
|
||||
listManager.removeListFromListslist("proxyBlackListsShared", filename);
|
||||
|
||||
//reload Blacklists
|
||||
listManager.reloadBlacklists();
|
||||
|
||||
filenames = listManager.getListslistArray("proxyBlackLists");
|
||||
if(filenames.length > 0){
|
||||
filename = filenames[0];
|
||||
}
|
||||
}//del list
|
||||
|
||||
if( post != null && post.containsKey("newlistbutton") ){
|
||||
|
||||
String newList = (String)post.get("newlist");
|
||||
if( !newList.endsWith(".black") ){
|
||||
newList += ".black";
|
||||
}
|
||||
|
||||
filename = newList; //to select it in the returnes Document
|
||||
try{
|
||||
File newFile = new File(listManager.listsPath, newList);
|
||||
newFile.createNewFile();
|
||||
|
||||
listManager.addListToListslist("proxyBlackLists", newList);
|
||||
listManager.addListToListslist("proxyBlackListsActive", newList);
|
||||
listManager.addListToListslist("proxyBlackListsShared", newList);
|
||||
|
||||
}catch(IOException e){}
|
||||
|
||||
}//newlist
|
||||
|
||||
if( post != null && post.containsKey("activatelistbutton") ){
|
||||
|
||||
if( listManager.ListInListslist("proxyBlackListsActive", filename) ){
|
||||
listManager.removeListFromListslist("proxyBlackListsActive", filename);
|
||||
}else{ //inactive list -> enable
|
||||
listManager.addListToListslist("proxyBlackListsActive", filename);
|
||||
}
|
||||
|
||||
listManager.reloadBlacklists();
|
||||
}
|
||||
|
||||
if( post != null && post.containsKey("sharelistbutton") ){
|
||||
|
||||
if( listManager.ListInListslist("proxyBlackListsShared", filename) ){
|
||||
//Remove from shared BlackLists
|
||||
listManager.removeListFromListslist("proxyBlackListsShared", filename);
|
||||
}else{ //inactive list -> enable
|
||||
listManager.addListToListslist("proxyBlackListsShared", filename);
|
||||
}
|
||||
}
|
||||
//List Management End
|
||||
|
||||
|
||||
|
||||
Vector list = listManager.getListArray(new File(listManager.listsPath, filename));
|
||||
//remove a Item?
|
||||
if( post != null && post.containsKey("delbutton") && post.containsKey("Itemlist") && !((String)post.get("Itemlist")).equals("") ){
|
||||
removeItem = (String)post.get("Itemlist");
|
||||
}
|
||||
|
||||
//Read the List
|
||||
Iterator it = list.iterator();
|
||||
while(it.hasNext()){
|
||||
line = (String) it.next();
|
||||
|
||||
if(! (line.startsWith("#") || line.equals("") || line.equals(removeItem)) ){ //Not the item to remove
|
||||
prop.put("Itemlist_"+numItems+"_item", line);
|
||||
numItems++;
|
||||
}
|
||||
|
||||
if(! line.equals(removeItem) ){
|
||||
out += line + serverCore.crlfString; //full list
|
||||
}else{
|
||||
prop.put("status", 1);//removed
|
||||
prop.put("status_item", line);
|
||||
if (httpdProxyHandler.blackListURLs != null)
|
||||
httpdProxyHandler.blackListURLs.remove(line);
|
||||
}
|
||||
}
|
||||
prop.put("Itemlist", numItems);
|
||||
|
||||
//Add a new Item
|
||||
if( post != null && post.containsKey("addbutton") && !((String)post.get("newItem")).equals("") ){
|
||||
String newItem = (String)post.get("newItem");
|
||||
|
||||
//clean http://
|
||||
if ( newItem.startsWith("http://") ){
|
||||
newItem = newItem.substring(7);
|
||||
}
|
||||
|
||||
//append "/.*"
|
||||
int pos = newItem.indexOf("/");
|
||||
if (pos < 0) {
|
||||
// add default empty path pattern
|
||||
pos = newItem.length();
|
||||
newItem = newItem + "/.*";
|
||||
}
|
||||
|
||||
out += newItem+"\n";
|
||||
|
||||
prop.put("Itemlist_"+numItems+"_item", newItem);
|
||||
numItems++;
|
||||
prop.put("Itemlist", numItems);
|
||||
|
||||
prop.put("status", 2);//added
|
||||
prop.put("status_item", newItem);//added
|
||||
|
||||
//add to blacklist
|
||||
if (httpdProxyHandler.blackListURLs != null)
|
||||
httpdProxyHandler.blackListURLs.put(newItem.substring(0, pos), newItem.substring(pos + 1));
|
||||
}
|
||||
listManager.writeList(new File(listManager.listsPath, filename), out);
|
||||
|
||||
//List known hosts for BlackList retrieval
|
||||
yacySeed seed;
|
||||
if( yacyCore.seedDB != null && yacyCore.seedDB.sizeConnected() > 0 ){ //no nullpointer error
|
||||
Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null);
|
||||
i=0;
|
||||
while (e.hasMoreElements()) {
|
||||
seed = (yacySeed) e.nextElement();
|
||||
if (seed != null) {
|
||||
String Hash = seed.hash;
|
||||
String Name = seed.get("Name", "nameless");
|
||||
prop.put("otherHosts_"+i+"_hash", Hash);
|
||||
prop.put("otherHosts_"+i+"_name", Name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
prop.put("otherHosts", i);
|
||||
}else{
|
||||
//DEBUG: System.out.println("BlackList_p: yacy seed not loaded!");
|
||||
}
|
||||
String BlackLists[] = listManager.getListslistArray("proxyBlackLists");
|
||||
|
||||
//List BlackLists
|
||||
for(i=0; i <= BlackLists.length -1;i++){
|
||||
prop.put("blackLists_"+i+"_name", BlackLists[i]);
|
||||
prop.put("blackLists_"+i+"_active", 0);
|
||||
prop.put("blackLists_"+i+"_shared", 0);
|
||||
prop.put("blackLists_"+i+"_selected", 0);
|
||||
if( BlackLists[i].equals(filename) ){ //current List
|
||||
prop.put("blackLists_"+i+"_selected", 1);
|
||||
}
|
||||
if( listManager.ListInListslist("proxyBlackListsActive", BlackLists[i]) ){
|
||||
prop.put("blackLists_"+i+"_active", 1);
|
||||
}
|
||||
if( listManager.ListInListslist("proxyBlackListsShared", BlackLists[i]) ){
|
||||
prop.put("blackLists_"+i+"_shared", 1);
|
||||
}
|
||||
}
|
||||
prop.put("blackLists", i);
|
||||
|
||||
prop.put("filename", filename);
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Local Cache Management</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Local Cache</h2><br>
|
||||
|
||||
<p>
|
||||
The current cache size is #[cachesize]# KB. The maximum cache size is #[cachemax]# KB.<br>
|
||||
<table border="0" cellspacing="4" cellpadding="0" width="100%"><tr>
|
||||
<td valign="top" width="300">
|
||||
#[tree]#
|
||||
<td>
|
||||
<td bgcolor="#889988" width="1px"></td>
|
||||
<td valign="top">
|
||||
#[info]#
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,181 @@
|
||||
// CacheAdmin_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 28.06.2003
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes CacheAdmin_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.data.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.htmlFilter.*;
|
||||
|
||||
public class CacheAdmin_p {
|
||||
|
||||
private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
public static String dateString(Date date) {
|
||||
return SimpleFormatter.format(date);
|
||||
}
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
String action = ((post == null) ? "info" : post.get("action", "info"));
|
||||
String pathString = ((post == null) ? "" : post.get("path", "/"));
|
||||
String fileString = pathString;
|
||||
File cache = new File(switchboard.getRootPath(), switchboard.getConfig("proxyCache", "DATA/HTCACHE"));
|
||||
File file = new File(cache, pathString);
|
||||
File dir;
|
||||
URL url = plasmaHTCache.getURL(cache, file);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
dir = file;
|
||||
} else {
|
||||
dir = file.getParentFile();
|
||||
pathString = (new File(pathString)).getParent().replace('\\','/');
|
||||
}
|
||||
// generate dir listing
|
||||
String[] list = dir.list();
|
||||
File f; String tree = "Directory of<br>" + ((pathString.length() == 0) ? "domain list" : linkPathString(pathString)) + "<br><br>";
|
||||
if (list == null)
|
||||
tree += "[empty]";
|
||||
else {
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
f = new File(dir, list[i]);
|
||||
if (f.isDirectory())
|
||||
tree += "<img src=\"/env/grafics/folderIconSmall.gif\" align=\"top\"> <a href=\"CacheAdmin_p.html?action=info&path=" + pathString + "/" + list[i] + "\" class=\"tt\">" + list[i] + "</a><br>" + serverCore.crlfString;
|
||||
else
|
||||
tree += "<img src=\"/env/grafics/fileIconSmall.gif\" align=\"top\"> <a href=\"CacheAdmin_p.html?action=info&path=" + pathString + "/" + list[i] + "\" class=\"tt\">" + list[i] + "</a><br>" + serverCore.crlfString;
|
||||
}
|
||||
}
|
||||
|
||||
String info = "";
|
||||
|
||||
if (action.equals("info")) {
|
||||
if (!(file.isDirectory())) {
|
||||
String urls = htmlFilterContentScraper.urlNormalform(url);
|
||||
info += "<b>Info for URL <a href=\"" + urls + "\">" + urls + "</a>:</b><br><br>";
|
||||
try {
|
||||
httpHeader fileheader = switchboard.cacheManager.getCachedResponse(plasmaURL.urlHash(url));
|
||||
info += "<b>HTTP Header:</b><br>" + formatHeader(fileheader) + "<br>";
|
||||
String ff = file.toString();
|
||||
int p = ff.lastIndexOf('.');
|
||||
String ext = (p >= 0) ? ff.substring(p + 1).toLowerCase() : "";
|
||||
if ((ext.equals("gif")) || (ext.equals("jpg")) || (ext.equals("jpeg")) || (ext.equals("png")))
|
||||
info += "<img src=\"" + "CacheResource_p.html?path=" + fileString + "\">";
|
||||
else {
|
||||
htmlFilterContentScraper scraper = new htmlFilterContentScraper(url);
|
||||
OutputStream os = new htmlFilterOutputStream(null, scraper, null, false);
|
||||
serverFileUtils.copy(file, os);
|
||||
info += "<b>HEADLINE:</b><br>" + scraper.getHeadline() + "<br><br>";
|
||||
info += "<b>HREF:</b><br>" + formatAnchor(scraper.getHyperlinks()) + "<br>";
|
||||
info += "<b>MEDIA:</b><br>" + formatAnchor(scraper.getMedialinks()) + "<br>";
|
||||
info += "<b>EMAIL:</b><br>" + formatAnchor(scraper.getEmaillinks()) + "<br>";
|
||||
info += "<b>TEXT:</b><br><span class=\"small\">" + new String(scraper.getText()) + "</span><br>";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
info += e.toString();
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
prop.put("cachesize", "" + (switchboard.cacheManager.currCacheSize/1024));
|
||||
prop.put("cachemax", "" + (switchboard.cacheManager.maxCacheSize/1024));
|
||||
prop.put("tree", tree);
|
||||
prop.put("info", info);
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
private static String formatHeader(httpHeader header) {
|
||||
String out = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
|
||||
Iterator it = header.entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
while (it.hasNext()) {
|
||||
entry = (Map.Entry) it.next();
|
||||
out += "<tr valign=\"top\"><td class=\"tt\">" + entry.getKey() + "</td><td class=\"tt\"> = </td><td class=\"tt\">" + entry.getValue() + "</td></tr>";
|
||||
}
|
||||
out += "</table>";
|
||||
return out;
|
||||
}
|
||||
|
||||
private static String formatAnchor(Properties a) {
|
||||
String out = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
|
||||
Enumeration e = a.keys();
|
||||
String url, descr;
|
||||
while (e.hasMoreElements()) {
|
||||
url = (String) e.nextElement();
|
||||
descr = a.getProperty(url).trim();
|
||||
if (descr.length() == 0) descr = "-";
|
||||
out += "<tr valign=\"top\"><td><span class=\"small\">" + descr + " </span></td><td class=\"tt\">" + url + "</td></tr>";
|
||||
}
|
||||
out += "</table>";
|
||||
return out;
|
||||
}
|
||||
|
||||
private static String linkPathString(String Path){ // contributed by Alexander Schier
|
||||
String Elements[] = Path.split("/");
|
||||
String result = "";
|
||||
String tmpPath = "";
|
||||
for(int i=0;i<(Elements.length-1);i++){
|
||||
tmpPath += Elements[i] + "/";
|
||||
result += "<a href=\"CacheAdmin_p.html?action=info&path=" + tmpPath + "\" class=\"tt\">" + Elements[i] + "/</a>";
|
||||
}
|
||||
if (Elements.length > 0) {
|
||||
tmpPath += Elements[Elements.length - 1] + "/";
|
||||
result += "<span class=\"tt\">" + Elements[Elements.length - 1] + "/</span>";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
#[resource]#
|
@ -0,0 +1,77 @@
|
||||
// CacheResource_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 10.08.2003
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Message.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.data.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class CacheResource_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
String path = ((post == null) ? "" : post.get("path", ""));
|
||||
File cache = new File(switchboard.getRootPath(), switchboard.getConfig("proxyCache", "DATA/HTCACHE"));
|
||||
File f = new File(cache, path);
|
||||
byte[] resource;
|
||||
|
||||
try {
|
||||
resource = serverFileUtils.read(f);
|
||||
prop.put("resource", resource);
|
||||
} catch (IOException e) {
|
||||
prop.put("resource", new byte[0]);
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY advanced Config</title>
|
||||
#[metas]#
|
||||
<script>
|
||||
<!--
|
||||
function element_clicked(element){
|
||||
document.getElementById("key").value=element.id;
|
||||
document.getElementById("value").value=element.value;
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>advanced Config</h2>
|
||||
<p>
|
||||
Here are all Config Options from YaCy.<br>
|
||||
You can change anything, but some Options need a restart, and some Options can crash YaCy, when wrong values are used.
|
||||
</p>
|
||||
<select name="options" size="25" style="width: 600">
|
||||
#{options}#<option id="#[key]#" value="#[value]#" onclick="element_clicked(this)">#[key]#: #[value]#</option>
|
||||
#{/options}#
|
||||
</select><br>
|
||||
<form action="Config_p.html" method="POST">
|
||||
<input type="text" id="key" name="key" size="40">:<input type="text" id="value" name="value" size="40">
|
||||
<input type="Submit" value="Save">
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,88 @@
|
||||
// Config_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2005
|
||||
// This file created by Alexander Schier
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last change: 02.08.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Config_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.data.*;
|
||||
|
||||
public class Config_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
int count=0;
|
||||
Enumeration keys = env.configKeys();
|
||||
String key="";
|
||||
|
||||
//change a Key
|
||||
if(post != null && post.containsKey("key") && post.containsKey("value")){
|
||||
key=(String)post.get("key");
|
||||
String value=(String)post.get("value");
|
||||
if(!key.equals("")){
|
||||
env.setConfig(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
while(keys.hasMoreElements()){
|
||||
key=(String)keys.nextElement();
|
||||
prop.put("options_"+count+"_key", key);
|
||||
prop.put("options_"+count+"_value", env.getConfig(key, "ERROR"));
|
||||
count++;
|
||||
}
|
||||
prop.put("options", count);
|
||||
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Incoming Cookies Monitor</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
#[submenuCookie]#
|
||||
<br>
|
||||
<h2>Cookie Monitor: Incoming Cookies</h2>
|
||||
<font size="1">
|
||||
<p>This is a list of Cookies that a web server has sent to clients of the YaCy Proxy:<br>
|
||||
Showing #[num]# entries from a total of #[total]# Cookies.<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<td class="small">Sending Host</td>
|
||||
<td class="small">Date</td>
|
||||
<td class="small">Receiving Client</td>
|
||||
<td class="small">Cookie</td>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
|
||||
<td class="small">#[host]#</td>
|
||||
<td class="small">#[date]#</td>
|
||||
<td class="small">#[client]#</td>
|
||||
<td class="small">#[cookie]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
</p>
|
||||
</font>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,95 @@
|
||||
// CookieMonitorIncoming_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last change: 25.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Network.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.plasma.*;
|
||||
|
||||
public class CookieMonitorIncoming_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
|
||||
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
int maxCount = 100;
|
||||
int entCount = 0;
|
||||
boolean dark = true;
|
||||
Iterator i = switchboard.incomingCookies.entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
String host, client, cookie;
|
||||
Date date;
|
||||
Object[] oa;
|
||||
while ((entCount < maxCount) && (i.hasNext())) {
|
||||
// get out values
|
||||
entry = (Map.Entry) i.next();
|
||||
host = (String) entry.getKey();
|
||||
oa = (Object[]) entry.getValue();
|
||||
date = (Date) oa[0];
|
||||
client = (String) oa[1];
|
||||
cookie = (String) oa[2];
|
||||
|
||||
// put values in template
|
||||
prop.put("list_" + entCount + "_dark", ((dark) ? 1 : 0) ); dark =! dark;
|
||||
prop.put("list_" + entCount + "_host", host);
|
||||
prop.put("list_" + entCount + "_date", httpc.dateString(date));
|
||||
prop.put("list_" + entCount + "_client", client);
|
||||
prop.put("list_" + entCount + "_cookie", cookie);
|
||||
|
||||
// next
|
||||
entCount++;
|
||||
}
|
||||
prop.put("list", entCount);
|
||||
prop.put("num", entCount);
|
||||
prop.put("total", switchboard.incomingCookies.size());
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Outgoing Cookies Monitor</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
#[submenuCookie]#
|
||||
<br>
|
||||
<h2>Cookie Monitor: Outgoing Cookies</h2>
|
||||
<font size="1">
|
||||
<p>This is a list of Cookies that a browser using the YaCy Proxy has sent to a web server:<br>
|
||||
Showing #[num]# entries from a total of #[total]# Cookies.<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<td class="small">Receiving Host</td>
|
||||
<td class="small">Date</td>
|
||||
<td class="small">Sending Client</td>
|
||||
<td class="small">Cookie</td>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
|
||||
<td class="small">#[host]#</td>
|
||||
<td class="small">#[date]#</td>
|
||||
<td class="small">#[client]#</td>
|
||||
<td class="small">#[cookie]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
</p>
|
||||
</font>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,95 @@
|
||||
// CookieMonitorOutgoing_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last change: 25.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Network.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.plasma.*;
|
||||
|
||||
public class CookieMonitorOutgoing_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
|
||||
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
int maxCount = 100;
|
||||
int entCount = 0;
|
||||
boolean dark = true;
|
||||
Iterator i = switchboard.outgoingCookies.entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
String host, client, cookie;
|
||||
Date date;
|
||||
Object[] oa;
|
||||
while ((entCount < maxCount) && (i.hasNext())) {
|
||||
// get out values
|
||||
entry = (Map.Entry) i.next();
|
||||
host = (String) entry.getKey();
|
||||
oa = (Object[]) entry.getValue();
|
||||
date = (Date) oa[0];
|
||||
client = (String) oa[1];
|
||||
cookie = (String) oa[2];
|
||||
|
||||
// put values in template
|
||||
prop.put("list_" + entCount + "_dark", ((dark) ? 1 : 0) ); dark =! dark;
|
||||
prop.put("list_" + entCount + "_host", host);
|
||||
prop.put("list_" + entCount + "_date", httpc.dateString(date));
|
||||
prop.put("list_" + entCount + "_client", client);
|
||||
prop.put("list_" + entCount + "_cookie", cookie);
|
||||
|
||||
// next
|
||||
entCount++;
|
||||
}
|
||||
prop.put("list", entCount);
|
||||
prop.put("num", entCount);
|
||||
prop.put("total", switchboard.outgoingCookies.size());
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Your Personal Profile</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Your Personal Profile</h2>
|
||||
<p>
|
||||
You can create a personal profile here. Other YaCy peers users can view these information using a link on the network page.<br>
|
||||
You do not need to provide any personal data here, but if you want to distribute your contact information, you can do that here.
|
||||
</p>
|
||||
<form action="EditProfile_p.html">
|
||||
|
||||
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td><input type="text" name="name" value="#[name]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nick Name</td>
|
||||
<td><input type="text" name="nickname" value="#[nickname]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Homepage</td>
|
||||
<td><input type="text" name="homepage" value="#[homepage]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EMail</td>
|
||||
<td><input type="text" name="email" value="#[email]#" style="width:100%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ICQ</td>
|
||||
<td><input type="text" name="icq" value="#[icq]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jabber</td>
|
||||
<td><input type="text" name="jabber" value="#[jabber]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yahoo!</td>
|
||||
<td><input type="text" name="yahoo" value="#[yahoo]#" style="width:100%"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSN</td>
|
||||
<td><input type="text" name="msn" value="#[msn]#" style="width:100%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td><textarea name="comment" cols="40" rows="10">#[comment]#</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" name="set" value="Save">
|
||||
</td>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
||||
</td></tr>
|
@ -0,0 +1,99 @@
|
||||
// EditProfile_p.java
|
||||
// -----------------------
|
||||
// part of YACY
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last change: 27.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Blacklist_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.data.*;
|
||||
|
||||
public class EditProfile_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
//listManager.switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
Properties profile = new Properties();
|
||||
try{
|
||||
profile.load(new FileInputStream(new File("DATA/SETTINGS/profile.txt")));
|
||||
|
||||
}catch(IOException e){}
|
||||
if(post != null && post.containsKey("set")){
|
||||
profile.setProperty("name", (String)post.get("name"));
|
||||
profile.setProperty("nickname", (String)post.get("nickname"));
|
||||
profile.setProperty("homepage", (String)post.get("homepage"));
|
||||
profile.setProperty("email", (String)post.get("email"));
|
||||
|
||||
profile.setProperty("icq", (String)post.get("icq"));
|
||||
profile.setProperty("jabber", (String)post.get("jabber"));
|
||||
profile.setProperty("yahoo", (String)post.get("yahoo"));
|
||||
profile.setProperty("msn", (String)post.get("msn"));
|
||||
|
||||
profile.setProperty("comment", (String)post.get("comment"));
|
||||
}
|
||||
prop.put("name", profile.getProperty("name", ""));
|
||||
prop.put("nickname", profile.getProperty("nickname", ""));
|
||||
prop.put("homepage", profile.getProperty("homepage", ""));
|
||||
prop.put("email", profile.getProperty("email", ""));
|
||||
|
||||
prop.put("icq", profile.getProperty("icq", ""));
|
||||
prop.put("jabber", profile.getProperty("jabber", ""));
|
||||
prop.put("yahoo", profile.getProperty("yahoo", ""));
|
||||
prop.put("msn", profile.getProperty("msn", ""));
|
||||
|
||||
prop.put("comment", profile.getProperty("comment", ""));
|
||||
|
||||
try{
|
||||
profile.store( new FileOutputStream(new File("DATA/SETTINGS/profile.txt")), null );
|
||||
}catch(IOException e){
|
||||
}
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Help</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Help</h2>
|
||||
|
||||
<p>
|
||||
This is a distributed web crawler and also a caching http proxy. You are using the <i>online-interface</i> of the application. You can use this interface to configure your personal settings, proxy settings, access control and crawling properties. You can also use this interface to start crawls, send messages to other peers and monitor your index, cache status and crawling processes. Most important, you can use the search page to search either your own or the <i>global</i> index.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For more detailed information, visit the <a href="http://www.yacy.net/yacy">YACY home page</a>.
|
||||
</p>
|
||||
|
||||
<h3>Local and Global Search: Options and Functions</h3>
|
||||
The proxy provides a search interface that accessed your local index, created from web pages that passed the proxy.
|
||||
The search can also be applied globally, by search other peers. You can use the following options to enhance your search results:
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
|
||||
<tr><td width="30%" valign="top"><b>Search Word List</b></td><td width="70%">
|
||||
You can search for several words simultanous. Words must be separated by a single space.
|
||||
The words are treated conjunctive, that means every must occur in the result, not any.
|
||||
If you do a global search (see below) you may get different results each time you do a search.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Maximum Number of Results</b></td><td>
|
||||
You can select the number of wanted maximum links. We do not yet support multiple result pages for virtually any possible link.
|
||||
Instead we encourage you to enhance the search result by submitting more search words.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Result Order Options</b></td><td>
|
||||
The search engine provides an experimental 'Quality' ranking. In contrast to other known search engines we provide also
|
||||
a result order by date. If you change the order to 'Date-Quality' the most recently updated page from the search results is listed first.
|
||||
For pages that have the same date the second order, 'Quality' is applied.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Resource Domain</b></td><td>
|
||||
This search engine is constructed to search the web pages that pass the proxy. But the search index is distributed to other peers as well,
|
||||
so you can search also globally: this function is currently only rudimentary, but can be choosen for test cases. Future releases will
|
||||
automatically distribute index information <i>before</i> a search happends to form a performant distributed hash table -- a very fast global search.
|
||||
|
||||
</td></tr><tr><td valign="top"><b>Maximum Search Time</b></td><td>
|
||||
Searching the local index is extremely fast, it happends within milliseconds, even for a large number (millions) of pages. But searching the
|
||||
global index needs more time to find the correct remote peer that contains best search results. This is especially the case while the
|
||||
distributed index is in test mode. Search results get more stable (repeated global search produce more similar results) the longer
|
||||
the search time is.
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,78 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Index Control</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Index Administration</h2>
|
||||
|
||||
<p>
|
||||
The local index currently consists of (at least) #[wcount]# reverse word indexes and #[ucount]# URL references<br>
|
||||
<form action="IndexControl_p.html" method="post" enctype="multipart/form-data">
|
||||
<table border="0" cellpadding="5" cellspacing="0">
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td width="70">Word</td>
|
||||
<td><input type="text" name="keystring" value="#[keystring]#" size="40" maxlength="80"></td>
|
||||
<td width="250"><input type="submit" name="keystringsearch" value="Show URL Entries for Word"></td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td>Word-Hash:</td>
|
||||
<td><input type="text" name="keyhash" value="#[keyhash]#" size="16" maxlength="12">
|
||||
<input type="submit" name="keyhashsimilar" value="Generate List"></td>
|
||||
<td><input type="submit" name="keyhashsearch" value="Show URL Entries for Word-Hash">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td></td><td></td>
|
||||
<td><input type="submit" name="keyhashtransfer" value="Transfer to other peer">
|
||||
<select name="hostHash">
|
||||
#{hosts}#
|
||||
<option value="#[hosthash]#">#[hostname]#</option>
|
||||
#{/hosts}#
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table></p>
|
||||
|
||||
<p><table border="0" cellpadding="5" cellspacing="0">
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td width="70">URL</td>
|
||||
<td><input type="text" name="urlstring" value="#[urlstring]#" size="40" maxlength="250"></td>
|
||||
<td width="250"><input type="submit" name="urlstringsearch" value="Show Details for URL"></td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td>URL-Hash:</td>
|
||||
<td><input type="text" name="urlhash" value="#[urlhash]#" size="16" maxlength="12">
|
||||
<input type="submit" name="urlhashsimilar" value="Generate List"></td>
|
||||
<td><input type="submit" name="urlhashsearch" value="Show Details for URL-Hash">
|
||||
</td>
|
||||
</tr>
|
||||
</table><p>
|
||||
|
||||
<table border="0" cellpadding="5" cellspacing="0">
|
||||
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td width="100">Index Distribution:</td>
|
||||
<td><input type="checkbox" name="indexDistribute" align="top" #[indexDistributeChecked]#>
|
||||
This enables automated, DHT-ruled Index Transmission to other peers. This is currently only activated for junior peers.</td>
|
||||
<td><input type="submit" name="setIndexDistribute" value="set"></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td width="100">Index Receive:</td>
|
||||
<td><input type="checkbox" name="indexReceive" align="top" #[indexReceiveChecked]#>
|
||||
Accept remote Index Transmissions. This works only if you are a senior peer. The DHT-rules do not work without this function.</td>
|
||||
<td><input type="submit" name="setIndexReceive" value="set"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
#[result]#
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,382 @@
|
||||
// IndexControl_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last change: 02.05.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes IndexControl_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.htmlFilter.*;
|
||||
import de.anomic.yacy.*;
|
||||
|
||||
public class IndexControl_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
if ((post == null) || (env == null)) {
|
||||
prop.put("keystring", "");
|
||||
prop.put("keyhash", "");
|
||||
prop.put("urlstring", "");
|
||||
prop.put("urlhash", "");
|
||||
prop.put("result", "");
|
||||
prop.put("wcount", "" + switchboard.wordIndex.sizeMin());
|
||||
prop.put("ucount", "" + switchboard.loadedURL.size());
|
||||
prop.put("otherHosts", "");
|
||||
prop.put("indexDistributeChecked", (switchboard.getConfig("allowDistributeIndex", "true").equals("true")) ? "checked" : "");
|
||||
prop.put("indexReceiveChecked", (switchboard.getConfig("allowReceiveIndex", "true").equals("true")) ? "checked" : "");
|
||||
return prop; // be save
|
||||
}
|
||||
|
||||
// default values
|
||||
String keystring = ((String) post.get("keystring")).trim();
|
||||
String keyhash = ((String) post.get("keyhash")).trim();
|
||||
String urlstring = ((String) post.get("urlstring")).trim();
|
||||
String urlhash = ((String) post.get("urlhash")).trim();
|
||||
|
||||
if (!(urlstring.startsWith("http://"))) urlstring = "http://" + urlstring;
|
||||
|
||||
prop.put("keystring", keystring);
|
||||
prop.put("keyhash", keyhash);
|
||||
prop.put("urlstring", urlstring);
|
||||
prop.put("urlhash", urlhash);
|
||||
prop.put("result", "");
|
||||
|
||||
// read values from checkboxes
|
||||
String[] urlx = post.getAll("urlhx.*");
|
||||
boolean delurl = post.containsKey("delurl");
|
||||
boolean delurlref = post.containsKey("delurlref");
|
||||
//System.out.println("DEBUG CHECK: " + ((delurl) ? "delurl" : "") + " " + ((delurlref) ? "delurlref" : ""));
|
||||
|
||||
if (post.containsKey("setIndexDistribute")) {
|
||||
boolean allowDistributeIndex = ((String) post.get("indexDistribute", "")).equals("on");
|
||||
switchboard.setConfig("allowDistributeIndex", (allowDistributeIndex) ? "true" : "false");
|
||||
}
|
||||
|
||||
if (post.containsKey("setIndexReceive")) {
|
||||
boolean allowReceiveIndex = ((String) post.get("indexReceive", "")).equals("on");
|
||||
switchboard.setConfig("allowReceiveIndex", (allowReceiveIndex) ? "true" : "false");
|
||||
yacyCore.seedDB.mySeed.setFlagAcceptRemoteIndex(allowReceiveIndex);
|
||||
}
|
||||
|
||||
if (post.containsKey("keyhashdeleteall")) {
|
||||
try {
|
||||
if ((delurl) || (delurlref)) {
|
||||
// generate an urlx array
|
||||
try {
|
||||
HashSet keyhashes = new HashSet();
|
||||
keyhashes.add(keyhash);
|
||||
plasmaWordIndexEntity index = switchboard.searchManager.searchHashes(keyhashes, 10000);
|
||||
Enumeration en = index.elements(true);
|
||||
int i = 0;
|
||||
urlx = new String[index.size()];
|
||||
while (en.hasMoreElements()) urlx[i++] = ((plasmaWordIndexEntry) en.nextElement()).getUrlHash();
|
||||
} catch (IOException e) {
|
||||
urlx = new String[0];
|
||||
}
|
||||
}
|
||||
if (delurlref) for (int i = 0; i < urlx.length; i++) switchboard.removeAllUrlReferences(urlx[i], true);
|
||||
if ((delurl) || (delurlref)) for (int i = 0; i < urlx.length; i++) switchboard.loadedURL.remove(urlx[i]);
|
||||
switchboard.wordIndex.deleteComplete(keyhash);
|
||||
} catch (IOException e) {}
|
||||
post.remove("keyhashdeleteall");
|
||||
if ((keystring.length() > 0) && (plasmaWordIndexEntry.word2hash(keystring).equals(keyhash)))
|
||||
post.put("keystringsearch", "generated");
|
||||
else
|
||||
post.put("keyhashsearch", "generated");
|
||||
}
|
||||
|
||||
if (post.containsKey("keyhashdelete")) {
|
||||
try {
|
||||
if (delurlref) for (int i = 0; i < urlx.length; i++) switchboard.removeAllUrlReferences(urlx[i], true);
|
||||
if ((delurl) || (delurlref)) for (int i = 0; i < urlx.length; i++) switchboard.loadedURL.remove(urlx[i]);
|
||||
switchboard.wordIndex.removeEntries(keyhash, urlx, true);
|
||||
} catch (IOException e) {}
|
||||
// this shall lead to a presentation of the list; so handle that the remaining program
|
||||
// thinks that it was called for a list presentation
|
||||
post.remove("keyhashdelete");
|
||||
if ((keystring.length() > 0) && (plasmaWordIndexEntry.word2hash(keystring).equals(keyhash)))
|
||||
post.put("keystringsearch", "generated");
|
||||
else
|
||||
post.put("keyhashsearch", "generated");
|
||||
//prop.put("result", "Delete of relation of url hashes " + result + " to key hash " + keyhash);
|
||||
}
|
||||
|
||||
if (post.containsKey("urlhashdeleteall")) {
|
||||
int i = switchboard.removeAllUrlReferences(urlhash, true);
|
||||
prop.put("result", "Deleted URL and " + i + " references from " + i + " word indexes.");
|
||||
}
|
||||
|
||||
if (post.containsKey("urlhashdelete")) {
|
||||
plasmaCrawlLURL.entry entry = switchboard.loadedURL.getEntry(urlhash);
|
||||
URL url = entry.url();
|
||||
if (url == null) {
|
||||
prop.put("result", "No Entry for url hash " + urlhash + "; nothing deleted.");
|
||||
} else {
|
||||
urlstring = htmlFilterContentScraper.urlNormalform(url);
|
||||
prop.put("urlstring", "");
|
||||
switchboard.loadedURL.remove(urlhash);
|
||||
prop.put("result", "Removed URL " + urlstring);
|
||||
}
|
||||
}
|
||||
|
||||
if (post.containsKey("keystringsearch")) {
|
||||
keyhash = plasmaWordIndexEntry.word2hash(keystring);
|
||||
prop.put("keyhash", keyhash);
|
||||
prop.put("urlstring", "");
|
||||
prop.put("urlhash", "");
|
||||
prop.put("result", genUrlList(switchboard, keyhash, keystring));
|
||||
}
|
||||
|
||||
if (post.containsKey("keyhashsearch")) {
|
||||
if ((keystring.length() == 0) || (!(plasmaWordIndexEntry.word2hash(keystring).equals(keyhash))))
|
||||
prop.put("keystring", "<not possible to compute word from hash>");
|
||||
prop.put("urlstring", "");
|
||||
prop.put("urlhash", "");
|
||||
prop.put("result", genUrlList(switchboard, keyhash, ""));
|
||||
}
|
||||
|
||||
if (post.containsKey("keyhashtransfer")) {
|
||||
if ((keystring.length() == 0) || (!(plasmaWordIndexEntry.word2hash(keystring).equals(keyhash))))
|
||||
prop.put("keystring", "<not possible to compute word from hash>");
|
||||
prop.put("urlstring", "");
|
||||
prop.put("urlhash", "");
|
||||
plasmaWordIndexEntity[] indexes = new plasmaWordIndexEntity[1];
|
||||
String result;
|
||||
long starttime = System.currentTimeMillis();
|
||||
try {indexes[0] = switchboard.wordIndex.getEntity(keyhash, true);
|
||||
result = yacyClient.transferIndex(yacyCore.seedDB.getConnected(post.get("hostHash", "")), indexes, switchboard.loadedURL);
|
||||
} catch (IOException e) {
|
||||
result = "IOException: " + e.getMessage();
|
||||
}
|
||||
prop.put("result", (result == null) ? ("Successfully transferred " + indexes[0].size() + " words in " + ((System.currentTimeMillis() - starttime) / 1000) + " seconds") : result);
|
||||
}
|
||||
|
||||
if (post.containsKey("keyhashsimilar")) {
|
||||
Iterator hashIt = switchboard.wordIndex.hashIterator(keyhash, true, true, true);
|
||||
String result = "Sequential List of Word-Hashes:<br>";
|
||||
String hash;
|
||||
int i = 0;
|
||||
while (hashIt.hasNext()) {
|
||||
hash = (String) hashIt.next();
|
||||
result += "<a href=\"/IndexControl_p.html?" +
|
||||
"keystring=" +
|
||||
"&keyhash=" + hash +
|
||||
"&urlhash=" +
|
||||
"&urlstring=" +
|
||||
"&keyhashsearch=" +
|
||||
"\" class=\"tt\">" + hash + "</a> " + (((i + 1) % 8 == 0) ? "<br>" : "");
|
||||
i++;
|
||||
}
|
||||
prop.put("result", result);
|
||||
}
|
||||
|
||||
if (post.containsKey("urlstringsearch")) {
|
||||
try {
|
||||
URL url = new URL(urlstring);
|
||||
urlhash = plasmaURL.urlHash(url);
|
||||
prop.put("urlhash", urlhash);
|
||||
plasmaCrawlLURL.entry entry = switchboard.loadedURL.getEntry(urlhash);
|
||||
prop.put("result", genUrlProfile(switchboard, entry, urlhash));
|
||||
} catch (MalformedURLException e) {
|
||||
prop.put("urlstring", "wrong url: " + urlstring);
|
||||
prop.put("urlhash", "");
|
||||
}
|
||||
}
|
||||
|
||||
if (post.containsKey("urlhashsearch")) {
|
||||
plasmaCrawlLURL.entry entry = switchboard.loadedURL.getEntry(urlhash);
|
||||
URL url = entry.url();
|
||||
if (url == null) {
|
||||
prop.put("result", "No Entry for url hash " + urlhash);
|
||||
} else {
|
||||
urlstring = url.toString();
|
||||
prop.put("urlstring", urlstring);
|
||||
prop.put("result", genUrlProfile(switchboard, entry, urlhash));
|
||||
}
|
||||
}
|
||||
|
||||
if (post.containsKey("urlhashsimilar")) {
|
||||
try {
|
||||
Iterator hashIt = switchboard.loadedURL.urlHashes(urlhash, true);
|
||||
String result = "Sequential List of URL-Hashes:<br>";
|
||||
String hash;
|
||||
int i = 0;
|
||||
while (hashIt.hasNext()) {
|
||||
hash = (String) hashIt.next();
|
||||
result += "<a href=\"/IndexControl_p.html?" +
|
||||
"keystring=" +
|
||||
"&keyhash=" +
|
||||
"&urlhash=" + hash +
|
||||
"&urlstring=" +
|
||||
"&urlhashsearch=" +
|
||||
"\" class=\"tt\">" + hash + "</a> " + (((i + 1) % 8 == 0) ? "<br>" : "");
|
||||
i++;
|
||||
}
|
||||
prop.put("result", result);
|
||||
} catch (IOException e) {
|
||||
prop.put("result", "Error: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
//List known hosts
|
||||
yacySeed seed;
|
||||
int hc = 0;
|
||||
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)) {
|
||||
Enumeration e = yacyCore.dhtAgent.getAcceptRemoteIndexSeeds(keyhash);
|
||||
while (e.hasMoreElements()) {
|
||||
seed = (yacySeed) e.nextElement();
|
||||
if (seed != null) {
|
||||
prop.put("hosts_" + hc + "_hosthash", seed.hash);
|
||||
prop.put("hosts_" + hc + "_hostname", /*seed.hash + " " +*/ seed.get("Name", "nameless"));
|
||||
hc++;
|
||||
}
|
||||
}
|
||||
prop.put("hosts", "" + hc);
|
||||
} else {
|
||||
prop.put("hosts", "0");
|
||||
}
|
||||
|
||||
// insert constants
|
||||
prop.put("wcount", "" + switchboard.wordIndex.sizeMin());
|
||||
prop.put("ucount", "" + switchboard.loadedURL.size());
|
||||
prop.put("indexDistributeChecked", (switchboard.getConfig("allowDistributeIndex", "true").equals("true")) ? "checked" : "");
|
||||
prop.put("indexReceiveChecked", (switchboard.getConfig("allowReceiveIndex", "true").equals("true")) ? "checked" : "");
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
public static String genUrlProfile(plasmaSwitchboard switchboard, plasmaCrawlLURL.entry entry, String urlhash) {
|
||||
if (entry == null) return "No entry found for url-hash " + urlhash;
|
||||
URL url = entry.url();
|
||||
if (url == null) return "No entry found for url-hash " + urlhash;
|
||||
String result = "<table>" +
|
||||
"<tr><td class=\"small\">URL String</td><td class=\"tt\">" + htmlFilterContentScraper.urlNormalform(url) + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Hash</td><td class=\"tt\">" + urlhash + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Description</td><td class=\"tt\">" + entry.descr() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Modified-Date</td><td class=\"tt\">" + entry.moddate() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Loaded-Date</td><td class=\"tt\">" + entry.loaddate() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Referrer</td><td class=\"tt\">" + switchboard.loadedURL.getEntry(entry.referrerHash()).url() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Doctype</td><td class=\"tt\">" + entry.doctype() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Copy-Count</td><td class=\"tt\">" + entry.copyCount() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Local-Flag</td><td class=\"tt\">" + entry.local() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Quality</td><td class=\"tt\">" + entry.quality() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Language</td><td class=\"tt\">" + entry.language() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Size</td><td class=\"tt\">" + entry.size() + "</td></tr>" +
|
||||
"<tr><td class=\"small\">Words</td><td class=\"tt\">" + entry.wordCount() + "</td></tr>" +
|
||||
"</table><br>";
|
||||
result +=
|
||||
"<form action=\"IndexControl_p.html\" method=\"post\" enctype=\"multipart/form-data\">" +
|
||||
"<input type=\"hidden\" name=\"keystring\" value=\"\">" +
|
||||
"<input type=\"hidden\" name=\"keyhash\" value=\"\">" +
|
||||
"<input type=\"hidden\" name=\"urlstring\" value=\"\">" +
|
||||
"<input type=\"hidden\" name=\"urlhash\" value=\"" + urlhash + "\">" +
|
||||
"<input type=\"submit\" value=\"Delete URL\" name=\"urlhashdelete\"><br>" +
|
||||
"<span class=\"small\"> this may produce unresolved references at other word indexes but they do not harm</span><br><br>" +
|
||||
"<input type=\"submit\" value=\"Delete URL and remove all references from words\" name=\"urlhashdeleteall\"><br>" +
|
||||
"<span class=\"small\"> delete the reference to this url at every other word where the reference exists (very extensive, but prevents unresolved references)</span><br>" +
|
||||
"</form>";
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String genUrlList(plasmaSwitchboard switchboard, String keyhash, String keystring) {
|
||||
// search for a word hash and generate a list of url links
|
||||
try {
|
||||
HashSet keyhashes = new HashSet();
|
||||
keyhashes.add(keyhash);
|
||||
plasmaWordIndexEntity index = switchboard.searchManager.searchHashes(keyhashes, 10000);
|
||||
String result = "";
|
||||
if (index.size() == 0) {
|
||||
result = "No URL entries related to this word hash <span class=\"tt\">" + keyhash + "</span>.";
|
||||
} else {
|
||||
Enumeration en = index.elements(true);
|
||||
plasmaWordIndexEntry ie;
|
||||
result = "URL entries related to this word hash <span class=\"tt\">" + keyhash + "</span>:<br>";
|
||||
result += "<form action=\"IndexControl_p.html\" method=\"post\" enctype=\"multipart/form-data\">";
|
||||
String us, uh;
|
||||
int i = 0;
|
||||
while (en.hasMoreElements()) {
|
||||
ie = (plasmaWordIndexEntry) en.nextElement();
|
||||
uh = ie.getUrlHash();
|
||||
result +=
|
||||
"<input type=\"checkbox\" name=\"urlhx" + i++ + "\" value=\"" + uh + "\" align=\"top\">";
|
||||
if (switchboard.loadedURL.exists(uh)) {
|
||||
us = switchboard.loadedURL.getEntry(uh).url().toString();
|
||||
result +=
|
||||
"<a href=\"/IndexControl_p.html?" + "keystring=" + keystring +
|
||||
"&keyhash=" + keyhash + "&urlhash=" + uh + "&urlstringsearch=" + "&urlstring=" + us +
|
||||
"\" class=\"tt\">" + uh + "</a><span class=\"tt\"> " + us + "</span><br>";
|
||||
} else {
|
||||
result +=
|
||||
"<span class=\"tt\">" + uh + " <unresolved URL Hash></span><br>";
|
||||
}
|
||||
}
|
||||
result +=
|
||||
"<input type=\"hidden\" name=\"keystring\" value=\"" + keystring + "\">" +
|
||||
"<input type=\"hidden\" name=\"keyhash\" value=\"" + keyhash + "\">" +
|
||||
"<input type=\"hidden\" name=\"urlstring\" value=\"\">" +
|
||||
"<input type=\"hidden\" name=\"urlhash\" value=\"\">" +
|
||||
"<br><fieldset><legend>Reference Deletion</legend><table border=\"0\" cellspacing=\"5\" cellpadding=\"5\"><tr valign=\"top\"><td><br><br>" +
|
||||
"<input type=\"submit\" value=\"Delete reference to selected URL's\" name=\"keyhashdelete\"><br><br>" +
|
||||
"<input type=\"submit\" value=\"Delete reference to ALL URL's\" name=\"keyhashdeleteall\"><span class=\"small\"><br> (= delete Word)</span>" +
|
||||
"</td><td width=\"150\">" +
|
||||
"<center><input type=\"checkbox\" name=\"delurl\" value=\"\" align=\"top\" checked></center><br>" +
|
||||
"<span class=\"small\">delete also the referenced URL itself (reasonable and recommended, may produce unresolved references at other word indexes but they do not harm)</span>" +
|
||||
"</td><td width=\"150\">" +
|
||||
"<center><input type=\"checkbox\" name=\"delurlref\" value=\"\" align=\"top\"></center><br>" +
|
||||
"<span class=\"small\">for every resolveable and deleted URL reference, delete the same reference at every other word where the reference exists (very extensive, but prevents further unresolved references)</span>" +
|
||||
"</td></tr></table></fieldset></form>";
|
||||
}
|
||||
return result;
|
||||
} catch (IOException e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,322 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Index Creation</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Index Creation</h2>
|
||||
|
||||
<p>
|
||||
<div class=small><b>
|
||||
You can define url's as start points for Web page crawling and start that crawling here.
|
||||
</b></div>
|
||||
<table border="0" cellpadding="5" cellspacing="0" width="100%">
|
||||
<form action="IndexCreate_p.html" method="post" enctype="multipart/form-data">
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td width="120"></td>
|
||||
<td></td>
|
||||
<td width="120"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Crawling Depth:</td>
|
||||
<td class=small><input name="crawlingDepth" type="text" size="2" maxlength="2" value="#[crawlingDepth]#"></td>
|
||||
<td class=small colspan="3">
|
||||
A minimum of 1 is recommended.
|
||||
Be careful with the prefetch number. Consider a branching factor of average 20;
|
||||
A prefect-depth of 8 would index 25.600.000.000 pages, maybe the whole WWW.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Crawling Filter:</td>
|
||||
<td class=small><input name="crawlingFilter" type="text" size="20" maxlength="100" value="#[crawlingFilter]#"></td>
|
||||
<td class=small colspan="3">
|
||||
This is an emacs-like regular expression that must match with the crawled url.
|
||||
Use this i.e. to crawl a single domain. If you set this filter is would make sense to increase
|
||||
the crawl depth.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Accept URL's with '?' / dynamic URL's:</td>
|
||||
<td class=small><input type="checkbox" name="crawlingQ" align="top" #(crawlingQChecked)#::checked#(/crawlingQChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
URL's pointing to dynamic content should usually not be crawled. However, there are sometimes web pages with static content that
|
||||
is accessed with URL's containing question marks. If you are unshure, do not check this to avoid crawl loops.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Store to Proxy Cache:</td>
|
||||
<td class=small><input type="checkbox" name="storeHTCache" align="top" #(storeHTCacheChecked)#::checked#(/storeHTCacheChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
This option is used by default for proxy prefetch, but is not needed for explicit crawling.
|
||||
We recommend to leave this switched off unless you want to control the crawl results with the
|
||||
<a href="CacheAdmin_p.html" class=small>Cache Monitor</a>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Do Local Indexing:</td>
|
||||
<td class=small><input type="checkbox" name="localIndexing" align="top" #(localIndexingChecked)#::checked#(/localIndexingChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
This should be switched on by default, unless you want to crawl only to fill the
|
||||
<a href="CacheAdmin_p.html" class=small>Proxy Cache</a> without indexing.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Do Remote Indexing</td>
|
||||
<td class=small><input type="checkbox" name="crawlOrder" align="top" #(crawlOrderChecked)#::checked#(/crawlOrderChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
If checked, the crawl will try to assign the leaf nodes of the search tree to remote peers.
|
||||
If you need your crawling results locally, you must switch this off.
|
||||
Only senior and principal peers can initiate or receive remote crawls.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Exclude <i>static</i> Stop-Words</td>
|
||||
<td class=small><input type="checkbox" name="xsstopw" align="top" #(xsstopwChecked)#::checked#(/xsstopwChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
To exclude all words given in the file <tt class=small>yacy.stopwords</tt> from indexing,
|
||||
check this box.
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Exclude <i>dynamic</i> Stop-Words</td>
|
||||
<td class=small><input type="checkbox" name="xdstopw" align="top" #(xdstopwChecked)#::checked#(/xdstopwChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
Excludes all words from indexing which are listed by statistic rules.
|
||||
<i>THIS IS NOT YET FUNCTIONAL</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Exclude <i>parent-indexed</i> words</td>
|
||||
<td class=small><input type="checkbox" name="xpstopw" align="top" #(xpstopwChecked)#::checked#(/xpstopwChecked)#></td>
|
||||
<td class=small colspan="3">
|
||||
Excludes all words from indexing which had been indexed in the parent web page.
|
||||
<i>THIS IS NOT YET FUNCTIONAL</i>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td class=small>Start Point:</td>
|
||||
<td class=small colspan="2"><input name="crawlingURL" type="text" size="42" maxlength="256" value="http://"></td>
|
||||
<td class=small><input type="submit" name="crawlingstart" value="Start New Crawl"></td>
|
||||
<td class=small>Existing start url's are re-crawled.
|
||||
Other already visited url's are sorted out as 'double'.
|
||||
A complete re-crawl will be available soon.
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<p><form action="IndexCreate_p.html" method="post" enctype="multipart/form-data">
|
||||
<div class=small><b>Distributed Indexing: </b>
|
||||
Crawling and indexing can be done by remote peers.
|
||||
Your peer can search and index for other peers and they can search for you.</div>
|
||||
<table border="0" cellpadding="5" cellspacing="0" width="100%">
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td width="30%">
|
||||
<input type="checkbox" name="crawlResponse" align="top" #(crawlResponseChecked)#::checked#(/crawlResponseChecked)#>
|
||||
Accept remote crawling requests</td>
|
||||
<td>
|
||||
<input type="submit" name="distributedcrawling" value="set"></td>
|
||||
</table>
|
||||
</form></p>
|
||||
|
||||
|
||||
<p>
|
||||
#(error)#
|
||||
::
|
||||
Error with profile management. Please stop yacy, delete the File DATA/PLASMADB/crawlProfiles0.db and restart.
|
||||
::
|
||||
Error: #[errmsg]#
|
||||
::
|
||||
Application not yet initialized. Sorry. Please wait some seconds and repeat the request.
|
||||
::
|
||||
<b>ERROR: Crawl filter "#[newcrawlingfilter]#" does not match with crawl root "#[crawlingStart]#".</b> Please try again with different filter</p><br>
|
||||
::
|
||||
Crawling of "#[crawlingURL]#" failed. Reason: #[reasonString]#<br>
|
||||
::
|
||||
Error with url input "#[crawlingStart]#": #[error]#
|
||||
#(/error)#
|
||||
<br>
|
||||
#(info)#
|
||||
::
|
||||
Set new prefetch depth to "#[newproxyPrefetchDepth]#"
|
||||
::
|
||||
Crawling of "#[crawlingURL]#" started.
|
||||
You can monitor the crawling progress with this page.
|
||||
<b>Please wait some seconds before refresh of this page, because the request is enqueued and delayed until the http server is idle for a certain time.</b>
|
||||
The indexing result is presented on the
|
||||
<a href="IndexLMonitor_p.html">Index Monitor</a>-page.
|
||||
<b>It will take at least 30 seconds until the first result appears there. Please be patient, the crawling will pause each time you use the proxy or web server to ensure maximum availability.</b>
|
||||
If you crawl any un-wanted pages, you can delete them <a href="IndexDelete_p.html">here</a>.<br>
|
||||
::
|
||||
Removed #[numEntries]# entries from crawl queue. This queue may fill again if the loading and indexing queue is not empty
|
||||
#(/info)#
|
||||
<br>
|
||||
#(refreshbutton)#
|
||||
::
|
||||
<form action="IndexCreate_p.html" method="post" enctype="multipart/form-data">
|
||||
<input type="submit" name="refreshpage" value="refresh">
|
||||
</form>
|
||||
<br>
|
||||
#(/refreshbutton)#
|
||||
Crawl Profile List:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableHeader">
|
||||
<td width="120" class="small"><b>Crawl Thread</b></td>
|
||||
<td class="small"><b>Start URL</b></td>
|
||||
<td width="16" class="small"><b>Depth</b></td>
|
||||
<td width="60" class="small"><b>Filter</b></td>
|
||||
<td width="10" class="small"><b>Accept '?'</b></td>
|
||||
<td width="10" class="small"><b>Fill Proxy Cache</b></td>
|
||||
<td width="10" class="small"><b>Local Indexing</b></td>
|
||||
<td width="10" class="small"><b>Remote Indexing</b></td>
|
||||
</tr>
|
||||
#{crawlProfiles}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td class="small">#[name]#</td>
|
||||
<td class="small">#[startURL]#</td>
|
||||
<td class="small">#[depth]#</td>
|
||||
<td class="small">#[filter]#</td>
|
||||
<td class="small">#(withQuery)#no::yes#(/withQuery)#</td>
|
||||
<td class="small">#(storeCache)#no::yes#(/storeCache)#</td>
|
||||
<td class="small">#(localIndexing)#no::yes#(/localIndexing)#</td>
|
||||
<td class="small">#(remoteIndexing)#no::yes#(/remoteIndexing)#</td>
|
||||
</tr>
|
||||
#{/crawlProfiles}#
|
||||
</table>
|
||||
<br>
|
||||
#(remoteCrawlPeers)#
|
||||
No remote crawl peers availible.<br>
|
||||
::
|
||||
#[num]# peers available for remote crawling.
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableCellDark">
|
||||
<th width="60" class="small">Idle Peers</th>
|
||||
<td class="small">
|
||||
#{available}##[name]# (#[due]# seconds due) #{/available}#
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="TableCellLight">
|
||||
<th width="60" class="small">Busy Peers</th>
|
||||
<td class="small">
|
||||
#{busy}##[name]# (#[due]# seconds due) #{/busy}#
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
#(/remoteCrawlPeers)#
|
||||
<br>
|
||||
#(rejected)#
|
||||
::
|
||||
<form action="IndexCreate_p.html" method="post" enctype="multipart/form-data">
|
||||
There are #[num]# entries in the rejected-urls list.
|
||||
#(only-latest)#
|
||||
::
|
||||
Showing latest #[num]# entries.
|
||||
<input type="hidden" name="showRejected" value="#[newnum]#">
|
||||
<input type="submit" name="moreRejected" value="show more">
|
||||
#(/only-latest)#
|
||||
<input type="submit" name="clearRejected" value="clear list">
|
||||
</form>
|
||||
There are #[num]# entries in the rejected-queue:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableHeader">
|
||||
<th class="small">Initiator</th>
|
||||
<th class="small">Executor</th>
|
||||
<th class="small">URL</th>
|
||||
<th class="small">Fail-Reason</th>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="60" class="small">#[initiator]#</td>
|
||||
<td width="60" class="small">#[executor]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
<td class="small">#[failreason]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
#(/rejected)#
|
||||
<br>
|
||||
#(indexing-queue)#
|
||||
The indexing queue is empty<br>
|
||||
::
|
||||
There are #[num]# entries in the indexing queue:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<th class="small">Initiator</th>
|
||||
<th class="small">Depth</th>
|
||||
<th class="small">Modified Date</th>
|
||||
<th class="small">#HREF</th>
|
||||
<td class="small">Anchor Name</th>
|
||||
<th class="small">URL</th>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="60" class="small">#[initiator]#</td>
|
||||
<td width="10" class="small">#[depth]#</td>
|
||||
<td width="80" class="small">#[modified]#</td>
|
||||
<td width="10" class="small">#[href]#</td>
|
||||
<td width="180" class="small">#[anchor]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
#(/indexing-queue)#
|
||||
<br>
|
||||
#(loader-set)#
|
||||
The loader set is empty<br>
|
||||
::
|
||||
There are #[num]# entries in the loader set:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<th class="small">Initiator</th>
|
||||
<th class="small">Depth</td>
|
||||
<th class="small">URL</th>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="60" class="small">#[initiator]#</td>
|
||||
<td width="10" class="small">#[depth]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
#(/loader-set)#
|
||||
<br>
|
||||
#(crawler-queue)#
|
||||
The crawler queue is empty<br><br>
|
||||
::
|
||||
There are #[num]# entries in the crawler queue. Showing #[show-num]# most recent entries:
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<th class="small">Initiator</th>
|
||||
<th class="small">Depth</th>
|
||||
<th class="small">Modified Date</th>
|
||||
<th class="small">Anchor Name</th>
|
||||
<th class="small">URL</th>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="60" class="small">#[initiator]#</td>
|
||||
<td width="10" class="small">#[depth]#</td>
|
||||
<td width="80" class="small">#[modified]#</td>
|
||||
<td width="180" class="small">#[anchor]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
<br>
|
||||
<form action="IndexCreate_p.html" method="post" enctype="multipart/form-data">
|
||||
<input type="submit" name="clearcrawlqueue" value="clear crawl queue">
|
||||
</form>
|
||||
#(/crawler-queue)#
|
||||
</p>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,368 @@
|
||||
// IndexCreate_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 02.12.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes IndexCreate_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.yacy.*;
|
||||
import java.text.*;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
|
||||
public class IndexCreate_p {
|
||||
|
||||
private static SimpleDateFormat dayFormatter = new SimpleDateFormat("yyyy/MM/dd", Locale.US);
|
||||
private static String daydate(Date date) {
|
||||
if (date == null) return ""; else return dayFormatter.format(date);
|
||||
}
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
prop.put("error", 0);
|
||||
prop.put("info", 0);
|
||||
prop.put("refreshbutton", 0);
|
||||
prop.put("rejected", 0);
|
||||
int showRejectedCount = 10;
|
||||
int i;
|
||||
|
||||
if (post != null) {
|
||||
if (post.containsKey("crawlingstart")) {
|
||||
// init crawl
|
||||
if (yacyCore.seedDB == null) {
|
||||
prop.put("error", 3);
|
||||
} else {
|
||||
// set new properties
|
||||
String newcrawlingfilter = post.get("crawlingFilter", ".*");
|
||||
env.setConfig("crawlingFilter", newcrawlingfilter);
|
||||
int newcrawlingdepth = Integer.parseInt((String) post.get("crawlingDepth", "0"));
|
||||
env.setConfig("crawlingDepth", ("" + newcrawlingdepth));
|
||||
boolean crawlingQ = ((String) post.get("crawlingQ", "")).equals("on");
|
||||
env.setConfig("crawlingQ", (crawlingQ) ? "true" : "false");
|
||||
boolean storeHTCache = ((String) post.get("storeHTCache", "")).equals("on");
|
||||
env.setConfig("storeHTCache", (storeHTCache) ? "true" : "false");
|
||||
boolean localIndexing = ((String) post.get("localIndexing", "")).equals("on");
|
||||
env.setConfig("localIndexing", (localIndexing) ? "true" : "false");
|
||||
boolean crawlOrder = ((String) post.get("crawlOrder", "")).equals("on");
|
||||
env.setConfig("crawlOrder", (crawlOrder) ? "true" : "false");
|
||||
boolean xsstopw = ((String) post.get("xsstopw", "")).equals("on");
|
||||
env.setConfig("xsstopw", (crawlOrder) ? "true" : "false");
|
||||
boolean xdstopw = ((String) post.get("xdstopw", "")).equals("on");
|
||||
env.setConfig("xdstopw", (crawlOrder) ? "true" : "false");
|
||||
boolean xpstopw = ((String) post.get("xpstopw", "")).equals("on");
|
||||
env.setConfig("xpstopw", (crawlOrder) ? "true" : "false");
|
||||
|
||||
String crawlingStart = (String) post.get("crawlingURL");
|
||||
if (!(crawlingStart.startsWith("http"))) crawlingStart = "http://" + crawlingStart;
|
||||
|
||||
// check if url is proper
|
||||
URL crawlingStartURL = null;
|
||||
try {
|
||||
crawlingStartURL = new URL(crawlingStart);
|
||||
} catch (MalformedURLException e) {
|
||||
crawlingStartURL = null;
|
||||
}
|
||||
|
||||
// check if pattern matches
|
||||
if ((crawlingStartURL == null) || (!(crawlingStart.matches(newcrawlingfilter)))) {
|
||||
// print error message
|
||||
prop.put("error", 4); //crawlfilter does not match url
|
||||
prop.put("error_newcrawlingfilter", newcrawlingfilter);
|
||||
prop.put("error_crawlingStart", crawlingStart);
|
||||
} else try {
|
||||
// stack request
|
||||
// first delete old entry, if exists
|
||||
String urlhash = plasmaURL.urlHash(crawlingStart);
|
||||
switchboard.loadedURL.remove(urlhash);
|
||||
switchboard.noticeURL.remove(urlhash);
|
||||
|
||||
// stack url
|
||||
String reasonString = switchboard.stackCrawl(crawlingStart, null, yacyCore.seedDB.mySeed.hash, "CRAWLING-ROOT", new Date(), 0,
|
||||
switchboard.profiles.newEntry(crawlingStartURL.getHost(), crawlingStart, newcrawlingfilter, newcrawlingfilter, newcrawlingdepth, newcrawlingdepth, crawlingQ, storeHTCache, true, localIndexing, crawlOrder, xsstopw, xdstopw, xpstopw));
|
||||
|
||||
if (reasonString == null) {
|
||||
// liftoff!
|
||||
prop.put("info", 2);//start msg
|
||||
prop.put("info_crawlingURL", ((String) post.get("crawlingURL")));
|
||||
} else {
|
||||
prop.put("error", 5); //Crawling failed
|
||||
prop.put("error_crawlingURL", ((String) post.get("crawlingURL")));
|
||||
prop.put("error_reasonString", reasonString);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// mist
|
||||
prop.put("error", 6);//Error with url
|
||||
prop.put("error_crawlingStart", crawlingStart);
|
||||
prop.put("error_error", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (post.containsKey("clearRejected")) {
|
||||
switchboard.errorURL.clearStack();
|
||||
}
|
||||
if (post.containsKey("moreRejected")) {
|
||||
showRejectedCount = Integer.parseInt(post.get("showRejected", "10"));
|
||||
}
|
||||
if (post.containsKey("distributedcrawling")) {
|
||||
boolean crawlResponse = ((String) post.get("crawlResponse", "")).equals("on");
|
||||
env.setConfig("crawlResponse", (crawlResponse) ? "true" : "false");
|
||||
}
|
||||
if (post.containsKey("clearcrawlqueue")) {
|
||||
String urlHash;
|
||||
int c = 0;
|
||||
while (switchboard.noticeURL.localStackSize() > 0) {
|
||||
urlHash = switchboard.noticeURL.localPop().hash();
|
||||
if (urlHash != null) {
|
||||
switchboard.noticeURL.remove(urlHash);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
prop.put("info", 3);//crawling queue cleared
|
||||
prop.put("info_numEntries", c);
|
||||
}
|
||||
}
|
||||
|
||||
// define visible variables
|
||||
prop.put("proxyPrefetchDepth", env.getConfig("proxyPrefetchDepth", "0"));
|
||||
prop.put("crawlingDepth", env.getConfig("crawlingDepth", "0"));
|
||||
prop.put("crawlingFilter", env.getConfig("crawlingFilter", "0"));
|
||||
prop.put("crawlingQChecked", env.getConfig("crawlingQ", "").equals("true") ? 1 : 0);
|
||||
prop.put("storeHTCacheChecked", env.getConfig("storeHTCache", "").equals("true") ? 1 : 0);
|
||||
prop.put("localIndexingChecked", env.getConfig("localIndexing", "").equals("true") ? 1 : 0);
|
||||
prop.put("crawlOrderChecked", env.getConfig("crawlOrder", "").equals("true") ? 1 : 0);
|
||||
prop.put("crawlResponseChecked", env.getConfig("crawlResponse", "").equals("true") ? 1 : 0);
|
||||
prop.put("xsstopwChecked", env.getConfig("xsstopw", "").equals("true") ? 1 : 0);
|
||||
prop.put("xdstopwChecked", env.getConfig("xdstopw", "").equals("true") ? 1 : 0);
|
||||
prop.put("xpstopwChecked", env.getConfig("xpstopw", "").equals("true") ? 1 : 0);
|
||||
|
||||
int processStackSize = switchboard.processStack.size();
|
||||
int loaderThreadsSize = switchboard.cacheLoader.size();
|
||||
int crawlerListSize = switchboard.noticeURL.stackSize();
|
||||
int completequeue = processStackSize + loaderThreadsSize + crawlerListSize;
|
||||
|
||||
if ((completequeue > 0) || ((post != null) && (post.containsKey("refreshpage")))) {
|
||||
prop.put("refreshbutton", 1);
|
||||
}
|
||||
|
||||
// create prefetch table
|
||||
boolean dark;
|
||||
|
||||
// sed crawl profiles
|
||||
int count = 0;
|
||||
//try{
|
||||
Iterator it = switchboard.profiles.profiles(true);
|
||||
plasmaCrawlProfile.entry profile;
|
||||
dark = true;
|
||||
while (it.hasNext()) {
|
||||
profile = (plasmaCrawlProfile.entry) it.next();
|
||||
//table += profile.map().toString() + "<br>";
|
||||
prop.put("crawlProfiles_"+count+"_dark", ((dark) ? 1 : 0));
|
||||
prop.put("crawlProfiles_"+count+"_name", profile.name());
|
||||
prop.put("crawlProfiles_"+count+"_startURL", profile.startURL());
|
||||
prop.put("crawlProfiles_"+count+"_depth", profile.generalDepth());
|
||||
prop.put("crawlProfiles_"+count+"_filter", profile.generalFilter());
|
||||
prop.put("crawlProfiles_"+count+"_withQuery", ((profile.crawlingQ()) ? 1 : 0));
|
||||
prop.put("crawlProfiles_"+count+"_storeCache", ((profile.storeHTCache()) ? 1 : 0));
|
||||
prop.put("crawlProfiles_"+count+"_localIndexing", ((profile.localIndexing()) ? 1 : 0));
|
||||
prop.put("crawlProfiles_"+count+"_remoteIndexing", ((profile.remoteIndexing()) ? 1 : 0));
|
||||
|
||||
dark = !dark;
|
||||
count++;
|
||||
}
|
||||
//}catch(IOException e){};
|
||||
prop.put("crawlProfiles", count);
|
||||
|
||||
// remote crawl peers
|
||||
if (yacyCore.seedDB == null) {
|
||||
//table += "Sorry, cannot show any crawl output now because the system is not completely initialised. Please re-try.";
|
||||
prop.put("error", 3);
|
||||
} else {
|
||||
Enumeration crawlavail = yacyCore.dhtAgent.getAcceptRemoteCrawlSeeds(plasmaURL.dummyHash, true);
|
||||
Enumeration crawlpendi = yacyCore.dhtAgent.getAcceptRemoteCrawlSeeds(plasmaURL.dummyHash, false);
|
||||
if ((!(crawlavail.hasMoreElements())) && (!(crawlpendi.hasMoreElements()))) {
|
||||
prop.put("remoteCrawlPeers", 0); //no peers availible
|
||||
} else {
|
||||
prop.put("remoteCrawlPeers", 1);
|
||||
int maxcount = 100;
|
||||
int availcount = 0;
|
||||
yacySeed seed;
|
||||
while ((availcount < maxcount) && (crawlavail.hasMoreElements())) {
|
||||
seed = (yacySeed) crawlavail.nextElement();
|
||||
prop.put("remoteCrawlPeers_available_" + availcount + "_name", seed.getName());
|
||||
prop.put("remoteCrawlPeers_available_" + availcount + "_due", (yacyCore.yacyTime() - seed.available));
|
||||
availcount++;
|
||||
}
|
||||
prop.put("remoteCrawlPeers_available", availcount);
|
||||
int pendicount = 0;
|
||||
while ((pendicount < maxcount) && (crawlpendi.hasMoreElements())) {
|
||||
seed = (yacySeed) crawlpendi.nextElement();
|
||||
prop.put("remoteCrawlPeers_busy_" + pendicount + "_name", seed.getName());
|
||||
prop.put("remoteCrawlPeers_busy_" + pendicount + "_due", (yacyCore.yacyTime() - seed.available));
|
||||
pendicount++;
|
||||
}
|
||||
prop.put("remoteCrawlPeers_busy", pendicount);
|
||||
prop.put("remoteCrawlPeers_num", (availcount + pendicount));
|
||||
}
|
||||
|
||||
// failure cases
|
||||
if (switchboard.errorURL.stackSize() != 0) {
|
||||
if (showRejectedCount > switchboard.errorURL.stackSize()) showRejectedCount = switchboard.errorURL.stackSize();
|
||||
prop.put("rejected", 1);
|
||||
prop.put("rejected_num", switchboard.errorURL.stackSize());
|
||||
if (showRejectedCount != switchboard.errorURL.stackSize()) {
|
||||
prop.put("rejected_only-latest", 1);
|
||||
prop.put("rejected_only-latest_num", showRejectedCount);
|
||||
prop.put("rejected_only-latest_newnum", ((int) (showRejectedCount * 1.5)));
|
||||
}else{
|
||||
prop.put("rejected_only-latest", 0);
|
||||
}
|
||||
dark = true;
|
||||
String url, initiatorHash, executorHash;
|
||||
plasmaCrawlEURL.entry entry;
|
||||
yacySeed initiatorSeed, executorSeed;
|
||||
int j=0;
|
||||
for (i = switchboard.errorURL.stackSize() - 1; i >= (switchboard.errorURL.stackSize() - showRejectedCount); i--) {
|
||||
entry = (plasmaCrawlEURL.entry) switchboard.errorURL.getStack(i);
|
||||
initiatorHash = entry.initiator();
|
||||
executorHash = entry.executor();
|
||||
url = entry.url().toString();
|
||||
initiatorSeed = yacyCore.seedDB.getConnected(initiatorHash);
|
||||
executorSeed = yacyCore.seedDB.getConnected(executorHash);
|
||||
prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : initiatorSeed.getName()));
|
||||
prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : executorSeed.getName()));
|
||||
prop.put("rejected_list_"+j+"_url", url);
|
||||
prop.put("rejected_list_"+j+"_failreason", entry.failreason());
|
||||
prop.put("rejected_list_"+j+"_dark", ((dark) ? 1 : 0));
|
||||
dark = !dark;
|
||||
j++;
|
||||
}
|
||||
prop.put("rejected_list", j);
|
||||
}
|
||||
|
||||
// now about the current processes
|
||||
if (completequeue > 0) {
|
||||
|
||||
yacySeed initiator;
|
||||
|
||||
if (switchboard.processStack.size() == 0) {
|
||||
prop.put("indexing-queue", 0); //is empty
|
||||
} else {
|
||||
prop.put("indexing-queue", 1);
|
||||
prop.put("indexing-queue_num", switchboard.processStack.size());//num entries in queue
|
||||
dark = true;
|
||||
plasmaHTCache.Entry pcentry;
|
||||
for (i = 0; i < switchboard.processStack.size(); i++) {
|
||||
pcentry = (plasmaHTCache.Entry) switchboard.processStack.get(i);
|
||||
if (pcentry != null) {
|
||||
initiator = yacyCore.seedDB.getConnected(pcentry.initiator());
|
||||
prop.put("indexing-queue_list_"+i+"_dark", ((dark) ? 1 : 0));
|
||||
prop.put("indexing-queue_list_"+i+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()));
|
||||
prop.put("indexing-queue_list_"+i+"_depth", pcentry.depth);
|
||||
prop.put("indexing-queue_list_"+i+"_modified", daydate(pcentry.lastModified));
|
||||
prop.put("indexing-queue_list_"+i+"_href",((pcentry.scraper == null) ? "0" : ("" + pcentry.scraper.getHyperlinks().size())));
|
||||
prop.put("indexing-queue_list_"+i+"_anchor", ((pcentry.scraper == null) ? "-" : pcentry.scraper.getHeadline()) );
|
||||
prop.put("indexing-queue_list_"+i+"_url", pcentry.urlString);
|
||||
dark = !dark;
|
||||
}
|
||||
}
|
||||
prop.put("indexing-queue_list", i);
|
||||
}
|
||||
|
||||
if (loaderThreadsSize == 0) {
|
||||
prop.put("loader-set", 0);
|
||||
} else {
|
||||
prop.put("loader-set", 1);
|
||||
prop.put("loader-set_num", loaderThreadsSize);
|
||||
dark = true;
|
||||
plasmaCrawlLoader.Exec[] loaderThreads = switchboard.cacheLoader.threadStatus();
|
||||
for (i = 0; i < loaderThreads.length; i++) {
|
||||
initiator = yacyCore.seedDB.getConnected(loaderThreads[i].initiator);
|
||||
prop.put("loader-set_list_"+i+"_dark", ((dark) ? 1 : 0) );
|
||||
prop.put("loader-set_list_"+i+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()) );
|
||||
prop.put("loader-set_list_"+i+"_depth", loaderThreads[i].depth );
|
||||
prop.put("loader-set_list_"+i+"_url", loaderThreads[i].url ); // null pointer exception here !!! maybe url = null; check reason.
|
||||
dark = !dark;
|
||||
}
|
||||
prop.put("loader-set_list", i );
|
||||
}
|
||||
|
||||
if (crawlerListSize == 0) {
|
||||
prop.put("crawler-queue", 0);
|
||||
} else {
|
||||
prop.put("crawler-queue", 1);
|
||||
plasmaCrawlNURL.entry[] crawlerList = switchboard.noticeURL.localTop(20);
|
||||
prop.put("crawler-queue_num", crawlerListSize);//num Entries
|
||||
prop.put("crawler-queue_show-num", crawlerList.length); //showin sjow-num most recent
|
||||
plasmaCrawlNURL.entry urle;
|
||||
dark = true;
|
||||
for (i = 0; i < crawlerList.length; i++) {
|
||||
urle = crawlerList[i];
|
||||
if (urle != null) {
|
||||
initiator = yacyCore.seedDB.getConnected(urle.initiator());
|
||||
prop.put("crawler-queue_list_"+i+"_dark", ((dark) ? 1 : 0) );
|
||||
prop.put("crawler-queue_list_"+i+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()) );
|
||||
prop.put("crawler-queue_list_"+i+"_depth", urle.depth());
|
||||
prop.put("crawler-queue_list_"+i+"_modified", daydate(urle.loaddate()) );
|
||||
prop.put("crawler-queue_list_"+i+"_anchor", urle.name());
|
||||
prop.put("crawler-queue_list_"+i+"_url", urle.url());
|
||||
dark = !dark;
|
||||
}
|
||||
}
|
||||
prop.put("crawler-queue_list", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,128 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Index Monitor</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu">
|
||||
<tr height="10"><td colspan="13" class="MenuHeader"> Index Monitor Menu</td></tr>
|
||||
<tr height="2"><td colspan="13"></td></tr>
|
||||
<tr class="TableHeader">
|
||||
<td width="16%" class="MenuSubItem"> <a href="/IndexMonitor.html" class="MenuItemLink">Index Monitor Overview</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=1" class="MenuItemLink">(1) <img border="0" src="/env/grafics/lock.gif" align="top"> Receipts</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=2" class="MenuItemLink">(2) <img border="0" src="/env/grafics/lock.gif" align="top"> Queries</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=3" class="MenuItemLink">(3) <img border="0" src="/env/grafics/lock.gif" align="top"> DHT Transfer</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=4" class="MenuItemLink">(4) <img border="0" src="/env/grafics/lock.gif" align="top"> Proxy Use</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=5" class="MenuItemLink">(5) <img border="0" src="/env/grafics/lock.gif" align="top"> Local Crawling</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="14%" class="MenuSubItem"> <a href="/IndexMonitor.html?process=6" class="MenuItemLink">(6) Global Crawling</a> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
#(process)#
|
||||
<h2>Indexing Queues Monitor Overview</h2>
|
||||
<p>These are monitoring pages for the different indexing queues.<p>
|
||||
<p>YaCy knows 5 different ways to aquire web indexes. The details of these processes (1-5) are described within the submenu's listed
|
||||
above which also will show you a table with indexing results so far. The information in these tables is considered as private,
|
||||
so you need to log-in with your administration password.</p>
|
||||
<p>Case (6) is a monitor of the local receipt-generator, the opposed case of (1). It contains also a indexing result monitor but is not considered private
|
||||
since it shows crawl requests from other peers.
|
||||
</p>
|
||||
<p><img src="/env/grafics/indexmonitor.gif"></p>
|
||||
<p>The image above illustrates the data flow initiated by web index aquisition.
|
||||
Some processes occur double to document the complex index migration structure.
|
||||
</p>
|
||||
::
|
||||
<h2>(1) Index Monitor of Remote Crawl Receipts</h2>
|
||||
<p>This is the list of web pages that this peer initiated to crawl,
|
||||
but had been crawled by <i>other</i> peers.
|
||||
This is the 'mirror'-case of process (6).
|
||||
</p>
|
||||
<p><i>Use Case:</i> You get entries here, if you start a local crawl on the 'Index Creation'-Page and check the
|
||||
'Do Remote Indexing'-flag. Every page that a remote peer indexes upon this peer's request
|
||||
is reported back and can be monitored here.<p>
|
||||
::
|
||||
<h2>(2) Index Monitor for Result of Search Queries</h2>
|
||||
<p>This index transfer was initiated by your peer by doing a search query.
|
||||
The index was crawled and contributed by other peers.</p>
|
||||
<p><i>Use Case:</i> This list fills up if you do a search query on the 'Search Page'</p>
|
||||
::
|
||||
<h2>(3) Index Monitor for Index Transfer.</h2>
|
||||
<p>The url fetch was initiated and executed by other peers.
|
||||
These links here have been transmitted to you because your peer ist most appropriate for storage according to
|
||||
the logic of the Global Distributed Hash Table.</p>
|
||||
<p><i>Use Case:</i> This list may fill if you check the 'Index Receive'-flag on the 'Index Control' page</p>
|
||||
::
|
||||
<h2>(4) Index Monitor for Proxy Indexing</h2>
|
||||
<p>These web pages had been indexed as result of your proxy usage.
|
||||
<b>No personal or protected page is indexed</b>;
|
||||
such pages are detected by Cookie-Use or POST-Parameters (either in URL or as HTTP protocol)
|
||||
and automatically excluded from indexing.</p>
|
||||
<p><i>Use Case:</i> You must use YaCy as proxy to fill up this table.
|
||||
Set your browser's proxy setting to the same port as given
|
||||
on the 'Settings'-page in the 'Proxy and Administration Port' field.</p>
|
||||
::
|
||||
<h2>(5) Index Monitor for Local Crawling.</h2>
|
||||
<p>These web pages had been crawled by your own crawl task.</p>
|
||||
<p><i>Use Case:</i> start a crawl by setting a crawl start point on the 'Index Create' page.</p>
|
||||
::
|
||||
<h2>(6) Index Monitor for Global Crawling</h2>
|
||||
<p>These pages had been indexed by your peer, but the crawl was initiated by a remote peer.
|
||||
This is the 'mirror'-case of process (1).</p>
|
||||
<p><i>Use Case:</i> This list may fill if you check the 'Accept remote crawling requests'-flag on the 'Index Crate' page</p>
|
||||
#(/process)#
|
||||
|
||||
|
||||
#(table)#
|
||||
<p><i>The stack is empty.</i></p>
|
||||
::
|
||||
<p><i>
|
||||
#(size)#
|
||||
Showing all #[all]# entries in this stack.
|
||||
::
|
||||
Showing latest #[count]# lines from a stack of #[all]# entries.
|
||||
#(/size)#
|
||||
</i>
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableHeader">
|
||||
<td class="small"><form action="#[feedbackpage]#" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="process" value="#[tabletype]#">
|
||||
<input type="submit" name="clearlist" value="clear list"></form></td>
|
||||
#(showInit)#::<td class="small"><b>Initiator</b></td>#(/showInit)#
|
||||
#(showExec)#::<td class="small"><b>Executor</b></td>#(/showExec)#
|
||||
<td class="small"><b>Modified Date</b></td>
|
||||
<td class="small"><b>#Words</b></td>
|
||||
<td class="small"><b>Title</b></td>
|
||||
<td class="small"><b>URL</b></td>
|
||||
</tr>
|
||||
#{indexed}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="30" class="small">
|
||||
<form action="#[feedbackpage]#" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="process" value="#[tabletype]#">
|
||||
<input type="hidden" name="hash" value="#[urlhash]#">
|
||||
<input type="submit" name="deleteentry" value="delete" class="small">
|
||||
</form></td>
|
||||
#(showInit)#::<td width="60" class="small">#[initiatorSeed]#</td>#(/showInit)#
|
||||
#(showExec)#::<td width="60" class="small">#[executorSeed]#</td>#(/showExec)#
|
||||
<td width="80" class="small">#[moddate]#</td>
|
||||
<td width="40" class="small">#[wordcount]#</td>
|
||||
<td width="180" class="small">#[urldescr]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
</tr>
|
||||
#{/indexed}#
|
||||
</table><br>
|
||||
</p>
|
||||
::
|
||||
#(/table)#
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,124 @@
|
||||
// IndexMonitor.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last change: 09.03.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Settings_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.yacy.*;
|
||||
import java.text.*;
|
||||
|
||||
public class IndexMonitor {
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
int showIndexedCount = 40;
|
||||
boolean si = false;
|
||||
boolean se = false;
|
||||
|
||||
|
||||
if (post == null) {
|
||||
post = new serverObjects();
|
||||
post.put("process", "0");
|
||||
}
|
||||
|
||||
// find process number
|
||||
int process;
|
||||
try {
|
||||
process = Integer.parseInt(post.get("process", "0"));
|
||||
} catch (NumberFormatException e) {
|
||||
process = 0;
|
||||
}
|
||||
|
||||
// check if authorization is needed and/or given
|
||||
if (((process > 0) && (process < 6)) ||
|
||||
(post.containsKey("clearlist")) ||
|
||||
(post.containsKey("deleteentry"))) {
|
||||
String authorization = ((String) header.get("Authorization", "xxxxxx")).trim().substring(6);
|
||||
if (authorization.length() == 0) {
|
||||
// force log-in
|
||||
prop.put("AUTHENTICATE", "admin log-in");
|
||||
return prop;
|
||||
}
|
||||
String adminAccountBase64MD5 = switchboard.getConfig("adminAccountBase64MD5", "");
|
||||
boolean authenticated = (adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization)));
|
||||
if (!authenticated) {
|
||||
// force log-in (again, because wrong password was given)
|
||||
prop.put("AUTHENTICATE", "admin log-in");
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
|
||||
// do the commands
|
||||
if (post.containsKey("clearlist")) switchboard.loadedURL.clearStack(process);
|
||||
if (post.containsKey("deleteentry")) {
|
||||
String hash = post.get("hash", null);
|
||||
if (hash != null) {
|
||||
// delete from database
|
||||
switchboard.loadedURL.remove(hash);
|
||||
}
|
||||
}
|
||||
if (post.containsKey("moreIndexed")) {
|
||||
showIndexedCount = Integer.parseInt(post.get("showIndexed", "40"));
|
||||
}
|
||||
if (post.get("si") != null) si = true;
|
||||
if (post.get("se") != null) se = true;
|
||||
|
||||
// create table
|
||||
if (process == 0) {
|
||||
prop.put("table", 2);
|
||||
} else {
|
||||
prop.putAll(switchboard.loadedURL.genTableProps(process, showIndexedCount, si, se, "unknown", null, "IndexMonitor.html", true));
|
||||
}
|
||||
prop.put("process", process);
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Index Sharing</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Index Sharing</h2>
|
||||
|
||||
<p>
|
||||
The local index currently consists of (at least) #[wcount]# reverse word indexes and #[ucount]# URL references<br>
|
||||
<form action="IndexShare_p.html" method="get">
|
||||
<table border="0" cellpadding="6" cellspacing="0">
|
||||
<tr valign="top" bgcolor="#CCDDCC">
|
||||
<td>Index: </td>
|
||||
<td>
|
||||
<input type="checkbox" name="distribute" value="" align="top" #[distributecheck]#>distribute <br>
|
||||
<input type="checkbox" name="receive" value="" align="top" #[receivecheck]#>receive
|
||||
</td><td>
|
||||
receive grant default: <br>
|
||||
for each remote peer
|
||||
</td><td>
|
||||
<input type="text" name="linkfreq" value="#[linkfreq]#" size="4" maxlength="4"> links/minute <br>
|
||||
<input type="text" name="wordfreq" value="#[wordfreq]#" size="4" maxlength="4"> words/minute
|
||||
</td><td>
|
||||
<input type="submit" name="indexsharesetting" value="Set">
|
||||
</td>
|
||||
</tr></table>
|
||||
</form>
|
||||
<br>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="240"><center>#[dtable]#</center></td>
|
||||
<td bgcolor="#889988" width="1px"></td>
|
||||
<td width="240"><center>#[rtable]#</center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,87 @@
|
||||
// IndexShare_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last change: 24.08.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes IndexShare_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
//import java.util.*;
|
||||
//import java.net.*;
|
||||
//import java.io.*;
|
||||
//import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.yacy.*;
|
||||
//import de.anomic.htmlFilter.*;
|
||||
|
||||
public class IndexShare_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
if ((post == null) || (env == null)) {
|
||||
prop.put("linkfreq", switchboard.getConfig("defaultLinkReceiveFrequency","30"));
|
||||
prop.put("wordfreq", switchboard.getConfig("defaultWordReceiveFrequency","10"));
|
||||
prop.put("dtable", "");
|
||||
prop.put("rtable", "");
|
||||
prop.put("wcount", "" + switchboard.wordIndex.sizeMin());
|
||||
prop.put("ucount", "" + switchboard.loadedURL.size());
|
||||
return prop; // be save
|
||||
}
|
||||
|
||||
if (post.containsKey("indexsharesetting")) {
|
||||
switchboard.setConfig("allowDistributeIndex", (post.containsKey("distribute")) ? "true" : "false");
|
||||
switchboard.setConfig("allowReceiveIndex", (post.containsKey("receive")) ? "true" : "false");
|
||||
switchboard.setConfig("defaultLinkReceiveFrequency", (String) post.get("linkfreq", "30"));
|
||||
switchboard.setConfig("defaultWordReceiveFrequency", (String) post.get("wordfreq", "10"));
|
||||
}
|
||||
|
||||
// insert constants
|
||||
prop.put("wcount", "" + switchboard.wordIndex.sizeMin());
|
||||
prop.put("ucount", "" + switchboard.loadedURL.size());
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Lab</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>The YACY Lab</h2>
|
||||
|
||||
<p>
|
||||
This is the place where we try new functions and future surplus-values of the AnomicHTTPProxy and the YACY search engine.
|
||||
All these things here are to be considered as probably unstable, and/or experimental.
|
||||
You may try out these things but please do not care about bugs.</p>
|
||||
|
||||
<ul>
|
||||
<li>The <a href="Wiki.html">Wiki</a></li>
|
||||
<li>Advanced <a href="/Config_p.html">Configuration</a></li>
|
||||
</ul>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body bgcolor="#ffffff">
|
||||
<div class="black">
|
||||
<pre>
|
||||
#[log]#
|
||||
</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,103 @@
|
||||
// Log_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last major change: 14.12.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Message.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.data.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Log_p {
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
String log = "";
|
||||
boolean reversed = false;
|
||||
int lines = 50;
|
||||
|
||||
Object logLines[] = serverLog.getLastLog().toArray();
|
||||
|
||||
if(post != null){
|
||||
if(post.containsKey("mode") && ((String)post.get("mode")).equals("reversed")){
|
||||
reversed=true;
|
||||
}
|
||||
if(post.containsKey("lines")){
|
||||
lines = (int)Integer.parseInt((String)post.get("lines"));
|
||||
}
|
||||
}
|
||||
|
||||
if(!reversed){
|
||||
//Iterator it = serverLog.getLastLog().iterator();
|
||||
//while(it.hasNext()){
|
||||
//log += it.next() + "\n";
|
||||
//}
|
||||
|
||||
//either all Entries(<lines) or "lines" entries
|
||||
for(int i=0;i<(lines < logLines.length ? lines : logLines.length);i++){
|
||||
log += (String)logLines[i] + "\n";
|
||||
}
|
||||
}else{
|
||||
for(int i=(logLines.length-1);i>=(logLines.length-1)-lines;i--){
|
||||
if(i>=0){
|
||||
log += (String)logLines[i] + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
prop.put("log", log);
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Send Message</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Send Message</h2><br>
|
||||
|
||||
#[body]#
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,129 @@
|
||||
// MessageSend_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 28.06.2003
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes MessageSend_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class MessageSend_p {
|
||||
|
||||
private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
public static String dateString(Date date) {
|
||||
return SimpleFormatter.format(date);
|
||||
}
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
String body = "";
|
||||
if ((post == null) || (post.get("hash","").length() == 0)) {
|
||||
prop.put("body", "<p>You cannot call this page directly. Instead, use a link on the <a href=\"Network.html\">Network</a> page.</p>");
|
||||
return prop;
|
||||
}
|
||||
|
||||
String hash = post.get("hash", "");
|
||||
String subject = post.get("subject", "");
|
||||
String message = post.get("message", "");
|
||||
|
||||
if (message.length() == 0) {
|
||||
// open a editor page for the message
|
||||
// first ask if the other peer is online, and also what kind of dokument it accepts
|
||||
HashMap result = yacyClient.permissionMessage(hash);
|
||||
//System.out.println("DEBUG: permission request result = " + result.toString());
|
||||
String peerName;
|
||||
if (hash.equals(yacyCore.seedDB.mySeed.hash)) {
|
||||
peerName = yacyCore.seedDB.mySeed.get("Name","nameless");
|
||||
} else {
|
||||
yacySeed targetPeer = yacyCore.seedDB.getConnected(hash);
|
||||
if (targetPeer == null)
|
||||
peerName = "nameless";
|
||||
else
|
||||
peerName = targetPeer.get("Name","nameless");
|
||||
}
|
||||
String response = (result == null) ? "-1" : (String) result.get("response");
|
||||
if ((response == null) || (response.equals("-1"))) {
|
||||
// we don't have permission or other peer does not exist
|
||||
body += "<p>You cannot send a message to '" + peerName + "'. The peer does not respond.</p>";
|
||||
} else {
|
||||
// write input form
|
||||
int messagesize = Integer.parseInt((String) result.get("messagesize"));
|
||||
int attachmentsize = Integer.parseInt((String) result.get("attachmentsize"));
|
||||
body += "<p>The peer '" + peerName + "' is alive and responded:<br>";
|
||||
body += "'" + response + " You are allowed to send me a message ≤ " + messagesize + " kb and an attachment ≤ " + attachmentsize + ".'</p>";
|
||||
body += "<form action=\"MessageSend_p.html\" method=\"post\" enctype=\"multipart/form-data\"><br><br>";
|
||||
body += "<p><h3>Your Message</h3></p>";
|
||||
body += "<p>Subject:<br><input name=\"subject\" type=\"text\" size=\"80\" maxlength=\"80\" value=\"" + subject + "\"></p>";
|
||||
body += "<p>Text:<br><textarea name=\"message\" cols=\"80\" rows=\"8\"></textarea></p>";
|
||||
body += "<input type=\"hidden\" name=\"hash\" value=\"" + hash + "\">";
|
||||
body += "<input type=\"hidden\" name=\"messagesize\" value=\"" + messagesize + "\">";
|
||||
body += "<input type=\"hidden\" name=\"attachmentsize\" value=\"" + attachmentsize + "\">";
|
||||
body += "<input name=\"new\" type=\"submit\" value=\"Enter\"></form>";
|
||||
}
|
||||
} else {
|
||||
// send written message to peer
|
||||
int messagesize = Integer.parseInt(post.get("messagesize", "0"));
|
||||
int attachmentsize = Integer.parseInt(post.get("attachmentsize", "0"));
|
||||
|
||||
if (messagesize < 1000) messagesize = 1000; // debug
|
||||
if (subject.length() > 100) subject = subject.substring(0, 100);
|
||||
if (message.length() > messagesize) message = message.substring(0, messagesize);
|
||||
HashMap result = yacyClient.postMessage(hash, subject, message.getBytes());
|
||||
body += "<p>Your message has been send. The target peer respondet:</p>";
|
||||
body += "<p><i>" + result.get("response") + "</i></p>";
|
||||
}
|
||||
|
||||
// return rewrite properties
|
||||
prop.put("body", body);
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Messages</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Messages</h2><br>
|
||||
|
||||
<p>
|
||||
#[messages]#
|
||||
</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,132 @@
|
||||
// Messages_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 28.06.2003
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Message.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.data.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Messages_p {
|
||||
|
||||
private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
public static String dateString(Date date) {
|
||||
return SimpleFormatter.format(date);
|
||||
}
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
String action = ((post == null) ? "list" : post.get("action", "list"));
|
||||
String messages = "";
|
||||
messageBoard.entry message;
|
||||
|
||||
// first reset notification
|
||||
File notifierSource = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot") + "/env/grafics/notifierInactive.gif");
|
||||
File notifierDest = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot") + "/env/grafics/notifier.gif");
|
||||
try {serverFileUtils.copy(notifierSource, notifierDest);} catch (IOException e) {};
|
||||
|
||||
if (action.equals("delete")) {
|
||||
String key = post.get("object","");
|
||||
switchboard.messageDB.remove(key);
|
||||
action = "list";
|
||||
}
|
||||
|
||||
if (action.equals("list")) {
|
||||
messages +=
|
||||
"<table border=\"0\" cellpadding=\"2\" cellspacing=\"1\">" +
|
||||
"<tr class=\"MenuHeader\"><td>Date</td><td>From</td><td>To</td><td>Subject</td><td>Action</td></tr>";
|
||||
try {
|
||||
Iterator i = switchboard.messageDB.keys("remote", true);
|
||||
String key;
|
||||
|
||||
boolean dark = true;
|
||||
while (i.hasNext()) {
|
||||
key = (String) i.next();
|
||||
message = switchboard.messageDB.read(key);
|
||||
messages += "<tr class=\"TableCell" + ((dark) ? "Dark" : "Light") + "\">"; dark = !dark;
|
||||
messages += "<td>" + dateString(message.date()) + "</td>";
|
||||
messages += "<td>" + message.author() + "</td>";
|
||||
messages += "<td>" + message.recipient() + "</td>";
|
||||
messages += "<td>" + message.subject() + "</td>";
|
||||
messages += "<td>" +
|
||||
"<a href=\"Messages_p.html?action=view&object=" + key + "\">view</a> / " +
|
||||
"<a href=\"MessageSend_p.html?hash=" + message.authorHash() + "&subject=Re: " + message.subject() + "\">reply</a> / " +
|
||||
"<a href=\"Messages_p.html?action=delete&object=" + key + "\">delete</a>" +
|
||||
"</td>";
|
||||
messages += "</tr>";
|
||||
}
|
||||
messages += "</table>";
|
||||
} catch (IOException e) {
|
||||
messages += "IO Error reading message Table: " + e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (action.equals("view")) {
|
||||
String key = post.get("object","");
|
||||
message = switchboard.messageDB.read(key);
|
||||
messages += "<table border=\"0\" cellpadding=\"2\" cellspacing=\"1\">";
|
||||
messages += "<tr><td class=\"MenuHeader\">From:</td><td class=\"MessageBackground\">" + message.author() + "</td></tr>";
|
||||
messages += "<tr><td class=\"MenuHeader\">To:</td><td class=\"MessageBackground\">" + message.recipient() + "</td></tr>";
|
||||
messages += "<tr><td class=\"MenuHeader\">Send Date:</td><td class=\"MessageBackground\">" + dateString(message.date()) + "</td></tr>";
|
||||
messages += "<tr><td class=\"MenuHeader\">Subject:</td><td class=\"MessageBackground\">" + message.subject() + "</td></tr>";
|
||||
messages += "<tr><td class=\"MessageBackground\" colspan=\"2\">" + new String(message.message()) + "</td></tr>";
|
||||
messages += "</table>";
|
||||
}
|
||||
|
||||
prop.put("messages", messages);
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Network Overview</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu">
|
||||
<tr height="10"><td colspan="7" class="MenuHeader"> Network Menu</td></tr>
|
||||
<tr height="2"><td colspan="7"></td></tr>
|
||||
<tr class="TableHeader">
|
||||
<td width="25%" class="MenuSubItem"> <a href="/Network.html" class="MenuItemLink">Network Overview</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="25%" class="MenuSubItem"> <a href="/Network.html?page=1" class="MenuItemLink">Active Peers</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="25%" class="MenuSubItem"> <a href="/Network.html?page=2" class="MenuItemLink">Passive Peers</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="25%" class="MenuSubItem"> <a href="/Network.html?page=3" class="MenuItemLink">Potential Peers</a> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
#(page)#
|
||||
<h2>Network Overview</h2>
|
||||
::
|
||||
<h2>Active Peers</h2>
|
||||
::
|
||||
<h2>Passive Peers</h2>
|
||||
::
|
||||
<h2>Potential Peers</h2>
|
||||
#(/page)#
|
||||
<p>
|
||||
#(table)#
|
||||
<p>no remote #[peertype]# peer for this list known</p>
|
||||
::
|
||||
<p>Showing #[num]# entries from a total of #[total]# peers.<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td class="small">Profile<br> </td>
|
||||
<td class="small">Message<br> </td>
|
||||
<td class="small">Name*<br> </td>
|
||||
#(complete)#::
|
||||
<td class="small">Address<br> </td>
|
||||
<td class="small">Hash<br> </td>
|
||||
#(/complete)#
|
||||
<td class="small">Type<br> </td>
|
||||
<td class="small">Version<br> </td>
|
||||
<td class="small">Contact<br> </td>
|
||||
<td class="small">Last Seen<br>#min ago<br> <br> <a href="/Network.html?page=#[page]#&sort=LastSeen&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=LastSeen&order=down">></a></td>
|
||||
<td class="small">Uptime<br>#minutes<br> <a href="/Network.html?page=#[page]#&sort=Uptime&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=Uptime&order=down">></a></td>
|
||||
<td class="small">#Links<br> <a href="/Network.html?page=#[page]#&sort=LCount&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=LCount&order=down">></a></td>
|
||||
<td class="small">#RWI's<br> <a href="/Network.html?page=#[page]#&sort=ICount&order=up"><</a> <a href="/Network.html?page=#[page]#&sort=ICount&order=down">></a></td>
|
||||
<td class="small">Accept<br>Crawl<br> </td>
|
||||
<td class="small">Accept<br>Index<br> </td>
|
||||
<td class="small">Sent<br>Words<br> </td>
|
||||
<td class="small">Sent<br>URL's<br> </td>
|
||||
<td class="small">Received<br>Words<br> </td>
|
||||
<td class="small">Received<br>URL's<br> </td>
|
||||
<td class="small">#Seeds<br> </td>
|
||||
<td class="small">#Connects<br>per hour<br> </td></tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
|
||||
<td class="small"><a href="ViewProfile.html?hash=#[hash]#" class="small">view</a></td>
|
||||
<td class="small"><a href="MessageSend_p.html?hash=#[hash]#" class="small">send</a></td>
|
||||
<td class="small"><a href="http://www.#[fullname]#.yacy" class="small">#[shortname]#</a></td>
|
||||
#(complete)#
|
||||
::
|
||||
<td class="small"><a href="http://#[ip]#:#[port]#/NetworkActive.html?ip=" class="small">http://#[ip]#:#[port]#</a></td>
|
||||
<td class=small>#[hash]#</td>
|
||||
#(/complete)#
|
||||
<td class="small">#(type)#junior::senior::<a href="#[url]#" class="small">principal</a>#(/type)#</td>
|
||||
<td class="small" align="right">#[version]#</td>
|
||||
<td class="small" align="right">#(contact)#passive::direct#(/contact)#</td>
|
||||
<td class="small" align="right">#[lastSeen]#</td>
|
||||
<td class="small" align="right">#[uptime]#</td>
|
||||
<td class="small" align="right">#[links]#</td>
|
||||
<td class="small" align="right">#[words]#</td>
|
||||
<td class="small" align="right">#(acceptcrawl)#no::yes#(/acceptcrawl)#</td>
|
||||
<td class="small" align="right">#(acceptindex)#no::yes#(/acceptindex)#</td>
|
||||
<td class="small" align="right">#[sI]#</td>
|
||||
<td class="small" align="right">#[sU]#</td>
|
||||
<td class="small" align="right">#[rI]#</td>
|
||||
<td class="small" align="right">#[rU]#</td>
|
||||
<td class="small" align="right">#[seeds]#</td>
|
||||
<td class="small" align="right">#[connects]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
</p>
|
||||
::
|
||||
<p><font size="1">All Peers:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<td class="small">Branch</td>
|
||||
<td class="small">#Peers</td>
|
||||
<td class="small">#All Links</td>
|
||||
<td class="small">#All Words</td>
|
||||
</tr>
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">Active (connected Senior and Principal)</td>
|
||||
<td class="small" align="right">#[active-count]#</td>
|
||||
<td class="small" align="right">#[active-links]#</td>
|
||||
<td class="small" align="right">#[active-words]#</td>
|
||||
</tr>
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">Passive (disconnected Senior and Principal)</td>
|
||||
<td class="small" align="right">#[passive-count]#</td>
|
||||
<td class="small" align="right">#[passive-links]#</td>
|
||||
<td class="small" align="right">#[passive-words]#</td>
|
||||
</tr>
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">Potential (Junior)</td>
|
||||
<td class="small" align="right">#[potential-count]#</td>
|
||||
<td class="small" align="right">#[potential-links]#</td>
|
||||
<td class="small" align="right">#[potential-words]#</td>
|
||||
</tr>
|
||||
<tr class="TableCellSummary">
|
||||
<td class="small" align="left">Network Total</td>
|
||||
<td class="small" align="right">#[all-count]#</td>
|
||||
<td class="small" align="right">#[all-links]#</td>
|
||||
<td class="small" align="right">#[all-words]#</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<p>Your Peer:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader">
|
||||
<td class="small">Name</td>
|
||||
<td class="small">Type</td>
|
||||
<td class="small">Version</td>
|
||||
<td class="small">Uptime<br>#minutes</td>
|
||||
<td class="small">#Links</td>
|
||||
<td class="small">#RWI's</td>
|
||||
<td class="small">Accept<br>Crawl</td>
|
||||
<td class="small">Accept<br>Index</td>
|
||||
<td class="small">Sent<br>Words</td>
|
||||
<td class="small">Sent<br>URL's</td>
|
||||
<td class="small">Received<br>Words</td>
|
||||
<td class="small">Received<br>URL's</td>
|
||||
<td class="small">#Seeds</td>
|
||||
<td class="small">#Connects<br>per hour</td>
|
||||
</tr>
|
||||
<tr class="TableCellDark">
|
||||
<td class="small">#[my-name]#</td>
|
||||
<td class="small">#(my-type)#virgin::junior::senior::principal#(/my-type)#</td>
|
||||
<td class="small" align="right">#[my-version]#</td>
|
||||
<td class="small" align="right">#[my-uptime]#</td>
|
||||
<td class="small" align="right">#[my-links]#</td>
|
||||
<td class="small" align="right">#[my-words]#</td>
|
||||
<td class="small" align="right">#(my-acceptcrawl)#no::yes#(/my-acceptcrawl)#</td>
|
||||
<td class="small" align="right">#(my-acceptindex)#no::yes#(/my-acceptindex)#</td>
|
||||
<td class="small" align="right">#[my-sI]#</td>
|
||||
<td class="small" align="right">#[my-sU]#</td>
|
||||
<td class="small" align="right">#[my-rI]#</td>
|
||||
<td class="small" align="right">#[my-rU]#</td>
|
||||
<td class="small" align="right">#[my-seeds]#</td>
|
||||
<td class="small" align="right">#[my-connects]#</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<p>
|
||||
#(comment)#
|
||||
::
|
||||
You are in online mode, but probably no internet resource is available. Please check you internet connection.
|
||||
::
|
||||
You are either not in online mode or you do not use the proxy option.
|
||||
To get connection to the YACY network, you must use the proxy by setting your browsers settings
|
||||
('on-demand - mode', see <a href="http://www.anomic.de/AnomicHTTPProxy/Installation.html#wininst">here</a>
|
||||
for an installation guide) or you can go online by activating the permanent online mode.
|
||||
To do this, press this button:
|
||||
<form action="SettingsAck_p.html" method="get">
|
||||
<input type="submit" name="pmode" value="go online">
|
||||
</form>
|
||||
#(/comment)#
|
||||
</p></font>
|
||||
#(/table)#
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,264 @@
|
||||
// Network.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last major change: 16.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Network.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.yacy.*;
|
||||
|
||||
public class Network {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
boolean overview = (post == null) || (((String) post.get("page", "0")).equals("0"));
|
||||
|
||||
String mySeedType = yacyCore.seedDB.mySeed.get("PeerType", "virgin");
|
||||
boolean iAmActive = (mySeedType.equals("senior")) || (mySeedType.equals("principal"));
|
||||
|
||||
if (overview) {
|
||||
long accActLinks = yacyCore.seedDB.countActiveURL();
|
||||
long accActWords = yacyCore.seedDB.countActiveRWI();
|
||||
long accPassLinks = yacyCore.seedDB.countPassiveURL();
|
||||
long accPassWords = yacyCore.seedDB.countPassiveRWI();
|
||||
long accPotLinks = yacyCore.seedDB.countPotentialURL();
|
||||
long accPotWords = yacyCore.seedDB.countPotentialRWI();
|
||||
|
||||
int conCount = yacyCore.seedDB.sizeConnected();
|
||||
int disconCount = yacyCore.seedDB.sizeDisconnected();
|
||||
int potCount = yacyCore.seedDB.sizePotential();
|
||||
|
||||
boolean complete = ((post == null) ? false : post.get("links", "false").equals("true"));
|
||||
|
||||
// create own peer info
|
||||
yacySeed seed = yacyCore.seedDB.mySeed;
|
||||
if (yacyCore.seedDB.mySeed != null){ //our Peer
|
||||
long links, words;
|
||||
try {
|
||||
links = Long.parseLong(seed.get("LCount", "0"));
|
||||
words = Long.parseLong(seed.get("ICount", "0"));
|
||||
} catch (Exception e) {links = 0; words = 0;}
|
||||
|
||||
prop.put("table_my-name", seed.get("Name", "-") );
|
||||
if (yacyCore.seedDB.mySeed.isVirgin()) {
|
||||
prop.put("table_my-type", 0);
|
||||
} else if(yacyCore.seedDB.mySeed.isJunior()) {
|
||||
prop.put("table_my-type", 1);
|
||||
accPotLinks += links;
|
||||
accPotWords += words;
|
||||
} else if(yacyCore.seedDB.mySeed.isSenior()) {
|
||||
prop.put("table_my-type", 2);
|
||||
accActLinks += links;
|
||||
accActWords += words;
|
||||
} else if(yacyCore.seedDB.mySeed.isPrincipal()) {
|
||||
prop.put("table_my-type", 3);
|
||||
accActLinks += links;
|
||||
accActWords += words;
|
||||
}
|
||||
prop.put("table_my-version", seed.get("Version", "-"));
|
||||
prop.put("table_my-uptime", seed.get("Uptime", "-"));
|
||||
prop.put("table_my-links", groupDigits(links));
|
||||
prop.put("table_my-words", groupDigits(words));
|
||||
prop.put("table_my-acceptcrawl", "" + (seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );
|
||||
prop.put("table_my-acceptindex", "" + (seed.getFlagAcceptRemoteIndex() ? 1 : 0) );
|
||||
prop.put("table_my-sI", seed.get("sI", "-"));
|
||||
prop.put("table_my-sU", seed.get("sU", "-"));
|
||||
prop.put("table_my-rI", seed.get("rI", "-"));
|
||||
prop.put("table_my-rU", seed.get("rU", "-"));
|
||||
prop.put("table_my-seeds", seed.get("SCount", "-"));
|
||||
prop.put("table_my-connects", seed.get("CCount", "-"));
|
||||
}
|
||||
|
||||
// overall results: Network statistics
|
||||
if (iAmActive) conCount++; else if (mySeedType.equals("junior")) potCount++;
|
||||
prop.put("table_active-count", conCount);
|
||||
prop.put("table_active-links", groupDigits(accActLinks));
|
||||
prop.put("table_active-words", groupDigits(accActWords));
|
||||
prop.put("table_passive-count", disconCount);
|
||||
prop.put("table_passive-links", groupDigits(accPassLinks));
|
||||
prop.put("table_passive-words", groupDigits(accPassWords));
|
||||
prop.put("table_potential-count", potCount);
|
||||
prop.put("table_potential-links", groupDigits(accPotLinks));
|
||||
prop.put("table_potential-words", groupDigits(accPotWords));
|
||||
prop.put("table_all-count", (conCount + disconCount + potCount));
|
||||
prop.put("table_all-links", groupDigits(accActLinks + accPassLinks + accPotLinks));
|
||||
prop.put("table_all-words", groupDigits(accActWords + accPassWords + accPotWords));
|
||||
|
||||
String comment = "";
|
||||
prop.put("table_comment", 0);
|
||||
if (conCount == 0) {
|
||||
if (Integer.parseInt(sb.getConfig("onlineMode", "1")) == 2) {
|
||||
prop.put("table_comment", 1);//in onlinemode, but not online
|
||||
} else {
|
||||
prop.put("table_comment", 2);//not in online mode, and not online
|
||||
}
|
||||
}
|
||||
prop.put("table", 2); // triggers overview
|
||||
prop.put("page", 0);
|
||||
} else {
|
||||
// generate table
|
||||
int page = Integer.parseInt(post.get("page", "1"));
|
||||
int conCount = 0;
|
||||
int maxCount = 100;
|
||||
if (yacyCore.seedDB == null) {
|
||||
prop.put("table", 0);//no remote senior/principal proxies known"
|
||||
} else {
|
||||
int size = 0;
|
||||
switch (page) {
|
||||
case 1 : size = yacyCore.seedDB.sizeConnected(); break;
|
||||
case 2 : size = yacyCore.seedDB.sizeDisconnected(); break;
|
||||
case 3 : size = yacyCore.seedDB.sizePotential(); break;
|
||||
}
|
||||
if (size == 0) {
|
||||
prop.put("table", 0);//no remote senior/principal proxies known"
|
||||
} else {
|
||||
// add temporary the own seed to the database
|
||||
if (iAmActive) {
|
||||
yacyCore.peerActions.updateMySeed();
|
||||
yacyCore.seedDB.addConnected(yacyCore.seedDB.mySeed);
|
||||
}
|
||||
boolean dark = true;
|
||||
yacySeed seed;
|
||||
boolean complete = post.containsKey("ip");
|
||||
Enumeration e = null;
|
||||
switch (page) {
|
||||
case 1 : e = yacyCore.seedDB.seedsSortedConnected(post.get("order", "down").equals("up"), post.get("sort", "ICount")); break;
|
||||
case 2 : e = yacyCore.seedDB.seedsSortedDisconnected(post.get("order", "up").equals("up"), post.get("sort", "LastSeen")); break;
|
||||
case 3 : e = yacyCore.seedDB.seedsSortedPotential(post.get("order", "up").equals("up"), post.get("sort", "LastSeen")); break;
|
||||
}
|
||||
while ((e.hasMoreElements()) && (conCount < maxCount)) {
|
||||
seed = (yacySeed) e.nextElement();
|
||||
if (seed != null) {
|
||||
if (conCount >= maxCount) break;
|
||||
if (seed.hash.equals(yacyCore.seedDB.mySeed.hash)) {
|
||||
prop.put("table_list_"+conCount+"_dark", 2);
|
||||
} else {
|
||||
prop.put("table_list_"+conCount+"_dark", ((dark) ? 1 : 0) ); dark=!dark;
|
||||
}
|
||||
long links, words;
|
||||
try {
|
||||
links = Long.parseLong(seed.get("LCount", "0"));
|
||||
words = Long.parseLong(seed.get("ICount", "0"));
|
||||
} catch (Exception exc) {links = 0; words = 0;}
|
||||
prop.put("table_list_"+conCount+"_complete", ((complete)? 1 : 0) );
|
||||
prop.put("table_list_"+conCount+"_hash", seed.hash);
|
||||
String shortname = seed.get("Name", "deadlink");
|
||||
if (shortname.length() > 20) shortname = shortname.substring(0, 20) + "...";
|
||||
prop.put("table_list_"+conCount+"_shortname", shortname);
|
||||
prop.put("table_list_"+conCount+"_fullname", seed.get("Name", "deadlink"));
|
||||
if (complete) {
|
||||
prop.put("table_list_"+conCount+"_complete", 1);
|
||||
prop.put("table_list_"+conCount+"_complete_ip", seed.get("IP", "-") );
|
||||
prop.put("table_list_"+conCount+"_complete_port", seed.get("Port", "-") );
|
||||
prop.put("table_list_"+conCount+"_complete_hash", seed.hash);
|
||||
}else{
|
||||
prop.put("table_list_"+conCount+"_complete", 0);
|
||||
}
|
||||
if (seed.isJunior()) {
|
||||
prop.put("table_list_"+conCount+"_type", 0);
|
||||
} else if(seed.isSenior()){
|
||||
prop.put("table_list_"+conCount+"_type", 1);
|
||||
} else if(seed.isPrincipal()) {
|
||||
prop.put("table_list_"+conCount+"_type", 2);
|
||||
prop.put("table_list_"+conCount+"_type_url", seed.get("seedURL", "http://nowhere/") );
|
||||
}
|
||||
prop.put("table_list_"+conCount+"_version", seed.get("Version", "-"));
|
||||
prop.put("table_list_"+conCount+"_contact", (seed.getFlagDirectConnect() ? 1 : 0) );
|
||||
prop.put("table_list_"+conCount+"_lastSeen", lastSeen(seed.get("LastSeen", "-")) );
|
||||
prop.put("table_list_"+conCount+"_uptime", seed.get("Uptime", "-") );
|
||||
prop.put("table_list_"+conCount+"_links", groupDigits(links));
|
||||
prop.put("table_list_"+conCount+"_words", groupDigits(words));
|
||||
prop.put("table_list_"+conCount+"_acceptcrawl", (seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );
|
||||
prop.put("table_list_"+conCount+"_acceptindex", (seed.getFlagAcceptRemoteIndex() ? 1 : 0) );
|
||||
prop.put("table_list_"+conCount+"_sI", seed.get("sI", "-"));
|
||||
prop.put("table_list_"+conCount+"_sU", seed.get("sU", "-"));
|
||||
prop.put("table_list_"+conCount+"_rI", seed.get("rI", "-"));
|
||||
prop.put("table_list_"+conCount+"_rU", seed.get("rU", "-"));
|
||||
prop.put("table_list_"+conCount+"_seeds", seed.get("SCount", "-"));
|
||||
prop.put("table_list_"+conCount+"_connects", seed.get("CCount", "-"));
|
||||
conCount++;
|
||||
}//seed != null
|
||||
}//while
|
||||
if (iAmActive) yacyCore.seedDB.removeMySeed();
|
||||
prop.put("table_list", conCount);
|
||||
prop.put("table", 1);
|
||||
prop.put("table_num", conCount);
|
||||
prop.put("table_total", (maxCount > conCount) ? conCount : maxCount);
|
||||
prop.put("table_complete", ((complete)? 1 : 0) );
|
||||
}
|
||||
}
|
||||
prop.put("page", page);
|
||||
prop.put("table_page", page);
|
||||
switch (page) {
|
||||
case 1 : prop.put("table_peertype", "senior/principal"); break;
|
||||
case 2 : prop.put("table_peertype", "senior/principal"); break;
|
||||
case 3 : prop.put("table_peertype", "junior"); break;
|
||||
}
|
||||
}
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
private static String lastSeen(String date) {
|
||||
long l = 0;
|
||||
if (date.length() == 0)
|
||||
l = 999;
|
||||
else
|
||||
try {
|
||||
l = (yacyCore.universalTime() - yacyCore.shortFormatter.parse(date).getTime()) / 1000 / 60;
|
||||
} catch (java.text.ParseException e) {
|
||||
l = 999;
|
||||
}
|
||||
if (l == 999) return "-"; else return "" + l;
|
||||
}
|
||||
|
||||
private static String groupDigits(long Number) {
|
||||
String s = "" + Number;
|
||||
String t = "";
|
||||
for (int i = 0; i < s.length(); i++) t = s.charAt(s.length() - i - 1) + (((i % 3) == 0) ? "," : "") + t;
|
||||
return t.substring(0, t.length() - 1);
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
#(table)#
|
||||
::
|
||||
::
|
||||
<peers>
|
||||
<active>
|
||||
<count>#[active-count]#</count>
|
||||
<links>#[active-links]#</links>
|
||||
<words>#[active-words]#</words>
|
||||
</active>
|
||||
<passive>
|
||||
<count>#[passive-count]#</count>
|
||||
<links>#[passive-links]#</links>
|
||||
<words>#[passive-words]#</words>
|
||||
</passive>
|
||||
<potential>
|
||||
<count>#[potential-count]#</count>
|
||||
<links>#[potential-links]#</links>
|
||||
<words>#[potential-words]#</words>
|
||||
</potential>
|
||||
<all>
|
||||
<count>#[all-count]#</count>
|
||||
<links>#[all-links]#</links>
|
||||
<words>#[all-words]#</words>
|
||||
</all>
|
||||
<your>
|
||||
<name>#[my-name]#</name>
|
||||
<type>#(my-type)#virgin::junior::senior::principal#(/my-type)#</type>
|
||||
<version>#[my-version]#</version>
|
||||
<uptime>#[my-uptime]#</uptime>
|
||||
<links>#[my-links]#</links>
|
||||
<acceptcrawl>#[my-acceptcrawl]#</acceptcrawl>
|
||||
<acceptindex>#[my-acceptindex]#</acceptindex>
|
||||
<sentwords>#[my-sI]#</sentwords>
|
||||
<senturls>#[my-sU]#</senturls>
|
||||
<receivedwords>#[my-rI]#</receivedwords>
|
||||
<receivedurls>#[my-rU]#</receivedurls>
|
||||
<seeds>#[my-seeds]#</seeds>
|
||||
<connects>#[my-connects]#</connects>
|
||||
</your>
|
||||
<status>#[comment]#</status>
|
||||
<!--
|
||||
0 - nothing
|
||||
1 - online Mode, but no Internet availible
|
||||
2 - not in online Mode
|
||||
-->
|
||||
</peers>
|
||||
#(/table)#
|
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Performace</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Performance</h2>
|
||||
<p>
|
||||
You can manipulate some performance attributes here.<br>
|
||||
<form action="Performance_p.html" method="post" enctype="multipart/form-data">
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td class="small">Thread</td>
|
||||
<td class="small">Queue Size</td>
|
||||
<td class="small" colspan="2">Total<br>Block Time</td>
|
||||
<td class="small" colspan="2">Total<br>Sleep Time</td>
|
||||
<td class="small" colspan="2">Total<br>Exec Time</td>
|
||||
<td class="small">Total<br>Cycles</td>
|
||||
<td class="small">Idle<br>Cycles</td>
|
||||
<td class="small">Busy<br>Cycles</td>
|
||||
<td class="small">Sleep Time<br>per Cycle<br>(milliseconds)</td>
|
||||
<td class="small">Exec Time<br>per Busy-Cycle<br>(milliseconds)</td>
|
||||
<td class="small">Delay between<br>idle loops</td>
|
||||
<td class="small">Delay between<br>busy loops</td>
|
||||
<td class="small">Full Description</td>
|
||||
</tr>
|
||||
#{table}#
|
||||
<tr class="TableCellDark">
|
||||
<td class="small" align="left">#[shortdescr]#</td>
|
||||
<td class="small" align="right">#[queuesize]#</td>
|
||||
<td class="small" align="right">#[blocktime]# sec</td>
|
||||
<td class="small" align="right">#[blockpercent]#%</td>
|
||||
<td class="small" align="right">#[sleeptime]# sec</td>
|
||||
<td class="small" align="right">#[sleeppercent]#%</td>
|
||||
<td class="small" align="right">#[exectime]# sec</td>
|
||||
<td class="small" align="right">#[execpercent]#%</td>
|
||||
<td class="small" align="right">#[totalcycles]#</td>
|
||||
<td class="small" align="right">#[idlecycles]#</td>
|
||||
<td class="small" align="right">#[busycycles]#</td>
|
||||
<td class="small" align="right">#[sleeppercycle]#</td>
|
||||
<td class="small" align="right">#[execpercycle]#</td>
|
||||
<td class="small" align="right"><input name="#[threadname]#_idlesleep" type="text" size="4" maxlength="4" value="#[idlesleep]#"> sec</td>
|
||||
<td class="small" align="right"><input name="#[threadname]#_busysleep" type="text" size="4" maxlength="4" value="#[busysleep]#"> sec</td>
|
||||
<td class="small" align="left">#[longdescr]#</td>
|
||||
</tr>
|
||||
#{/table}#
|
||||
</table><br>
|
||||
<input type="submit" name="delaysubmit" value="Submit New Delay Values">
|
||||
Changes take effect immidiately
|
||||
</p></form>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,137 @@
|
||||
// Performace_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last major change: 16.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Network.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.net.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
|
||||
public class Performance_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
Iterator threads = switchboard.threadNames();
|
||||
String threadName;
|
||||
serverThread thread;
|
||||
|
||||
// calculate totals
|
||||
long blocktime_total = 0, sleeptime_total = 0, exectime_total = 0;
|
||||
while (threads.hasNext()) {
|
||||
threadName = (String) threads.next();
|
||||
thread = switchboard.getThread(threadName);
|
||||
blocktime_total += thread.getBlockTime();
|
||||
sleeptime_total += thread.getSleepTime();
|
||||
exectime_total += thread.getExecTime();
|
||||
}
|
||||
if (blocktime_total == 0) blocktime_total = 1;
|
||||
if (sleeptime_total == 0) sleeptime_total = 1;
|
||||
if (exectime_total == 0) exectime_total = 1;
|
||||
|
||||
// set templates for latest news from the threads
|
||||
long blocktime, sleeptime, exectime;
|
||||
long idlesleep, busysleep;
|
||||
int queuesize;
|
||||
threads = switchboard.threadNames();
|
||||
int c = 0;
|
||||
long idleCycles, busyCycles;
|
||||
while (threads.hasNext()) {
|
||||
threadName = (String) threads.next();
|
||||
thread = switchboard.getThread(threadName);
|
||||
|
||||
// set values to templates
|
||||
prop.put("table_" + c + "_threadname", threadName);
|
||||
prop.put("table_" + c + "_shortdescr", thread.getShortDescription());
|
||||
prop.put("table_" + c + "_longdescr", thread.getLongDescription());
|
||||
queuesize = thread.getJobCount();
|
||||
prop.put("table_" + c + "_queuesize", (queuesize == Integer.MAX_VALUE) ? "unlimited" : ("" + queuesize));
|
||||
|
||||
blocktime = thread.getBlockTime();
|
||||
sleeptime = thread.getSleepTime();
|
||||
exectime = thread.getExecTime();
|
||||
idleCycles = thread.getIdleCycles();
|
||||
busyCycles = thread.getBusyCycles();
|
||||
prop.put("table_" + c + "_blocktime", blocktime / 1000);
|
||||
prop.put("table_" + c + "_blockpercent", "" + (100 * blocktime / blocktime_total));
|
||||
prop.put("table_" + c + "_sleeptime", sleeptime / 1000);
|
||||
prop.put("table_" + c + "_sleeppercent", "" + (100 * sleeptime / sleeptime_total));
|
||||
prop.put("table_" + c + "_exectime", exectime / 1000);
|
||||
prop.put("table_" + c + "_execpercent", "" + (100 * exectime / exectime_total));
|
||||
prop.put("table_" + c + "_totalcycles", "" + (idleCycles + busyCycles));
|
||||
prop.put("table_" + c + "_idlecycles", "" + idleCycles);
|
||||
prop.put("table_" + c + "_busycycles", "" + busyCycles);
|
||||
prop.put("table_" + c + "_sleeppercycle", ((idleCycles + busyCycles) == 0) ? "-" : ("" + (sleeptime / (idleCycles + busyCycles))));
|
||||
prop.put("table_" + c + "_execpercycle", (busyCycles == 0) ? "-" : ("" + (exectime / busyCycles)));
|
||||
|
||||
if (post == null) {
|
||||
// load with old values
|
||||
idlesleep = Long.parseLong(switchboard.getConfig(threadName + "_idlesleep" , "1000"));
|
||||
busysleep = Long.parseLong(switchboard.getConfig(threadName + "_busysleep", "1000"));
|
||||
} else {
|
||||
// load with new values
|
||||
idlesleep = Long.parseLong((String) post.get(threadName + "_idlesleep", "1")) * 1000;
|
||||
busysleep = Long.parseLong((String) post.get(threadName + "_busysleep", "1")) * 1000;
|
||||
|
||||
// on-the-fly re-configuration
|
||||
switchboard.setThreadSleep(threadName, idlesleep, busysleep);
|
||||
switchboard.setConfig(threadName + "_idlesleep", idlesleep);
|
||||
switchboard.setConfig(threadName + "_busysleep", busysleep);
|
||||
}
|
||||
prop.put("table_" + c + "_idlesleep", idlesleep / 1000);
|
||||
prop.put("table_" + c + "_busysleep", busysleep / 1000);
|
||||
|
||||
c++;
|
||||
}
|
||||
prop.put("table", c);
|
||||
|
||||
// return rewrite values for templates
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Proxy Index Monitor</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Index Monitor for Proxy Indexing</h2>
|
||||
<p>
|
||||
This is the control page for web pages that your peer has indexed during the current application run-time
|
||||
as result of proxy fetch/prefetch.
|
||||
<b>No personal or protected page is indexed</b>;
|
||||
those pages are detected by Cookie-Use or POST-Parameters (either in URL or as HTTP protocol)
|
||||
and automatically excluded from indexing.
|
||||
</p>
|
||||
|
||||
<p><form action="ProxyIndexingMonitor_p.html" method="post" enctype="multipart/form-data">
|
||||
<div class=small><b>Proxy pre-fetch setting:</b>
|
||||
this is an automated html page loading procedure that takes actual proxy-requested
|
||||
url's as crawling start points for crawling.</div>
|
||||
<table border="0" cellpadding="5" cellspacing="0" width="100%">
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Prefetch Depth:</td>
|
||||
<td class=small><input name="proxyPrefetchDepth" type="text" size="2" maxlength="2" value="#[proxyPrefetchDepth]#"></td>
|
||||
<td class=small>
|
||||
A prefetch of 0 means no prefetch; a prefetch of 1 means to prefetch all
|
||||
embedded url's, but since embedded image links are loaded by the browser
|
||||
this means that only embedded href-anchors are prefetched additionally.</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellDark">
|
||||
<td class=small>Store to Cache:</td>
|
||||
<td class=small><input type="checkbox" name="proxyStoreHTCache" align="top" #(proxyStoreHTCacheChecked)#::checked#(/proxyStoreHTCacheChecked)#></td>
|
||||
<td class=small>It is almost always recommendet to set this on. The only exception is that you have another caching proxy running as secondary proxy and YaCy is configured to used that proxy in proxy-proxy - mode.</td>
|
||||
</tr>
|
||||
<tr valign="top" class="TableCellLight">
|
||||
<td class=small></td>
|
||||
<td class=small></td>
|
||||
<td class=small><input type="submit" name="proxyprofileset" value="set proxy profile"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></p>
|
||||
|
||||
#(info)#
|
||||
::
|
||||
<br><b>The file DATA/PLASMADB/crawlProfiles0.db is missing or corrupted.
|
||||
Please delete that file and restart.</b><br>
|
||||
::
|
||||
<br>
|
||||
<b>Proxy pre-fetch is now set to depth-#[message]#.</b><br>
|
||||
<b>Proxy caching is now set #(caching)#off::on#(/caching)#.</b><br>
|
||||
::
|
||||
<br><b>An error has occurred: #[error]#.</b><br>
|
||||
#(/info)#
|
||||
|
||||
<p>Snapshot of recently indexed web pages that passed the proxy:<br>
|
||||
#(table4)#
|
||||
<i>The stack is empty.</i>
|
||||
::
|
||||
<i>
|
||||
#(size)#
|
||||
Showing all #[all]# entries in this stack.
|
||||
::
|
||||
Showing latest #[count]# lines from a stack of #[all]# entries.
|
||||
#(/size)#
|
||||
</i>
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableHeader">
|
||||
<td class="small"><form action="#[feedbackpage]#" method="post" enctype="multipart/form-data">
|
||||
<input type="submit" name="clearlist#[tabletype]#" value="clear list"></form></td>
|
||||
#(showInit)#::<td class="small"><b>Initiator</b></td>#(/showInit)#
|
||||
#(showExec)#::<td class="small"><b>Executor</b></td>#(/showExec)#
|
||||
<td class="small"><b>Modified Date</b></td>
|
||||
<td class="small"><b>#Words</b></td>
|
||||
<td class="small"><b>Title</b></td>
|
||||
<td class="small"><b>URL</b></td>
|
||||
</tr>
|
||||
#{indexed}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#" class="small">
|
||||
<td width="30" class="small">
|
||||
<form action="#[feedbackpage]#" method="post" enctype="multipart/form-data">
|
||||
<input type="submit" name="deleteentry" value="delete" class="small">
|
||||
<input type="hidden" name="table" value="#[tabletype]#">
|
||||
<input type="hidden" name="hash" value="#[urlhash]#">
|
||||
</form></td>
|
||||
#(showInit)#::<td width="60" class="small">#[initiatorSeed]#</td>#(/showInit)#
|
||||
#(showExec)#::<td width="60" class="small">#[executorSeed]#</td>#(/showExec)#
|
||||
<td width="80" class="small">#[moddate]#</td>
|
||||
<td width="40" class="small">#[wordcount]#</td>
|
||||
<td width="180" class="small">#[urldescr]#</td>
|
||||
<td class="small">#[url]#</td>
|
||||
</tr>
|
||||
#{/indexed}#
|
||||
</table><br>
|
||||
#(/table4)#
|
||||
</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,130 @@
|
||||
// ProxyIndexingMonitor_p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last change: 02.05.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Settings_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.yacy.*;
|
||||
import java.text.*;
|
||||
|
||||
public class ProxyIndexingMonitor_p {
|
||||
|
||||
private static SimpleDateFormat dayFormatter = new SimpleDateFormat("yyyy/MM/dd", Locale.US);
|
||||
private static String daydate(Date date) {
|
||||
if (date == null) return ""; else return dayFormatter.format(date);
|
||||
}
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
int showIndexedCount = 20;
|
||||
boolean se = false;
|
||||
|
||||
prop.put("info", 0);
|
||||
prop.put("info_message", "");
|
||||
|
||||
if (post != null) {
|
||||
if (post.containsKey("clearlist4")) switchboard.loadedURL.clearStack(4); // local: by proxy crawl
|
||||
if (post.containsKey("deleteentry")) {
|
||||
String hash = post.get("hash", null);
|
||||
if (hash != null) {
|
||||
// delete from database
|
||||
switchboard.loadedURL.remove(hash);
|
||||
}
|
||||
}
|
||||
|
||||
if (post.containsKey("moreIndexed")) {
|
||||
showIndexedCount = Integer.parseInt(post.get("showIndexed", "40"));
|
||||
}
|
||||
|
||||
if (post.get("se") != null) se = true;
|
||||
|
||||
if (post.containsKey("proxyprofileset")) try {
|
||||
// read values and put them in global settings
|
||||
int newProxyPrefetchDepth = Integer.parseInt((String) post.get("proxyPrefetchDepth", "0"));
|
||||
env.setConfig("proxyPrefetchDepth", "" + newProxyPrefetchDepth);
|
||||
boolean proxyStoreHTCache = ((String) post.get("proxyStoreHTCache", "")).equals("on");
|
||||
env.setConfig("proxyStoreHTCache", (proxyStoreHTCache) ? "true" : "false");
|
||||
|
||||
// implant these settings also into the crawling profile for the proxy
|
||||
plasmaCrawlProfile.entry profile = switchboard.profiles.getEntry(switchboard.getConfig("defaultProxyProfile", ""));
|
||||
if (profile == null) {
|
||||
prop.put("info", 1);//delete DATA/PLASMADB/crawlProfiles0.db
|
||||
} else {
|
||||
try {
|
||||
profile.changeEntry("generalDepth", "" + newProxyPrefetchDepth);
|
||||
profile.changeEntry("storeHTCache", (proxyStoreHTCache) ? "true": "false");
|
||||
prop.put("info", 2);//new proxyPrefetchdepth
|
||||
prop.put("info_message", newProxyPrefetchDepth);
|
||||
prop.put("info_caching", (proxyStoreHTCache) ? 1 : 0);
|
||||
} catch (IOException e) {
|
||||
prop.put("info", 3); //Error: errmsg
|
||||
prop.put("info_error", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
prop.put("info", 2); //Error: errmsg
|
||||
prop.put("info_error", e.getMessage());
|
||||
System.out.println("Case3");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// create tables
|
||||
String myname = yacyCore.seedDB.mySeed.getName();
|
||||
prop.putAll(switchboard.loadedURL.genTableProps(4, showIndexedCount, false, false, "proxy", null, "ProxyIndexingMonitor_p.html", true));
|
||||
|
||||
prop.put("proxyPrefetchDepth", env.getConfig("proxyPrefetchDepth", "0"));
|
||||
prop.put("proxyStoreHTCacheChecked", env.getConfig("proxyStoreHTCache", "").equals("true") ? 1 : 0);
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Settings Acknowledge</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Settings Receipt:</h2>
|
||||
|
||||
<p>
|
||||
#(info)#
|
||||
<b>No information has been submitted</b><br>
|
||||
Nothing changed
|
||||
::
|
||||
<b>Error with submitted information.</b><br>
|
||||
Nothing changed.
|
||||
::
|
||||
<b>The user name must be given.</b><br>
|
||||
Your request cannot be processed.<br>Nothing changed.
|
||||
::
|
||||
<b>The password redundancy check failed. You have probably misstyped your password.</b><br>
|
||||
Your request cannot be processed.<br>Nothing changed.
|
||||
::
|
||||
<b>Shutting down.</b><br>Application will terminate after working off all crawling tasks.
|
||||
::
|
||||
<b>Your administration account setting has been made.</b><br>
|
||||
Your new administration account name is #[user]#. The password has been accepted.<br>If you go back to the Settings page, you must log-in again.
|
||||
::
|
||||
<b>Your proxy account setting has been changed.<br>
|
||||
Your proxy account check has been disabled, since you did not supply a password.</b><br>
|
||||
The new proxy IP filter is set to #[filter]#
|
||||
::
|
||||
<b>Your proxy account setting has been changed.</b><br>
|
||||
Your new proxy account name is #[user]#. The password has been accepted.<br>
|
||||
If you open any public web page through the proxy, you must log-in then.<br>
|
||||
The new proxy IP filter is set to #[filter]#.
|
||||
::
|
||||
<b>Your server access filter is now set to #[filter]#</b><br>
|
||||
<!--Your new server account name is #[user]#. The password has been accepted.<br>
|
||||
If you go back to the Settings page, you must log-in again.-->
|
||||
::
|
||||
Auto pop-up of the Status page is now <b>disabled</b><br>
|
||||
::
|
||||
Auto pop-up of the Status page is now <b>enabled</b><br>
|
||||
::
|
||||
You are now permanently <b>online</b>. After a short while you should see the effect on the <a href="Status.html">status</a> page.<br>
|
||||
::
|
||||
<b>Port is: #[port]#</b><br>
|
||||
<b>PeerName is: #[peerName]#</b><br>
|
||||
<b>Shutdown time is: #[shutdownWaiting]# seconds</b><br>
|
||||
<u>if you changed the Port, you need to restart the Proxy.</u>
|
||||
::
|
||||
<b>SeedFTP Server Settings changed. You are now a principal peer.</b><br>
|
||||
::
|
||||
<b>SeedFTP Server Settings changed, but something is wrong. Please return to the settings page and modify the data.</b><br>
|
||||
::
|
||||
<b>The remote-proxy setting has been changed</b><br>
|
||||
The new setting is effective immediately, you don't need to re-start.
|
||||
#(/info)#
|
||||
</p>
|
||||
<p>You can now go back to the <a href="Settings_p.html">Settings</a> page if you want to make more changes.</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,242 @@
|
||||
// SettingsAck_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last major change: 16.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes SettingsAck_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class SettingsAck_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
//if (post == null) System.out.println("POST: NULL"); else System.out.println("POST: " + post.toString());
|
||||
|
||||
// set values
|
||||
String s;
|
||||
int pos;
|
||||
|
||||
if (post == null) {
|
||||
prop.put("info", 1);//no information submitted
|
||||
return prop;
|
||||
}
|
||||
|
||||
// admin password
|
||||
if (post.containsKey("adminaccount")) {
|
||||
// read and process data
|
||||
String user = (String) post.get("adminuser");
|
||||
String pw1 = (String) post.get("adminpw1");
|
||||
String pw2 = (String) post.get("adminpw2");
|
||||
// do checks
|
||||
if ((user == null) || (pw1 == null) || (pw2 == null)) {
|
||||
prop.put("info", 1);//error with submitted information
|
||||
return prop;
|
||||
}
|
||||
if (user.length() == 0) {
|
||||
prop.put("info", 2);//username must be given
|
||||
return prop;
|
||||
}
|
||||
if (!(pw1.equals(pw2))) {
|
||||
prop.put("info", 3);//pw check failed
|
||||
return prop;
|
||||
}
|
||||
// check passed. set account:
|
||||
env.setConfig("adminAccountBase64MD5", serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));
|
||||
env.setConfig("adminAccount", "");
|
||||
prop.put("info", 5);//admin account changed
|
||||
prop.put("info_user", user);
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
// proxy password
|
||||
if (post.containsKey("proxyaccount")) {
|
||||
// read and process data
|
||||
String filter = (String) post.get("proxyfilter");
|
||||
String user = (String) post.get("proxyuser");
|
||||
String pw1 = (String) post.get("proxypw1");
|
||||
String pw2 = (String) post.get("proxypw2");
|
||||
// do checks
|
||||
if ((filter == null) || (user == null) || (pw1 == null) || (pw2 == null)) {
|
||||
prop.put("info", 1);//error with submitted information
|
||||
return prop;
|
||||
}
|
||||
if (user.length() == 0) {
|
||||
prop.put("info", 2);//username must be given
|
||||
return prop;
|
||||
}
|
||||
if (!(pw1.equals(pw2))) {
|
||||
prop.put("info", 3);//pw check failed
|
||||
return prop;
|
||||
}
|
||||
if (filter.length() == 0) filter = "*";
|
||||
// check passed. set account:
|
||||
env.setConfig("proxyClient", filter);
|
||||
if (pw1.length() == 0) {
|
||||
// only ip filter setting without account
|
||||
env.setConfig("proxyAccountBase64MD5", "");
|
||||
env.setConfig("proxyAccount", "");
|
||||
prop.put("info", 6);//proxy account has changed(no pw)
|
||||
prop.put("info_filter", filter);
|
||||
} else {
|
||||
// also paccount setting
|
||||
env.setConfig("proxyAccountBase64MD5", serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));
|
||||
env.setConfig("proxyAccount", "");
|
||||
prop.put("info", 7);//proxy account has changed
|
||||
prop.put("info_user", user);
|
||||
prop.put("info_filter", filter);
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
// server password
|
||||
if (post.containsKey("serveraccount")) {
|
||||
// read and process data
|
||||
String filter = (String) post.get("serverfilter");
|
||||
String user = (String) post.get("serveruser");
|
||||
String pw1 = (String) post.get("serverpw1");
|
||||
String pw2 = (String) post.get("serverpw2");
|
||||
// do checks
|
||||
if (filter == null) {
|
||||
//if ((filter == null) || (user == null) || (pw1 == null) || (pw2 == null)) {
|
||||
prop.put("info", 1);//error with submitted information
|
||||
return prop;
|
||||
}
|
||||
if (user.length() == 0) {
|
||||
prop.put("info", 2);//username must be given
|
||||
return prop;
|
||||
}
|
||||
if (!(pw1.equals(pw2))) {
|
||||
prop.put("info", 3);//pw check failed
|
||||
return prop;
|
||||
}
|
||||
if (filter.length() == 0) filter = "*";
|
||||
// check passed. set account:
|
||||
env.setConfig("serverClient", filter);
|
||||
env.setConfig("serverAccountBase64MD5", serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));
|
||||
env.setConfig("serverAccount", "");
|
||||
|
||||
prop.put("info", 8);//server access filter updated
|
||||
prop.put("info_user", user);
|
||||
prop.put("info_filter", filter);
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("dispop")) {
|
||||
env.setConfig("browserPopUpTrigger", "false");
|
||||
prop.put("info", 9);//popup disabled
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("enpop")) {
|
||||
env.setConfig("browserPopUpTrigger", "true");
|
||||
prop.put("info", 10);//popup enabled
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("pmode")) {
|
||||
env.setConfig("onlineMode", "2");
|
||||
prop.put("info", 11);//permanent online mode
|
||||
yacyCore.triggerOnlineAction();
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("generalsettings")) {
|
||||
String port = (String) post.get("port");
|
||||
String peerName = (String) post.get("peername");
|
||||
String shutdownWaiting = (String) post.get("shutdownWaiting");
|
||||
String info = "";
|
||||
env.setConfig("port", port);
|
||||
env.setConfig("peerName", peerName);
|
||||
env.setConfig("shutdownWaiting", shutdownWaiting);
|
||||
|
||||
prop.put("info", 12);//port or peername changed
|
||||
prop.put("info_port", port);
|
||||
prop.put("info_peerName", peerName);
|
||||
prop.put("info_shutdownWaiting", shutdownWaiting);
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("proxysettings")) {
|
||||
httpdProxyHandler.remoteProxyUse = ((String) post.get("remoteProxyUse", "")).equals("on");
|
||||
httpdProxyHandler.remoteProxyHost = (String) post.get("remoteProxyHost", "");
|
||||
try {
|
||||
httpdProxyHandler.remoteProxyPort = Integer.parseInt((String) post.get("remoteProxyPort", ""));
|
||||
} catch (NumberFormatException e) {
|
||||
httpdProxyHandler.remoteProxyPort = 3128;
|
||||
}
|
||||
httpdProxyHandler.remoteProxyNoProxy = (String) post.get("remoteProxyNoProxy", "");
|
||||
httpdProxyHandler.remoteProxyNoProxyPatterns = httpdProxyHandler.remoteProxyNoProxy.split(",");
|
||||
env.setConfig("remoteProxyHost", httpdProxyHandler.remoteProxyHost);
|
||||
env.setConfig("remoteProxyPort", "" + httpdProxyHandler.remoteProxyPort);
|
||||
env.setConfig("remoteProxyNoProxy", httpdProxyHandler.remoteProxyNoProxy);
|
||||
env.setConfig("remoteProxyUse", (httpdProxyHandler.remoteProxyUse) ? "true" : "false");
|
||||
prop.put("info", 15); // The remote-proxy setting has been changed
|
||||
return prop;
|
||||
}
|
||||
|
||||
if (post.containsKey("seedFTPsettings")) {
|
||||
env.setConfig("seedFTPServer", (String)post.get("seedFTPServer"));
|
||||
env.setConfig("seedFTPPath", (String)post.get("seedFTPPath"));
|
||||
env.setConfig("seedFTPAccount", (String)post.get("seedFTPAccount"));
|
||||
env.setConfig("seedFTPPassword", (String)post.get("seedFTPPassword"));
|
||||
env.setConfig("seedURL", (String)post.get("seedURL"));
|
||||
if (yacyCore.saveSeedList(env))
|
||||
prop.put("info", 13);//SeedServer changed
|
||||
else
|
||||
prop.put("info", 14);//Seedserver changed, but something is wrong
|
||||
return prop;
|
||||
}
|
||||
|
||||
// nothing made
|
||||
prop.put("info", 1);//no information submitted
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,185 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Settings</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Settings</h2>
|
||||
|
||||
<p>This is the configuration page for the AnomicHTTPProxy. Access to this page should be limited to an administration person only.
|
||||
To restrict the access to this page, please set an administrator account and password below.</p>
|
||||
<p>If you want to restore all settings to the default values,
|
||||
but <b>forgot your administration password</b>, you must stop the proxy,
|
||||
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>Administration Account Settings</legend>
|
||||
<p>This is the account that restricts access to this 'Settings' page. If you have not customized it yet, you should do so now:
|
||||
<p><table border="0" cellspacing="5">
|
||||
<tr valign="top">
|
||||
<td>Account Name:</td><td><input name="adminuser" type="text" size="16" maxlength="16" value="#[adminuser]#"></td>
|
||||
<td valign="bottom" align="right" rowspan="3"> <input type="submit" name="adminaccount" value="Submit"></td></tr>
|
||||
<tr valign="top"><td>Password:</td><td><input name="adminpw1" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="adminpw2" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>General Settings</legend>
|
||||
<p>
|
||||
<table border="0" cellspacing="5">
|
||||
<tr valign="top">
|
||||
<td>Proxy and Administration Port:</td>
|
||||
<td><input name="port" type="text" size="5" maxlength="5" value="#[port]#"></td>
|
||||
<td><i>Changes will take effect after restart only.</i></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>Shutdown Time Limit:</td>
|
||||
<td><input name="shutdownWaiting" type="text" size="5" maxlength="4" value="#[shutdownWaiting]#"></td>
|
||||
<td>This is the time that a peer takes at most for shutdown.
|
||||
The shutdown-procedure is difficult since there are many caches that must be flushed
|
||||
first (seconds)
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>Peer Name:</td>
|
||||
<td><input name="peername" type="text" size="32" maxlength="32" value="#[peerName]#"></td>
|
||||
<td><b>Your peer name defines also a new '.yacy' - domain, which can be accessed from every peer running this proxy.
|
||||
Using your 'Home Page' and 'File Share' - zones you also have a platform to provide content to your new domain.</b><br>
|
||||
<i>(hint: choose a name that appears on a web page that tells something about you, vistit the page, get the 'senior' status, and you can be found..)</i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="submit" name="generalsettings" value="submit"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>Remote Proxy (optional)</legend>
|
||||
<p>YaCy can use another proxy to connect to the internet. You can enter the address for a remote proxy here:</p>
|
||||
<p><table border="0" cellspacing="5">
|
||||
<tr valign="top">
|
||||
<td>remote Proxy Host:</td>
|
||||
<td><input name="remoteProxyHost" type="text" size="32" maxlength="128" value="#[remoteProxyHost]#"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>remote Proxy Port:</td>
|
||||
<td><input name="remoteProxyPort" type="text" size="5" maxlength="5" value="#[remoteProxyPort]#"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>no-Proxy Adresses:</td>
|
||||
<td><input name="remoteProxyNoProxy" type="text" size="32" maxlength="128" value="#[remoteProxyNoProxy]#"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>use remote Proxy:</td>
|
||||
<td><input type="checkbox" name="remoteProxyUse" align="top" #(remoteProxyUseChecked)#::checked#(/remoteProxyUseChecked)#></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td></td>
|
||||
<td><input type="submit" name="proxysettings" value="submit"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
<p>You can restrict the access to this proxy using a two-stage security barrier:
|
||||
<ul>
|
||||
<li>define an <i>access domain</i> with a list of granted client IP-Numbers or with wild cards</li>
|
||||
<li>define an <i>user account</i> with a user:password - pair</li>
|
||||
</ul><br>
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>Proxy Access Settings</legend>
|
||||
<p>This is the account that restricts access to the proxy function. You probably don't want to share the proxy to the internet, so you should set the IP-Number Access Domain to a pattern that corresponds to you local intranet. The default setting should be right in most cases. If you want, you can also set a proxy account so that every proxy user must authenticate first, but this is rather unusual.</p>
|
||||
<p><table border="0" cellspacing="5">
|
||||
<tr valign="top"><td>IP-Number filter:</td><td colspan ="2"><input name="proxyfilter" type="text" size="50" maxlength="1000" value="#[proxyfilter]#"></td></tr>
|
||||
<tr valign="top"><td>Account Name:</td><td><input name="proxyuser" type="text" size="16" maxlength="16" value="#[proxyuser]#"></td>
|
||||
<td valign="bottom" align="right" rowspan="3"> <input type="submit" name="proxyaccount" value="Submit"></td></tr>
|
||||
<tr valign="top"><td>Password:</td><td><input name="proxypw1" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="proxypw2" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>Server Access Settings</legend>
|
||||
<p>Here you can restrict access to the server. By default, the access is not limited, because this function is needed to spawn the p2p index-sharing function. If you block access to your server (setting anything else than '*'), then you will also be blocked from using other peer's indexes for search service. However, blocking access may be correct in enterprise environments where you only want to index your company own web pages.</p>
|
||||
<p>ATTENTION: your current IP is recognized as "#[clientIP]#". If the value you enter here does not match with this IP, you will not be able to access the server pages any more</p>
|
||||
<p><table border="0" cellspacing="5">
|
||||
<tr valign="top"><td>IP-Number filter:</td><td colspan ="2"><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#"></td></tr>
|
||||
<tr valign="top"><td><!--Account Name:</td><td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#">--></td>
|
||||
<td valign="bottom" align="right" rowspan="3"> <input type="submit" name="serveraccount" value="Submit"></td></tr>
|
||||
<!--
|
||||
<tr valign="top"><td>Password:</td><td><input name="serverpw1" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="serverpw2" type="password" size="16" maxlength="16" value=""></td></tr>
|
||||
-->
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset><legend>System Behaviour Settings</legend>
|
||||
<table>
|
||||
<tr><td>Auto pop-up of status page on start-up:</td>
|
||||
<td><input type="submit" name="enpop" value="enable"> / <input type="submit" name="dispop" value="disable"></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>Seed Upload Settings</legend>
|
||||
<p>This is the account for an ftp server where you can host a seed-list file.
|
||||
If you set this, you will become a principal peer.
|
||||
Your peer will then upload the seed-bootstrap information periodically,
|
||||
but only if there had been changes to the seed-list.
|
||||
</p>
|
||||
<p>
|
||||
<table border="0" cellspacing="5">
|
||||
<tr valign="top">
|
||||
<td>Server:</td>
|
||||
<td><input name="seedFTPServer" type="text" size="40" value="#[seedFTPServer]#"></td>
|
||||
<td><i>The host where you have an FTP account, like 'ftp.<my-host>.net'</i></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>Path:</td>
|
||||
<td><input name="seedFTPPath" type="text" size="40" value="#[seedFTPPath]#"></td>
|
||||
<td><i>The remote path on the ftp server, like 'yacy/seed.txt'.
|
||||
Missing sub-directories are NOT created automatically.</i></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>Username:</td>
|
||||
<td><input name="seedFTPAccount" type="text" size="40" value="#[seedFTPAccount]#"></td>
|
||||
<td><i>Your log-in at the ftp server</i></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>Password:</td>
|
||||
<td><input name="seedFTPPassword" type="password" size="40" value="#[seedFTPPassword]#"></td>
|
||||
<td><i>The password</i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr valign="top">
|
||||
<td>URL:</td>
|
||||
<td><input name="seedURL" type="text" size="40" value="#[seedURL]#"></td>
|
||||
<td><i>The URL that can be used to retrieve the uploaded seed file, like
|
||||
http://www.<my-host>.net/yacy/seed.txt'</i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="submit" name="seedFTPsettings" value="submit"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form><br>
|
||||
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,134 @@
|
||||
// Settings.p.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last change: 02.05.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Settings_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Settings_p {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
//if (post == null) System.out.println("POST: NULL"); else System.out.println("POST: " + post.toString());
|
||||
|
||||
prop.put("port", env.getConfig("port", "8080"));
|
||||
prop.put("shutdownWaiting", env.getConfig("shutdownWaiting", "120"));
|
||||
prop.put("peerName", env.getConfig("peerName", "nameless"));
|
||||
// set values
|
||||
String s;
|
||||
int pos;
|
||||
|
||||
// admin password
|
||||
if (env.getConfig("adminAccountBase64", "").length() == 0) {
|
||||
// no password has been specified
|
||||
prop.put("adminuser","admin");
|
||||
} else {
|
||||
s = env.getConfig("adminAccount", "admin:void");
|
||||
pos = s.indexOf(":");
|
||||
if (pos < 0) {
|
||||
prop.put("adminuser","admin");
|
||||
} else {
|
||||
prop.put("adminuser",s.substring(0, pos));
|
||||
}
|
||||
}
|
||||
|
||||
// remote proxy
|
||||
prop.put("remoteProxyHost", env.getConfig("remoteProxyHost", ""));
|
||||
prop.put("remoteProxyPort", env.getConfig("remoteProxyPort", ""));
|
||||
prop.put("remoteProxyNoProxy", env.getConfig("remoteProxyNoProxy", ""));
|
||||
prop.put("remoteProxyUseChecked", ((String) env.getConfig("remoteProxyUse", "false")).equals("true") ? 1 : 0);
|
||||
|
||||
// proxy access filter
|
||||
prop.put("proxyfilter", env.getConfig("proxyClient", "*"));
|
||||
|
||||
// proxy password
|
||||
if (env.getConfig("proxyAccountBase64", "").length() == 0) {
|
||||
// no password has been specified
|
||||
prop.put("proxyuser","proxy");
|
||||
} else {
|
||||
s = env.getConfig("proxyAccount", "proxy:void");
|
||||
pos = s.indexOf(":");
|
||||
if (pos < 0) {
|
||||
prop.put("proxyuser","proxy");
|
||||
} else {
|
||||
prop.put("proxyuser",s.substring(0, pos));
|
||||
}
|
||||
}
|
||||
|
||||
// server access filter
|
||||
prop.put("serverfilter", env.getConfig("serverClient", "*"));
|
||||
|
||||
// server password
|
||||
if (env.getConfig("serverAccountBase64", "").length() == 0) {
|
||||
// no password has been specified
|
||||
prop.put("serveruser","server");
|
||||
} else {
|
||||
s = env.getConfig("serverAccount", "server:void");
|
||||
pos = s.indexOf(":");
|
||||
if (pos < 0) {
|
||||
prop.put("serveruser","server");
|
||||
} else {
|
||||
prop.put("serveruser",s.substring(0, pos));
|
||||
}
|
||||
}
|
||||
|
||||
// clientIP
|
||||
prop.put("clientIP", (String) header.get("CLIENTIP", "<unknown>")); // read an artificial header addendum
|
||||
//seedFTPSettings
|
||||
prop.put("seedFTPServer", env.getConfig("seedFTPServer", ""));
|
||||
prop.put("seedFTPPath", env.getConfig("seedFTPPath", ""));
|
||||
prop.put("seedFTPAccount", env.getConfig("seedFTPAccount", ""));
|
||||
prop.put("seedFTPPassword", env.getConfig("seedFTPPassword", ""));
|
||||
prop.put("seedURL", env.getConfig("seedURL", ""));
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Skins</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Skin selection</h2>
|
||||
<p>
|
||||
You can change the appearance of YACY with skins. Select one of the defaultskins, download new Skins, or create your own skin.</p>
|
||||
|
||||
<b>Current Skin: #[currentskin]#</b>
|
||||
<p>
|
||||
|
||||
<form action="Skins_p.html">
|
||||
Skins:<br>
|
||||
<select size="10" name="skin">
|
||||
#{skinlist}#
|
||||
<option value="#[file]#">#[name]#</option>
|
||||
#{/skinlist}#
|
||||
</select>
|
||||
<br>
|
||||
<input type="submit" name="use" value="Use">
|
||||
<input type="submit" name="delete" value="Delete"><br>
|
||||
</form>
|
||||
|
||||
<form action="Skins_p.html">
|
||||
Install new Skin from URL:<br>
|
||||
<input type="text" name="url" size="30"><input type="checkbox" name="use" value="on">Use this Skin<br>
|
||||
<input type="submit" value="install">
|
||||
</form>
|
||||
|
||||
<b>#(status)#
|
||||
::
|
||||
Unable to get URL: #[url]#
|
||||
::
|
||||
Error saving the Skin.
|
||||
#(status)#</b>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,159 @@
|
||||
// Skins_p.java
|
||||
// -----------------------
|
||||
// part of YACY
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last change: 29.12.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Blacklist_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.data.*;
|
||||
|
||||
public class Skins_p {
|
||||
|
||||
private static boolean copyFile(File from, File to){
|
||||
if(from == null || to == null){
|
||||
return false;
|
||||
}
|
||||
try{
|
||||
serverFileUtils.copy(from, to);
|
||||
return true;
|
||||
}catch(IOException e){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean changeSkin(serverSwitch env, String skinPath, String skin){
|
||||
File styleFile = new File(env.getRootPath(), "htroot/env/style.css");
|
||||
File skinFile = new File(skinPath, skin);
|
||||
|
||||
if(copyFile(skinFile, styleFile)){
|
||||
env.setConfig("currentSkin", skin.substring(0,skin.length()-4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
//listManager.switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
String skinPath = new File(env.getRootPath(), env.getConfig("skinPath", "DATA/SKINS")).toString();
|
||||
|
||||
//Fallback
|
||||
prop.put("currentskin", "");
|
||||
prop.put("status", 0);//nothing
|
||||
|
||||
String[] skinFiles = listManager.getDirListing(skinPath);
|
||||
if(skinFiles == null){
|
||||
return prop;
|
||||
}
|
||||
|
||||
//if there are no skins, use the current style as default
|
||||
//normally only invoked at first start of YACY
|
||||
if(skinFiles.length == 0){
|
||||
copyFile(new File(env.getRootPath(), "htroot/env/style.css"), new File(skinPath, "default.css"));
|
||||
env.setConfig("currentSkin", "default");
|
||||
}
|
||||
|
||||
if (post != null){
|
||||
//change skin
|
||||
if(post.containsKey("use")){
|
||||
changeSkin(env, skinPath, (String)post.get("skin"));
|
||||
|
||||
//delete skin
|
||||
}else if(post.containsKey("delete")){
|
||||
File skinfile= new File(skinPath, (String)post.get("skin"));
|
||||
skinfile.delete();
|
||||
|
||||
//load Skin from URL
|
||||
} else if (post.containsKey("url")){
|
||||
String url = (String)post.get("url");
|
||||
Vector skinVector;
|
||||
try{
|
||||
skinVector = httpc.wget(new URL(url), 6000, null, null, switchboard.remoteProxyHost, switchboard.remoteProxyPort);
|
||||
}catch(IOException e){
|
||||
prop.put("status", 1);//unable to get url
|
||||
prop.put("status_url", url);
|
||||
return prop;
|
||||
}
|
||||
try{
|
||||
Iterator it = skinVector.iterator();
|
||||
File skinFile = new File(skinPath, url.substring(url.lastIndexOf("/"), url.length()));
|
||||
BufferedWriter bw = new BufferedWriter(new PrintWriter(new FileWriter(skinFile)));
|
||||
|
||||
while(it.hasNext()){
|
||||
bw.write(it.next() + "\n");
|
||||
}
|
||||
bw.close();
|
||||
}catch(IOException e){
|
||||
prop.put("status", 2);//error saving the skin
|
||||
return prop;
|
||||
}
|
||||
if(post.containsKey("use") && ((String)post.get("use")).equals("on")){
|
||||
changeSkin(env, skinPath, url.substring(url.lastIndexOf("/"), url.length()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//reread Skins
|
||||
skinFiles = listManager.getDirListing(skinPath);
|
||||
int i;
|
||||
for(i=0;i<= skinFiles.length-1;i++){
|
||||
if(skinFiles[i].endsWith(".css")){
|
||||
prop.put("skinlist_"+i+"_file", skinFiles[i]);
|
||||
prop.put("skinlist_"+i+"_name", skinFiles[i].substring(0, skinFiles[i].length() -4));
|
||||
}
|
||||
}
|
||||
prop.put("skinlist", i);
|
||||
|
||||
prop.put("currentskin", env.getConfig("currentSkin", "default"));
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YaCy: Statistics</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="SubMenu">
|
||||
<tr height="10"><td colspan="7" class="MenuHeader"> Statistics Menu</td></tr>
|
||||
<tr height="2"><td colspan="7"></td></tr>
|
||||
<tr class="TableHeader">
|
||||
<td width="50%" class="MenuSubItem"> <a href="/Statistics.html" class="MenuItemLink">Backlinks</a> </td>
|
||||
<td class="MenuSubSpacer"></td>
|
||||
<td width="50%" class="MenuSubItem"> <a href="/Statistics.html?page=1" class="MenuItemLink">Zeitgeist</a> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
#(page)#
|
||||
<h2>Backlinks</h2>
|
||||
#(backlinks)#
|
||||
<p>no backlinks so far (another web page must link to your peer's search page
|
||||
and someone must have clicked on that link; then the referrer pages appears here).</p>
|
||||
::
|
||||
<p>Showing #[num]# entries from a total of #[total]# backlinks:<br>
|
||||
<table border="0" cellpadding="2" cellspacing="1">
|
||||
<tr class="TableHeader" valign="bottom">
|
||||
<td class="small">Url<br> </td>
|
||||
<td class="small">Time<br> </td>
|
||||
<td class="small">Client IP<br> </td>
|
||||
<td class="small">Client User Agent<br> </td>
|
||||
</tr>
|
||||
#{list}#
|
||||
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
|
||||
<td class="small" align="right"><a href="#[url]#">#[url]#</a></td>
|
||||
<td class="small" align="right">#[date]#</td>
|
||||
<td class="small" align="right">#[clientip]#</td>
|
||||
<td class="small" align="right">#[useragent]#</td>
|
||||
</tr>
|
||||
#{/list}#
|
||||
</table>
|
||||
</p>
|
||||
#(/backlinks)#
|
||||
::
|
||||
<h2>Zeitgeist</h2>
|
||||
#(/page)#
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,99 @@
|
||||
// Statistics.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last major change: 16.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Network.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.net.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
|
||||
public class Statistics {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch sb) {
|
||||
// return variable that accumulates replacements
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
|
||||
serverObjects prop = new serverObjects();
|
||||
int page = (post == null) ? 0 : Integer.parseInt((String) post.get("page", "0"));
|
||||
|
||||
prop.put("page", page);
|
||||
switch (page) {
|
||||
case 0:
|
||||
if (switchboard.facilityDB.size("backlinks") == 0) {
|
||||
prop.put("page_backlinks", 0);
|
||||
} else {
|
||||
prop.put("page_backlinks", 1);
|
||||
Iterator it = switchboard.facilityDB.maps("backlinks", false, "date");
|
||||
int count = 0;
|
||||
int maxCount = 100;
|
||||
boolean dark = true;
|
||||
Map map;
|
||||
String urlString;
|
||||
URL url;
|
||||
while ((it.hasNext()) && (count < maxCount)) {
|
||||
map = (Map) it.next();
|
||||
if (count >= maxCount) break;
|
||||
urlString = (String) map.get("key");
|
||||
try { url = new URL(urlString); } catch (MalformedURLException e) { url = null; }
|
||||
if ((url != null) && (serverCore.isNotLocal(url))) {
|
||||
prop.put("page_backlinks_list_" + count + "_dark", ((dark) ? 1 : 0)); dark =! dark;
|
||||
prop.put("page_backlinks_list_" + count + "_url", urlString);
|
||||
prop.put("page_backlinks_list_" + count + "_date", map.get("date"));
|
||||
prop.put("page_backlinks_list_" + count + "_clientip", map.get("clientip"));
|
||||
prop.put("page_backlinks_list_" + count + "_useragent", map.get("useragent"));
|
||||
count++;
|
||||
}
|
||||
}//while
|
||||
prop.put("page_backlinks_list", count);
|
||||
prop.put("page_backlinks_num", count);
|
||||
prop.put("page_backlinks_total", switchboard.facilityDB.size("backlinks"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Status</title>
|
||||
#[metas]#
|
||||
<meta http-equiv="REFRESH" content="30">
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>System, Index and Peer Status</h2>
|
||||
|
||||
<p>Welcome to YACY!</p>
|
||||
|
||||
<form action="Steering.html" method="get">
|
||||
<table border="0" cellpadding="5" cellspacing="0" width="100%">
|
||||
<tr valign="top" bgcolor="#DDEEDD">
|
||||
<td class="TableCellLight" align="right">
|
||||
<input type="submit" name="shutdown" value="shutdown">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<!-- <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000000"><tr><td> -->
|
||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||
<tr class="TableHeader"><td colspan="2"><b>System Properties</b></td></tr>
|
||||
<tr class="TableCellDark"><td width="150">protection</td><td>
|
||||
#(protection)#
|
||||
<b>your settings are not protected!</b> please go to the <a href="Settings_p.html">settings</a> page <b>immediately</b> and set an administration password.
|
||||
::
|
||||
your settings are protected by a password
|
||||
#(/protection)#
|
||||
</td></tr>
|
||||
<tr class="TableCellLight"><td>system version</td><td>
|
||||
#[version]##(versioncomment)#:: - the latest public version is #[latestVersion]#. Click here to <a href="http://www.anomic.de/AnomicHTTPProxy/Download.html">download</a> it.#(/versioncomment)#
|
||||
</td></tr>
|
||||
<tr class="TableCellDark"><td>proxy host</td><td>#[host]#:#[port]#</td></tr>
|
||||
<tr class="TableCellLight"><td>remote proxy</td><td>#(remoteProxy)#not used::#[host]#:#[port]##(/remoteProxy)#</td></tr>
|
||||
<tr class="TableCellDark"><td>this peer address</td><td>
|
||||
#(peerAddress)#
|
||||
not assigned
|
||||
::
|
||||
not assigned. The peer must go online to get an address.
|
||||
The peer does not go online until you use the proxy to surf the internet,
|
||||
thus proving that you <i>want</i> to go online.
|
||||
If you don't know how to configure your system to use a proxy,
|
||||
see the <a href="http://www.yacy.net/yacy/Installation.html#wininst">installation instructions</a>.
|
||||
::
|
||||
#[address]#; your '.yacy' home at http://www.#[peername]#.yacy
|
||||
#(/peerAddress)#
|
||||
</td></tr>
|
||||
<tr class="TableCellLight"><td>this peer name</td><td>#[peerName]#/#[hash]#</td></tr>
|
||||
<tr class="TableCellDark"><td>this peer statistics</td><td>
|
||||
#(peerStatistics)#
|
||||
unknown
|
||||
::
|
||||
uptime = #[uptime]#, href# = #[links]#, rwi# = #[words]#,
|
||||
connects(#[juniorConnects]#|#[seniorConnects]#|#[principalConnects]#|#[disconnects]#) #[connects]# peers/hour
|
||||
#(/peerStatistics)#
|
||||
</td></tr>
|
||||
<tr class="TableCellLight"><td>this peer status</td><td>
|
||||
#(peerStatus)#
|
||||
virgin - you have not yet published your peer, because you have not yet used the proxy. If you configured your proxy setting (see above: <a href="http://www.anomic.de/AnomicHTTPProxy/Installation.html#wininst">configure your browser's proxy settings</a> and go online by browsing the internet) you must first load any page through the proxy to prove that this works. With this status you are not allowed to search other peers.
|
||||
::
|
||||
junior - you cannot be reached. A possible reason is that you are behind a firewall, NAT or Router. But you can <a href="index.html">search the internet</a> using the other peers global index on your own search page. We encourage you to open your firewall for port 8080, or set a 'virtual server' in your router settings. Please be fair, contribute your own index to the global index.
|
||||
::
|
||||
senior - you are running a server and you support the global internet index, which you can also <a href="index.html">search yourself</a>. Thank you!
|
||||
::
|
||||
principal - you are senior and you publish your seed-list to a ftp account which can be retrieved at #[seedURL]#. You can of course <a href="index.html">search the internet</a> using the other peers global index on your own search page.
|
||||
#(/peerStatus)#
|
||||
</td></tr>
|
||||
<tr class="TableCellDark"><td>other peers</td><td>#(otherPeers)#not online.::#[num]# other peers online.#(/otherPeers)#</td></tr>
|
||||
<tr class="TableCellLight"><td>seed server</td><td>
|
||||
#(seedServer)#
|
||||
disabled. To enable this you need a ftp account where you can upload files to a web space. If you do that, you become a YACY root server. You can configure your account details on the <a href="Settings_p.html">Settings page</a>.
|
||||
::
|
||||
enabled: updating periodically to server #[seedFTPServer]#
|
||||
#(/seedServer)#
|
||||
</td></tr>
|
||||
<tr class="TableCellDark"><td>auto-popup on start-up</td><td>
|
||||
#(popup)#
|
||||
disabled. To enable this again please use the <a href="Settings_p.html">Settings</a> page
|
||||
::
|
||||
<form action="Status.html" method="get">
|
||||
enabled<input type="submit" name="dispop" value="disable pop-up">
|
||||
</form>
|
||||
#(/popup)#
|
||||
</td></tr>
|
||||
<tr class="TableCellLight"><td>online-mode</td><td>
|
||||
#(omode)#
|
||||
<!-- online Mode 0 -->
|
||||
::
|
||||
you are in event-based online mode.
|
||||
The yacy p2p network will boot when you start using the proxy or you switch to permanent mode.
|
||||
Attention: using the proxy in permanent mode will keep your internet connection online forever.
|
||||
Use this only if you have a flatrate or you have an always-on connection.
|
||||
To start permanent mode, press this button:
|
||||
<form action="SettingsAck_p.html" method="get">
|
||||
<input type="submit" name="pmode" value="go online">
|
||||
</form>
|
||||
::
|
||||
You are in permanent mode. Attention: if you don't have a flatrate or are always-on,
|
||||
you must switch off the proxy to go off-line.
|
||||
#(/omode)#
|
||||
</td></tr>
|
||||
</table>
|
||||
<!-- </td></tr></table> -->
|
||||
</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,171 @@
|
||||
// Status.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 12.07.2004
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Status.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Status {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
// return variable that accumulates replacements
|
||||
serverObjects prop = new serverObjects();
|
||||
|
||||
// set values
|
||||
String s;
|
||||
int pos;
|
||||
|
||||
/*
|
||||
versionProbe=http://www.anomic.de/AnomicHTTPProxy/release.txt
|
||||
superseedFile=superseed.txt
|
||||
*/
|
||||
// update seed info
|
||||
yacyCore.peerActions.updateMySeed();
|
||||
|
||||
// password protection
|
||||
if (env.getConfig("adminAccountBase64MD5", "").length() == 0)
|
||||
prop.put("protection", 0);//not protected
|
||||
else
|
||||
prop.put("protection", 1);//protected
|
||||
|
||||
// version information
|
||||
if ((yacyCore.latestVersion == null) || (yacyCore.latestVersion.length() < 3) || (yacyCore.latestVersion.equals(env.getConfig("version",""))))
|
||||
prop.put("versioncomment", 0);//no commet
|
||||
else
|
||||
prop.put("versioncomment", 1);//new version
|
||||
prop.put("versioncomment_latestVersion", yacyCore.latestVersion);
|
||||
|
||||
prop.put("host", serverCore.publicIP());
|
||||
prop.put("port", env.getConfig("port", "<unknown>"));
|
||||
if (env.getConfig("remoteProxyUse", "false").equals("true")) {
|
||||
prop.put("remoteProxy", 1);
|
||||
prop.put("remoteProxy_host", env.getConfig("remoteProxyHost", "<unknown>"));
|
||||
prop.put("remoteProxy_port", env.getConfig("remoteProxyPort", "<unknown>"));
|
||||
} else {
|
||||
prop.put("remoteProxy", 0);//not used
|
||||
}
|
||||
|
||||
// peer information
|
||||
String thisHash = "";
|
||||
String thisName = env.getConfig("peerName", "<nameless>");
|
||||
if (yacyCore.seedDB.mySeed == null) {
|
||||
thisHash = "not assigned";
|
||||
prop.put("peerAddress", 0);//not assigned
|
||||
prop.put("peerStatistics", 0);//unknown
|
||||
} else {
|
||||
prop.put("peerStatistics", 1);
|
||||
prop.put("peerStatistics_uptime", yacyCore.seedDB.mySeed.get("Uptime", "unknown"));
|
||||
prop.put("peerStatistics_links", yacyCore.seedDB.mySeed.get("LCount", "unknown"));
|
||||
prop.put("peerStatistics_words", yacyCore.seedDB.mySeed.get("ICount", "unknown"));
|
||||
prop.put("peerStatistics_juniorConnects", yacyCore.peerActions.juniorConnects);
|
||||
prop.put("peerStatistics_seniorConnects", yacyCore.peerActions.seniorConnects);
|
||||
prop.put("peerStatistics_principalConnects", yacyCore.peerActions.principalConnects);
|
||||
prop.put("peerStatistics_disconnects", yacyCore.peerActions.disconnects);
|
||||
prop.put("peerStatistics_connects", yacyCore.seedDB.mySeed.get("CCount", "0"));
|
||||
if (yacyCore.seedDB.mySeed.getAddress() == null) {
|
||||
thisHash = yacyCore.seedDB.mySeed.hash;
|
||||
prop.put("peerAddress", 1);//not assigned + instructions
|
||||
} else {
|
||||
thisHash = yacyCore.seedDB.mySeed.hash;
|
||||
prop.put("peerAddress", 2);//Address
|
||||
prop.put("peerAddress_address", yacyCore.seedDB.mySeed.getAddress());
|
||||
prop.put("peerAddress_peername", env.getConfig("peerName", "<nameless>").toLowerCase());
|
||||
}
|
||||
}
|
||||
String peerStatus = ((yacyCore.seedDB.mySeed == null) ? "virgin" : yacyCore.seedDB.mySeed.get("PeerType", "virgin"));
|
||||
if (peerStatus.equals("virgin")) {
|
||||
prop.put("peerStatus", 0);//virgin
|
||||
} else if (peerStatus.equals("junior")) {
|
||||
prop.put("peerStatus", 1);//junior
|
||||
} else if (peerStatus.equals("senior")) {
|
||||
prop.put("peerStatus", 2);//senior
|
||||
} else if (peerStatus.equals("principal")) {
|
||||
prop.put("peerStatus", 3);//principal
|
||||
prop.put("peerStatus_seedURL", yacyCore.seedDB.mySeed.get("seedURL", "?"));
|
||||
}
|
||||
prop.put("peerName", thisName);
|
||||
prop.put("hash", thisHash);
|
||||
if ((env.getConfig("seedFTPServer","").length() != 0) &&
|
||||
(env.getConfig("seedFTPAccount","").length() != 0) &&
|
||||
(env.getConfig("seedFTPPassword","").length() != 0) &&
|
||||
(env.getConfig("seedFTPPath","").length() != 0)) {
|
||||
prop.put("seedServer", 1);//enabled
|
||||
prop.put("seedServer_seedFTPServer", env.getConfig("seedFTPServer",""));
|
||||
} else {
|
||||
prop.put("seedServer", 0);//disabled
|
||||
}
|
||||
|
||||
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)){
|
||||
prop.put("otherPeers", 1);
|
||||
prop.put("otherPeers_num", yacyCore.seedDB.sizeConnected());
|
||||
}else{
|
||||
prop.put("otherPeers", 0);//not online
|
||||
}
|
||||
|
||||
// pop-up trigger management
|
||||
if (post != null) {
|
||||
if (post.containsKey("dispop")) env.setConfig("browserPopUpTrigger", "false");
|
||||
if (post.containsKey("enpop")) env.setConfig("browserPopUpTrigger", "true");
|
||||
}
|
||||
|
||||
if (env.getConfig("browserPopUpTrigger", "false").equals("false")) {
|
||||
prop.put("popup", 0);
|
||||
} else {
|
||||
prop.put("popup", 1);
|
||||
}
|
||||
|
||||
if (env.getConfig("onlineMode", "1").equals("1")) {
|
||||
prop.put("omode", 1);
|
||||
} else {
|
||||
prop.put("omode", 2);
|
||||
}
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Settings Acknowledge</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Steering Receipt:</h2>
|
||||
|
||||
<p>
|
||||
#(info)#
|
||||
<b>No information has been submitted</b><br>
|
||||
Nothing changed
|
||||
::
|
||||
<b>Your system is not protected by a password</b><br>
|
||||
Please go to the <a href="/Settings_p.html">Settings</a> page and set an administration password
|
||||
::
|
||||
<b>You don't have the correct access right to perform this task.</b><br>
|
||||
Please log in.
|
||||
::
|
||||
<b>Shutting down.</b>
|
||||
<br>Application will terminate after working off all scheduled tasks.
|
||||
::
|
||||
#(/info)#
|
||||
</p>
|
||||
<p>You can now go back to the <a href="Settings_p.html">Settings</a> page if you want to make more changes.</p>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,84 @@
|
||||
// Steering.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
// last major change: 18.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes SettingsAck_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.yacy.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Steering {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
prop.put("info", 0);//no information submitted
|
||||
if (post == null) return prop;
|
||||
|
||||
// handle access rights
|
||||
switch (switchboard.adminAuthenticated(header)) {
|
||||
case 0: // wrong password given
|
||||
try {Thread.currentThread().sleep(3000);} catch (InterruptedException e) {}
|
||||
case 1: // no password given
|
||||
prop.put("AUTHENTICATE", "admin log-in"); // force log-in
|
||||
return prop;
|
||||
case 2: // no password stored
|
||||
prop.put("info", 1); // actions only with password
|
||||
return prop;
|
||||
case 3: // soft-authenticated for localhost only
|
||||
case 4: // hard-authenticated, all ok
|
||||
}
|
||||
|
||||
if (post.containsKey("shutdown")) {
|
||||
switchboard.terminate = true;
|
||||
prop.put("info", 3);//shutting down
|
||||
return prop;
|
||||
}
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Log</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Log</h2><br>
|
||||
|
||||
<iframe src="Log_p.html" width="100%" height="480" name="logFrame">
|
||||
<a href="Log_p.html">Log</a>
|
||||
</iframe>
|
||||
<form action="Log_p.html" method="GET" target="logFrame">
|
||||
<table border="0"><tr>
|
||||
<td><input type="text" name="lines" size ="4" value="50"> Lines</td>
|
||||
<td><input type="checkbox" name="mode" value="reversed">reversed order</td>
|
||||
<td><input type="submit" value="refresh"></td>
|
||||
</tr></table>
|
||||
</form>
|
||||
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,77 @@
|
||||
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>YACY: Remote Peer Profile</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<br><br>
|
||||
<h2>Remote Peer Profile:</h2>
|
||||
<p>
|
||||
#(success)#
|
||||
Wrong access of this page
|
||||
::
|
||||
The requested peer is not known
|
||||
::
|
||||
The peer #[peername]# is not online.
|
||||
::
|
||||
<br><h3>This is #[peername]#'s Profile:</h3>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>#(name)# ::#[value]##(/name)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nick Name</td>
|
||||
<td>#(nickname)# ::#[value]##(/nickname)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Homepage</td>
|
||||
<td>#(homepage)# ::#[value]##(/homepage)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EMail</td>
|
||||
<td>#(email)# ::#[value]##(/email)#</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ICQ</td>
|
||||
<td>#(icq)# ::<img src=http://web.icq.com/whitepages/online?icq=#[value]#&img=5">#[value]##(/icq)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jabber</td>
|
||||
<td>#(jabber)# ::#[value]##(/jabber)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yahoo!</td>
|
||||
<td>#(yahoo)# ::#[value]##(/yahoo)#</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSN</td>
|
||||
<td>#(msn)# ::#[value]##(/msn)#</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td><textarea name="comment" cols="40" rows="10" readonly>#(comment)#::#[value]##(/comment)#</textarea></td>
|
||||
</tr>
|
||||
#{other}#
|
||||
<tr>
|
||||
<td>#[key]#</td>
|
||||
<td>#[value]#</td>
|
||||
</tr>
|
||||
#{/other}#
|
||||
</table>
|
||||
#(/success)#
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,132 @@
|
||||
// ViewProfile_p.java
|
||||
// -----------------------
|
||||
// part of YaCy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004, 2005
|
||||
//
|
||||
// This File is contributed by Alexander Schier
|
||||
// last change: 27.02.2005
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../Classes Blacklist_p.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import de.anomic.server.*;
|
||||
import de.anomic.http.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.yacy.*;
|
||||
|
||||
public class ViewProfile {
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
//listManager.switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
|
||||
if ((post != null) && (post.containsKey("hash")) && (yacyCore.seedDB != null)) { //no nullpointer error..
|
||||
yacySeed seed = yacyCore.seedDB.getConnected((String)post.get("hash"));
|
||||
if (seed == null) {
|
||||
seed = yacyCore.seedDB.getDisconnected((String)post.get("hash"));
|
||||
if (seed == null) {
|
||||
prop.put("success","1"); // peer unknown
|
||||
} else {
|
||||
prop.put("success","2"); // peer known, but disconnected
|
||||
prop.put("success_peername", seed.getName());
|
||||
}
|
||||
} else {
|
||||
prop.put("success","3"); // all ok
|
||||
HashMap profile = yacyClient.getProfile(seed);
|
||||
System.out.println("fetched profile:" + profile);
|
||||
Iterator i = profile.entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
//all known Keys which should be set as they are
|
||||
Vector knownKeys = new Vector();
|
||||
knownKeys.add("name");
|
||||
knownKeys.add("nickname");
|
||||
//knownKeys.add("homepage");//+http
|
||||
knownKeys.add("email");
|
||||
knownKeys.add("icq");
|
||||
knownKeys.add("jabber");
|
||||
knownKeys.add("yahoo");
|
||||
knownKeys.add("msn");
|
||||
knownKeys.add("comment");
|
||||
|
||||
//empty values
|
||||
Iterator it=knownKeys.iterator();
|
||||
while(it.hasNext()){
|
||||
prop.put("success_"+(String)it.next(), 0);
|
||||
}
|
||||
|
||||
//number of not explicitly recopgnized but displayed items
|
||||
int numUnknown=0;
|
||||
while (i.hasNext()) {
|
||||
entry = (Map.Entry) i.next();
|
||||
String key=(String)entry.getKey();
|
||||
String value=(String)entry.getValue();
|
||||
//all known Keys which should be set as they are
|
||||
if(knownKeys.contains(key)){
|
||||
prop.put("success_"+key, 1);
|
||||
prop.put("success_"+key+"_value", value);
|
||||
//special handling, hide flower if no icq uin is set
|
||||
}else if(key.equals("homepage")){
|
||||
if(! (value.startsWith("http")) ){
|
||||
value="http://"+value;
|
||||
}
|
||||
prop.put("success_"+key, 1);
|
||||
prop.put("success_"+key+"_value", value);
|
||||
//This will display Unknown Items(of newer versions) as plaintext
|
||||
}else{//unknown
|
||||
prop.put("success_other_"+numUnknown+"_key", key);
|
||||
prop.put("success_other_"+numUnknown+"_value", value);
|
||||
numUnknown++;
|
||||
}
|
||||
}
|
||||
prop.put("success_other", numUnknown);
|
||||
//prop.putAll(profile);
|
||||
prop.put("success_peername", seed.getName());
|
||||
}
|
||||
} else {
|
||||
prop.put("success","0"); // wrong access
|
||||
}
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>yacyWiki</title>
|
||||
#[metas]#
|
||||
</head>
|
||||
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
|
||||
#[header]#
|
||||
<p>#[pagecontent]#</p>
|
||||
<p>#[pageedit]#</p>
|
||||
#[footer]#
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,393 @@
|
||||
// Wiki.java
|
||||
// -----------------------
|
||||
// part of the AnomicHTTPD caching proxy
|
||||
// (C) by Michael Peter Christen; mc@anomic.de
|
||||
// first published on http://www.anomic.de
|
||||
// Frankfurt, Germany, 2004
|
||||
// last major change: 01.07.2003
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
||||
// running) means that you agree that the Author(s) is (are) not responsible
|
||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
||||
// by usage of this softare or this documentation. The usage of this software
|
||||
// is on your own risk. The installation and usage (starting/running) of this
|
||||
// software may allow other people or application to access your computer and
|
||||
// any attached devices and is highly dependent on the configuration of the
|
||||
// software which must be done by the user of the software; the author(s) is
|
||||
// (are) also not responsible for proper configuration and usage of the
|
||||
// software, even if provoked by documentation provided together with
|
||||
// the software.
|
||||
//
|
||||
// Any changes to this file according to the GPL as documented in the file
|
||||
// gpl.txt aside this file in the shipment you received can be done to the
|
||||
// lines that follows this copyright notice here, but changes must not be
|
||||
// done inside the copyright notive above. A re-distribution must contain
|
||||
// the intact and unchanged copyright notice.
|
||||
// Contributions and changes to the program code must be marked as such.
|
||||
|
||||
// Contains contributions from Alexandier Schier [AS]
|
||||
|
||||
// you must compile this file with
|
||||
// javac -classpath .:../classes Wiki.java
|
||||
// if the shell's current path is HTROOT
|
||||
|
||||
import java.util.*;
|
||||
import java.text.*;
|
||||
import java.io.*;
|
||||
import de.anomic.tools.*;
|
||||
import de.anomic.server.*;
|
||||
//import de.anomic.yacy.*;
|
||||
import de.anomic.data.*;
|
||||
import de.anomic.plasma.*;
|
||||
import de.anomic.http.*;
|
||||
|
||||
public class Wiki {
|
||||
|
||||
private static String ListLevel = "";
|
||||
private static String numListLevel = "";
|
||||
|
||||
private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
public static String dateString(Date date) {
|
||||
return SimpleFormatter.format(date);
|
||||
}
|
||||
|
||||
|
||||
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||||
plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
|
||||
serverObjects prop = new serverObjects();
|
||||
if (post == null) {
|
||||
post = new serverObjects();
|
||||
post.put("page", "start");
|
||||
}
|
||||
|
||||
String pagename = post.get("page", "start");
|
||||
String ip = post.get("CLIENTIP", "127.0.0.1");
|
||||
String author = post.get("author", "anonymous");
|
||||
if (author.equals("anonymous")) {
|
||||
author = switchboard.wikiDB.guessAuthor(ip);
|
||||
if (author == null) {
|
||||
if (de.anomic.yacy.yacyCore.seedDB.mySeed == null)
|
||||
author = "anonymous";
|
||||
else
|
||||
author = de.anomic.yacy.yacyCore.seedDB.mySeed.get("Name", "anonymous");
|
||||
}
|
||||
}
|
||||
|
||||
if (post.containsKey("submit")) {
|
||||
// store a new page
|
||||
switchboard.wikiDB.write(switchboard.wikiDB.newEntry(pagename, author, ip,
|
||||
post.get("reason", "edit"),
|
||||
((String) post.get("content", "")).getBytes()));
|
||||
}
|
||||
|
||||
wikiBoard.entry page = switchboard.wikiDB.read(pagename);
|
||||
|
||||
if (post.containsKey("edit")) {
|
||||
// edit the page
|
||||
try {
|
||||
prop.put("pagecontent", "");
|
||||
prop.put("pageedit",
|
||||
"<form action=\"Wiki.html\" method=\"post\" enctype=\"multipart/form-data\">" +
|
||||
//"<form action=\"Wiki.html\" method=\"post\" enctype=\"application/x-www-form-urlencoded\">" +
|
||||
"<p>Author:<br><input name=\"author\" type=\"text\" size=\"80\" maxlength=\"80\" value=\"" + author + "\"></p>" +
|
||||
"<p>Text:<br><textarea name=\"content\" cols=\"80\" rows=\"24\">" + new String(page.page(), "ISO-8859-1") + "</textarea></p>" +
|
||||
"<input type=\"hidden\" name=\"page\" value=\"" + pagename + "\">" +
|
||||
"<input type=\"hidden\" name=\"reason\" value=\"edit\">" +
|
||||
"<input type=\"submit\" name=\"submit\" value=\"Submit\">" +
|
||||
"<input type=\"submit\" name=\"view\" value=\"Discard\">" +
|
||||
"</form>");
|
||||
} catch (UnsupportedEncodingException e) {}
|
||||
} else if (post.containsKey("index")) {
|
||||
// view an index
|
||||
String index = "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">" +
|
||||
"<tr class=\"TableHeader\"><td>Subject</td><td>Change Date</td><td>Author</td></tr>";
|
||||
|
||||
String subject;
|
||||
try {
|
||||
Iterator i = switchboard.wikiDB.keys(true);
|
||||
wikiBoard.entry entry;
|
||||
while (i.hasNext()) {
|
||||
subject = (String) i.next();
|
||||
entry = switchboard.wikiDB.read(subject);
|
||||
index += "<tr class=\"TableCellLight\">";
|
||||
index += "<td><a href=\"Wiki.html?page=" + wikiBoard.webalize(subject) + "\">" + subject + "</a></td>";
|
||||
index += "<td>" + dateString(entry.date()) + "</td>";
|
||||
index += "<td>" + entry.author() + "</td>";
|
||||
index += "</tr>";
|
||||
}
|
||||
} catch (IOException e) {
|
||||
index += "IO Error reading wiki database: " + e.getMessage();
|
||||
}
|
||||
index += "</table>";
|
||||
prop.put("pagecontent", index);
|
||||
prop.put("pageedit",
|
||||
"<form action=\"Wiki.html\" method=\"post\" enctype=\"multipart/form-data\">" +
|
||||
"<input type=\"hidden\" name=\"page\" value=\"" + pagename + "\">" +
|
||||
"<input type=\"button\" name=\"demo\" value=\"Start Page\" onClick=\"self.location.href='Wiki.html'\">" +
|
||||
"</form>");
|
||||
} else {
|
||||
// show page
|
||||
prop.put("pagecontent",
|
||||
"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" +
|
||||
"<tr class=\"TableHeader\" width=\"100%\" ><td height=\"10\" class=\"TableHeader\" class=\"black\"><font size=\"1\"> <b>" +
|
||||
"yacyWiki page: " + pagename + ", last edited by " + page.author() + ", change date " + dateString(page.date()) +
|
||||
"</b></font></td></tr>" +
|
||||
"<tr class=\"WikiBackground\"><td>" +
|
||||
"<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\"><tr><td>" +
|
||||
transform(page.page(), switchboard) +
|
||||
"</td></tr></table>" +
|
||||
"</td></tr></table>");
|
||||
|
||||
prop.put("pageedit",
|
||||
"<form action=\"Wiki.html\" method=\"get\">" +
|
||||
"<input type=\"hidden\" name=\"page\" value=\"" + pagename + "\">" +
|
||||
"<input type=\"button\" name=\"demo\" value=\"Start Page\" onClick=\"self.location.href='Wiki.html'\">" +
|
||||
"<input type=\"submit\" name=\"index\" value=\"Index\">" +
|
||||
"<input type=\"submit\" name=\"edit\" value=\"Edit\">" +
|
||||
"</form>");
|
||||
}
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
|
||||
|
||||
public static String transform(byte[] content, plasmaSwitchboard switchboard) {
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(content);
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(bais));
|
||||
String line;
|
||||
String out = "";
|
||||
try {
|
||||
while ((line = br.readLine()) != null) {
|
||||
out += transformLine(new String(line), switchboard) + serverCore.crlfString;
|
||||
}
|
||||
return out;
|
||||
} catch (IOException e) {
|
||||
return "internal error: " + e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public static String transformLine(String result, plasmaSwitchboard switchboard) {
|
||||
// transform page
|
||||
int p0, p1;
|
||||
|
||||
// avoide html inside
|
||||
//p0 = 0; while ((p0 = result.indexOf("&", p0+1)) >= 0) result = result.substring(0, p0) + "&" + result.substring(p0 + 1);
|
||||
p0 = 0; while ((p0 = result.indexOf('"', p0+1)) >= 0) result = result.substring(0, p0) + """ + result.substring(p0 + 1);
|
||||
p0 = 0; while ((p0 = result.indexOf("<", p0+1)) >= 0) result = result.substring(0, p0) + "<" + result.substring(p0 + 1);
|
||||
p0 = 0; while ((p0 = result.indexOf(">", p0+1)) >= 0) result = result.substring(0, p0) + ">" + result.substring(p0 + 1);
|
||||
//p0 = 0; while ((p0 = result.indexOf("*", p0+1)) >= 0) result = result.substring(0, p0) + "•" + result.substring(p0 + 1);
|
||||
p0 = 0; while ((p0 = result.indexOf("(C)", p0+1)) >= 0) result = result.substring(0, p0) + "©" + result.substring(p0 + 3);
|
||||
|
||||
// format lines
|
||||
if (result.startsWith(" ")) result = "<tt>" + result + "</tt>";
|
||||
if (result.startsWith("----")) result = "<hr>";
|
||||
|
||||
// format headers
|
||||
if ((p0 = result.indexOf("====")) >= 0) {
|
||||
p1 = result.indexOf("====", p0 + 4);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<h4>" +
|
||||
result.substring(p0 + 4, p1) + "</h4>" +
|
||||
result.substring(p1 + 4);
|
||||
}
|
||||
if ((p0 = result.indexOf("===")) >= 0) {
|
||||
p1 = result.indexOf("===", p0 + 3);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<h3>" +
|
||||
result.substring(p0 + 3, p1) + "</h3>" +
|
||||
result.substring(p1 + 3);
|
||||
}
|
||||
if ((p0 = result.indexOf("==")) >= 0) {
|
||||
p1 = result.indexOf("==", p0 + 2);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<h2>" +
|
||||
result.substring(p0 + 2, p1) + "</h2>" +
|
||||
result.substring(p1 + 2);
|
||||
}
|
||||
|
||||
if ((p0 = result.indexOf("''''")) >= 0) {
|
||||
p1 = result.indexOf("''''", p0 + 4);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<b><i>" +
|
||||
result.substring(p0 + 4, p1) + "</i></b>" +
|
||||
result.substring(p1 + 4);
|
||||
}
|
||||
if ((p0 = result.indexOf("'''")) >= 0) {
|
||||
p1 = result.indexOf("'''", p0 + 3);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<b>" +
|
||||
result.substring(p0 + 3, p1) + "</b>" +
|
||||
result.substring(p1 + 3);
|
||||
}
|
||||
if ((p0 = result.indexOf("''")) >= 0) {
|
||||
p1 = result.indexOf("''", p0 + 2);
|
||||
if (p1 >= 0) result = result.substring(0, p0) + "<i>" +
|
||||
result.substring(p0 + 2, p1) + "</i>" +
|
||||
result.substring(p1 + 2);
|
||||
}
|
||||
|
||||
//* unorderd Lists contributed by [AS]
|
||||
//** Sublist
|
||||
if(result.startsWith(ListLevel + "*")){ //more stars
|
||||
p0 = result.indexOf(ListLevel);
|
||||
p1 = result.length();
|
||||
result = "<ul>" + serverCore.crlfString +
|
||||
"<li>" +
|
||||
result.substring(ListLevel.length() + 1, p1) +
|
||||
"</li>";
|
||||
ListLevel += "*";
|
||||
}else if(ListLevel.length() > 0 && result.startsWith(ListLevel)){ //equal number of stars
|
||||
p0 = result.indexOf(ListLevel);
|
||||
p1 = result.length();
|
||||
result = "<li>" +
|
||||
result.substring(ListLevel.length(), p1) +
|
||||
"</li>";
|
||||
}else if(ListLevel.length() > 0){ //less stars
|
||||
int i = ListLevel.length();
|
||||
String tmp = "";
|
||||
|
||||
while(! result.startsWith(ListLevel.substring(0,i)) ){
|
||||
tmp += "</ul>";
|
||||
i--;
|
||||
}
|
||||
ListLevel = ListLevel.substring(0,i);
|
||||
p0 = ListLevel.length();
|
||||
p1 = result.length();
|
||||
|
||||
if(ListLevel.length() > 0){
|
||||
result = tmp +
|
||||
"<li>" +
|
||||
result.substring(p0, p1) +
|
||||
"</li>";
|
||||
}else{
|
||||
result = tmp + result.substring(p0, p1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//# sorted Lists contributed by [AS]
|
||||
//## Sublist
|
||||
if(result.startsWith(numListLevel + "#")){ //more #
|
||||
p0 = result.indexOf(numListLevel);
|
||||
p1 = result.length();
|
||||
result = "<ol>" + serverCore.crlfString +
|
||||
"<li>" +
|
||||
result.substring(numListLevel.length() + 1, p1) +
|
||||
"</li>";
|
||||
numListLevel += "#";
|
||||
}else if(numListLevel.length() > 0 && result.startsWith(numListLevel)){ //equal number of #
|
||||
p0 = result.indexOf(numListLevel);
|
||||
p1 = result.length();
|
||||
result = "<li>" +
|
||||
result.substring(numListLevel.length(), p1) +
|
||||
"</li>";
|
||||
}else if(numListLevel.length() > 0){ //less #
|
||||
int i = numListLevel.length();
|
||||
String tmp = "";
|
||||
|
||||
while(! result.startsWith(numListLevel.substring(0,i)) ){
|
||||
tmp += "</ol>";
|
||||
i--;
|
||||
}
|
||||
numListLevel = numListLevel.substring(0,i);
|
||||
p0 = numListLevel.length();
|
||||
p1 = result.length();
|
||||
|
||||
if(numListLevel.length() > 0){
|
||||
result = tmp +
|
||||
"<li>" +
|
||||
result.substring(p0, p1) +
|
||||
"</li>";
|
||||
}else{
|
||||
result = tmp + result.substring(p0, p1);
|
||||
}
|
||||
}
|
||||
// end contrib [AS]
|
||||
|
||||
|
||||
// create links
|
||||
String kl, kv;
|
||||
int p;
|
||||
// internal links
|
||||
while ((p0 = result.indexOf("[[")) >= 0) {
|
||||
p1 = result.indexOf("]]", p0 + 2);
|
||||
if (p1 <= p0) break; else; {
|
||||
kl = result.substring(p0 + 2, p1);
|
||||
if ((p = kl.indexOf("|")) > 0) {
|
||||
kv = kl.substring(p + 1);
|
||||
kl = kl.substring(0, p);
|
||||
} else {
|
||||
kv = kl;
|
||||
}
|
||||
if (switchboard.wikiDB.read(kl) != null)
|
||||
result = result.substring(0, p0) +
|
||||
"<a class=\"known\" href=\"Wiki.html?page=" + kl + "\">" + kv + "</a>" +
|
||||
result.substring(p1 + 2);
|
||||
else
|
||||
result = result.substring(0, p0) +
|
||||
"<a class=\"unknown\" href=\"Wiki.html?page=" + kl + "&edit=Edit\">" + kv + "</a>" +
|
||||
result.substring(p1 + 2);
|
||||
}
|
||||
}
|
||||
|
||||
// external links
|
||||
while ((p0 = result.indexOf("[")) >= 0) {
|
||||
p1 = result.indexOf("]", p0 + 1);
|
||||
if (p1 <= p0) break; else {
|
||||
kl = result.substring(p0 + 1, p1);
|
||||
if ((p = kl.indexOf(" ")) > 0) {
|
||||
kv = kl.substring(p + 1);
|
||||
kl = kl.substring(0, p);
|
||||
} else {
|
||||
kv = kl;
|
||||
}
|
||||
if (!(kl.startsWith("http://"))) kl = "http://" + kl;
|
||||
result = result.substring(0, p0) +
|
||||
"<a class=\"extern\" href=\"" + kl + "\">" + kv + "</a>" +
|
||||
result.substring(p1 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (result.endsWith("</li>")) return result; else return result + "<br>";
|
||||
}
|
||||
|
||||
/*
|
||||
what we need:
|
||||
|
||||
== New section ==
|
||||
=== Subsection ===
|
||||
==== Sub-subsection ====
|
||||
link colours: existent=green, non-existent=red
|
||||
----
|
||||
[[wikipedia FAQ|answers]] (first element is wiki page name, second is link print name)
|
||||
[http://www.nupedia.com Nupedia] (external link)
|
||||
[http://www.nupedia.com] (un-named external link)
|
||||
''Emphasize'', '''strongly''', '''''very strongly''''' (italics, bold, bold-italics)
|
||||
|
||||
* Lists are easy to do:
|
||||
** start every line with a star
|
||||
*** more stars means deeper levels
|
||||
# Numbered lists are also good
|
||||
## very organized
|
||||
## easy to follow
|
||||
; Definition list : list of definitions
|
||||
; item : the item's definition
|
||||
: A colon indents a line or paragraph.
|
||||
A manual newline starts a new paragraph.
|
||||
|
||||
A picture: [[Image:Wiki.png]]
|
||||
[[Image:Wiki.png|right|jigsaw globe]] (floating right-side with caption)
|
||||
|
||||
*/
|
||||
|
||||
}
|
After Width: | Height: | Size: 999 B |
After Width: | Height: | Size: 138 B |
After Width: | Height: | Size: 141 B |
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 407 B |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 129 B |