版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://windtear.net/archives/2004/10/10/000448.html
http://www.squid-cache.org/Versions/v2/2.5/ squid-2.5.STABLE7-RC3
IPCN patch 包括两部分 一是隐藏版本 主要是出于安全或者迷惑等问题 二是log全部URL 这个patch 直接来自 scaner
diff -ru squid-2.5.STABLE7-RC3/configure squid-2.5.STABLE7-RC3p/configure --- squid-2.5.STABLE7-RC3/configure Wed Oct 6 06:58:02 2004 +++ squid-2.5.STABLE7-RC3p/configure Sun Oct 10 15:05:12 2004 @@ -1000,7 +1000,7 @@
# Define the identity of the package. PACKAGE=squid -VERSION=2.5.STABLE7-RC3 +VERSION=IPCN.PROXY cat >> confdefs.h <<EOF #define PACKAGE "$PACKAGE" EOF diff -ru squid-2.5.STABLE7-RC3/lib/getfullhostname.c squid-2.5.STABLE7-RC3p/lib/getfullhostname.c --- squid-2.5.STABLE7-RC3/lib/getfullhostname.c Fri Jan 12 08:37:12 2001 +++ squid-2.5.STABLE7-RC3p/lib/getfullhostname.c Sun Oct 10 14:08:33 2004 @@ -80,12 +80,15 @@ const char * getfullhostname(void) { - const struct hostent *hp = NULL; + //const struct hostent *hp = NULL; static char buf[SQUIDHOSTNAMELEN + 1];
+#if 0 if (gethostname(buf, SQUIDHOSTNAMELEN) < 0) return NULL; if ((hp = gethostbyname(buf)) != NULL) xstrncpy(buf, hp->h_name, SQUIDHOSTNAMELEN); +#endif + xstrncpy(buf, "proxy.ipcn.org", SQUIDHOSTNAMELEN); return buf; } diff -ru squid-2.5.STABLE7-RC3/src/cf.data.pre squid-2.5.STABLE7-RC3p/src/cf.data.pre --- squid-2.5.STABLE7-RC3/src/cf.data.pre Wed Oct 6 05:31:25 2004 +++ squid-2.5.STABLE7-RC3p/src/cf.data.pre Sun Oct 10 14:05:52 2004 @@ -843,6 +843,14 @@ every HTTP and ICP queries received. To disable, enter "none". DOC_END
+NAME: log_full_uri +TYPE: int +DEFAULT: 0 +LOC: Config.Log.log_full_uri +DOC_START + Logs the full request url in access logs. + To enable, set the options to 1 +DOC_END
NAME: cache_log TYPE: string diff -ru squid-2.5.STABLE7-RC3/src/client_side.c squid-2.5.STABLE7-RC3p/src/client_side.c --- squid-2.5.STABLE7-RC3/src/client_side.c Wed Oct 6 06:34:42 2004 @@ -829,7 +829,10 @@ mem = http->entry->mem_obj; if (http->out.size || http->log_type) { http->al.icp.opcode = ICP_INVALID; - http->al.url = http->log_uri; + if(Config.Log.log_full_uri) + http->al.url = http->uri; + else + http->al.url = http->log_uri; debug(33, 9) ("httpRequestFree: al.url='%s'\n", http->al.url); if (mem) { http->al.http.code = mem->reply->sline.status; diff -ru squid-2.5.STABLE7-RC3/src/structs.h squid-2.5.STABLE7-RC3p/src/structs.h --- squid-2.5.STABLE7-RC3/src/structs.h Wed Oct 6 06:56:36 2004 +++ squid-2.5.STABLE7-RC3p/src/structs.h Sun Oct 10 14:05:52 2004 @@ -466,6 +466,7 @@ struct { char *log; char *access; + int log_full_uri; char *store; char *swap; #if USE_USERAGENT_LOG
IPCN configure 目前如下 主要是去掉一些无用的东西 也是 spec 的核心部分了 # squid -v Squid Cache: Version IPCN.PROXY configure options: --exec_prefix=/usr --bindir=/usr/sbin --libexecdir=/usr/lib/squid --localstatedir=/var --sysconfdir=/etc/squid --enable-poll --enable-snmp --enable-removal-policies=heap,lru --enable-storeio=ufs --disable-delay-pools --enable-linux-netfilter --with-pthreads --enable-basic-auth-helpers=NCSA --enable-underscores --disable-ident-lookups --disable-icmp --disable-arp-acl
enable-snmp 之后 自己做了监控模块对 squid 进行实时监控 做出图表
-----> some related articles squid snmp (2004-10-09) IPCN proxy 调整 ipcn norton virusdb 调整 (2004-09-25) [IPCN] proxy.ipcn.org 两周年~ (2004-09-15) SNMP 简单网络管理 (2004-08-11) ipcn.org / ipchina.org - alexa / google / baidu [ipcn] 关注已办理离校手续同学的上网问题 IPCN proxy PAUSED IPCN简化设置Proxy squid ipcn.pac use URLHash2 of SPS(Super Proxy Script) - remove ipcnauth (2004-04-28) squid-2.5.STABLE5 以及 IPCN 的一些调整 (2004-04-17) IPCN 参加第二十二届“挑战杯”(三) [IPCN] proxy.ipcn.org 200403 使用统计 ipcn.pac (2004-02-16) [IPCN] proxy.ipcn.org 使用设置调整公告 (2004-02-16) [IPCN] 俺家代理的一个人性化改动 +补充说明 (2004-02-12) 关键词 (free proxy) 我的代理打入百度搜索引擎(baidu)首位 - proxy.ipcn.org 2003年度 ipcn.org/ipchina.org 总结报告 IPCN / IPCHINA 部分网络服务
|
|