From: adam Date: Sun, 9 Jul 2006 06:51:37 +0000 (+0000) Subject: resolve X-Git-Url: http://git.megacz.com/?p=org.ibex.jinetd.git;a=commitdiff_plain resolve darcs-hash:20060709065137-5007d-65535ab72f57502f36cd88ec39bdab3f79b4673f.gz --- diff --git a/src/org/ibex/jinetd/Host.java b/src/org/ibex/jinetd/Host.java index 97942a8..0a27734 100644 --- a/src/org/ibex/jinetd/Host.java +++ b/src/org/ibex/jinetd/Host.java @@ -34,11 +34,14 @@ public class Host extends TreeClassLoader { public static void init(String path, String host, int depth, ClassLoader pcl) { if (!new File(path).exists() || !new File(path).isDirectory()) return; try { - InetAddress.getByName(host); + Log.warn(Host.class, "resolving " + host); + InetAddress ia = InetAddress.getByName(host); String pad = ""; while(pad.length() + host.length() < 30) pad += " "; - Log.info(Main.class, pad + host + " => " + path); - hosts.put(host, pcl = new Host(path, host, pcl)); + if (ia.equals(InetAddress.getLocalHost())) { + Log.info(Main.class, pad + host + " => " + path); + hosts.put(host, pcl = new Host(path, host, pcl)); + } } catch (UnknownHostException e) { if (depth >= 3) return; } diff --git a/www/index.html b/www/index.html index 2f99367..2ceb80c 100644 --- a/www/index.html +++ b/www/index.html @@ -10,6 +10,85 @@ Jinetd does for TCP what servlet containers do for HTTP.

Isn't HTTP all that matters?

There are now Java servers for almost every network protocol: HTTP, +SMTP, IMAP, POP3, NNTP, DNS, SSH, CIFS/SMB, and plenty of others. +Using servers written in buffer-overflow-free languages is the most +important step towards maintaining network security and stopping +worms. + +

Huh?

+ +Jinetd listens on the ports and interfaces you specify. When it +receives a connection, it loads the code designated to handle that +protocol and hands off the connection. + +

Isn't that trivially simple?

+ +While jinetd is an extremely lightweight server, it allows multiple +different network protocol handlers to share the following facilities: + + + + + +v v v v v v v +************* +

Jinetd: inetd for Java

+ +

What is it?

+ +Jinetd does for TCP what servlet containers do for HTTP. + +

Isn't HTTP all that matters?

+ +There are now Java servers for almost every network protocol: HTTP, SMTP, IMAP, POP3, NNTP, DNS, SSH, TELNET, CIFS/SMB, @@ -80,3 +159,5 @@ different network protocol handlers to share the following facilities: + +^ ^ ^ ^ ^ ^ ^ \ No newline at end of file