- intranet scanner now produces urls with host names, not ips if possible

- CrawStartIntranet servlet shows IPs and host names

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7210 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 75964909aa
commit 3057a0b939

@ -41,12 +41,14 @@
<table class="sortable" border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td><input type="checkbox" name="allswitch" onclick="setall(this.form.name)" /></td>
<td>IP</td>
<td>URL</td>
<td>Process</td>
</tr>
#{list}#
<tr class="TableCellLight">
<td align="left"><input type="checkbox" name="item_#[count]#" value="mark_#[pk]#" /></td>
<td><a href="#[url]#">#[ip]#</a></td>
<td><a href="#[url]#">#[url]#</a></td>
#(process)#<td class="error">not in index</td>::<td class="commit">indexed</td>#(/process)#
</tr>

@ -24,6 +24,7 @@ import java.util.Iterator;
import java.util.Map;
import net.yacy.cora.document.MultiProtocolURI;
import net.yacy.cora.protocol.Domains;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.protocol.Scanner;
import net.yacy.kelondro.blob.Tables;
@ -90,6 +91,7 @@ public class CrawlStartIntranet_p {
urlString = url.toNormalform(true, false);
prop.put("servertable_list_" + i + "_pk", new String(url.hash()));
prop.put("servertable_list_" + i + "_count", i);
prop.putHTML("servertable_list_" + i + "_ip", Domains.dnsResolve(url.getHost()).getHostAddress());
prop.putHTML("servertable_list_" + i + "_url", urlString);
prop.put("servertable_list_" + i + "_process", inIndex(sb, urlString) == null ? 0 : 1);
i++;

@ -121,7 +121,7 @@ public class Scanner extends Thread {
private void addProtocol(String protocol, boolean bigrange) {
for (InetAddress i: genlist(bigrange)) {
try {
this.scanqueue.put(new MultiProtocolURI(protocol + "://" + i.getHostAddress() + "/"));
this.scanqueue.put(new MultiProtocolURI(protocol + "://" + i.getHostName() + "/"));
} catch (MalformedURLException e) {
Log.logException(e);
} catch (InterruptedException e) {

Loading…
Cancel
Save