From 9e1485c13bf6e7b2a038128531b205ab6df45fbb Mon Sep 17 00:00:00 2001 From: allo Date: Thu, 29 Sep 2005 20:15:31 +0000 Subject: [PATCH] new Class for UserAccounts git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@813 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpdProxyAccount.java | 22 ++++++++++++++++++++ source/de/anomic/http/httpdProxyHandler.java | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 source/de/anomic/http/httpdProxyAccount.java diff --git a/source/de/anomic/http/httpdProxyAccount.java b/source/de/anomic/http/httpdProxyAccount.java new file mode 100644 index 000000000..b38a02185 --- /dev/null +++ b/source/de/anomic/http/httpdProxyAccount.java @@ -0,0 +1,22 @@ +import java.net.InetAddress; + +public final class httpdProxyAccount { + String username; + InetAddress ip; + int timeLimit; //max. Time for this user + int timeUsed; + boolean timeBlock; //count linear or only activity? + + public httpdProxyAccount(InetAddress myip){ + ip=myip; + timeLimit=0; + timeUsed=0; + timeBlock=false; + } + public httpdProxyAccount(InetAddress myip, int mytimeLimit){ + ip=myip; + timeLimit=mytimeLimit; + timeUsed=0; + timeBlock=false; + } +} diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java index 3ee2ff179..9992e521f 100644 --- a/source/de/anomic/http/httpdProxyHandler.java +++ b/source/de/anomic/http/httpdProxyHandler.java @@ -119,6 +119,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt private File htRootPath = null; private static boolean doAccessLogging = false; + private static HashSet users = null; /** * Do logging configuration for special proxy access log file @@ -168,6 +169,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt } catch (Exception e) { serverLog.logSevere("PROXY","Unable to configure proxy access logging.",e); } + users = new HashSet(); } /** @@ -1391,4 +1393,4 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt http://xlists.aza.org/moderator/cookietest/cookietest1.php http://vancouver-webpages.com/proxy/cache-test.html - */ \ No newline at end of file + */