Squid ����Ϳ���� HTTP �쥹�ݥإå��� X-Cache �� X-Squid-Error ��ä���ˡ��
squid.confg �˰ʲ����ɲä��롣squid/2.5.STABLE13 �ǤϤ���������إå��ν��Ϥ��������뤳�Ȥ��Ǥ�����
Squid ���С����ץ������Ȥ��ƻ��Ѥ��Ƥ��ơ������Υ���ƥ�ĥ����ФΥۥ���̾�ʤɤ����饤����Ȥ��֤äƤ��ޤ��Τ��������˻Ȥ��롣�̤˾ä�ɬ�פ�ʤ����ʤ��Ȼפä����������ӥ���ľ�ܱƶ��Τʤ�����ϳ����˽Ф��ʤ��Τ����ܤ������Ȥꤢ�������ꤷ�Ƥ������Ȥˤ������Ǥ⡢����Ǥ��� X-Powered-By: ASP.NET �Ȥ� X-AspNet-Version: 2.0.50727 �ʤɤȤ��ä��إå���ʿ���ǽ��Ϥ��Ƥ��ꤹ�롣������Τʤ��䡣
squid.confg �˰ʲ����ɲä��롣squid/2.5.STABLE13 �ǤϤ���������إå��ν��Ϥ��������뤳�Ȥ��Ǥ�����
header_access X-Cache deny all
header_access X-Squid-Error deny all
Squid ���С����ץ������Ȥ��ƻ��Ѥ��Ƥ��ơ������Υ���ƥ�ĥ����ФΥۥ���̾�ʤɤ����饤����Ȥ��֤äƤ��ޤ��Τ��������˻Ȥ��롣�̤˾ä�ɬ�פ�ʤ����ʤ��Ȼפä����������ӥ���ľ�ܱƶ��Τʤ�����ϳ����˽Ф��ʤ��Τ����ܤ������Ȥꤢ�������ꤷ�Ƥ������Ȥˤ������Ǥ⡢����Ǥ��� X-Powered-By: ASP.NET �Ȥ� X-AspNet-Version: 2.0.50727 �ʤɤȤ��ä��إå���ʿ���ǽ��Ϥ��Ƥ��ꤹ�롣������Τʤ��䡣
* Squid �� Squirm �ǥ�����쥯���դ� SSL ��С����ץ�����
���ε�����ľ���URL: Permlink | ���ε�����°���륫�ƥ���: [Squid] [�ͥåȥ��]
��̳�� SSL �б��Υ�С����ץ��������뤳�Ȥˤʤä���Squid �ȥ�����쥯���� Squirm ��ȤäƼ¸����褦�Ȥ�������Squirm 1.0betaB �� POST ��åɤ��б����Ƥ��ʤ�������̤ι�����Ȥ뤳�ȤȤʤä���
�������� Apache 2.2 �� + mod_proxy ���������������Ѥ���ޥ���� OS ��Ť�����Apache ��Ȥä���С����ץ������α��ѥΥ��ϥ��Ϥ��ޤ�ʤ����ᡢSquid �Ǥ�������λ��������Фޤ��ꤦͽ�ꡣ�軰����� Pound �����������Υ��ϥ����ʤ��ΤǺ���ΰƷ�ǤϤޤ��Ȥ�ʤ������������ʤߤ˱��ѥޥ���� Solaris 2.6�����ߥƥ�����Υޥ���Υ��ڥå��ϰʲ����̤ꡣ
SSL ����ʬ��Ʃ��Ū�� SSL ��������졼�����������Ѥ���ͽ��ʤΤǡ�Squid �ϤȤ��˲��⤷�ʤ���
Squid ������ô���Ԥ����ȡ��뤷�Ƥ��� squid-2.5.STABLE12 ��Ȥ��������Ǥκǿ��� 2006ǯ3��12�������� squid-2.5.STABLE13 �������Ȥ������꤬�ʤ���� squid-2.5.STABLE12 �Τޤޱ��Ѥ˾褻��ͽ�ꡣ
�Ĥޤꡢ�ʲ��Τ褦�˳������� URL �Υѥ���ʬ��������������褦�ˤ�������
example.jp/sonic64/ �ؤΥꥯ�����Ȥ� sonic64.intranet.example.jp �˥�����쥯�ȡ�
example.jp/landscape/ �ؤΥꥯ�����Ȥ� landscape.intranet.example.jp �˥�����쥯�ȡ�
������� Squid ñ�ΤǤϼ¸��Ǥ��ʤ��Τǡ�������쥯���ȸƤ֥��֥����ƥ�� Squid ��Ϣ�Ȥ����������뤲�롣����ϥ�����쥯���ˤ� Squirm (�������) ��Ȥ����Ȥˤ��������Ѥ���ͳ�ϲ��⤷�Ƥ��륦���֥����Ȥ����ä����Ȥȡ��饤���� GPL �����顣Perl �� C �ǥ�����쥯����Ƥ��ɤ�������ɡ������Ȥ��Ƥ����Τ�����ʤ餽�ä�������������
http://squirm.foote.com.au/
�嵭�����Ȥ��� squirm-1.0betaB.tar �����������ɡ�tar ball ��Ÿ��������ϡ������Ȥ˽�Ƥ��������˽��äƥ���ѥ���ȥ��ȡ����ʤ�롣
�ʤ�����빽��֤�������ʤ�����configure script ��ư��ˤĤ����Τä��ߤ�������פߤ����ʤ��Ȥ��嵭�����Ȥ˽�Ƥ����ɡ������������ȤʤΤ���
����ɽ���饤�֥��Υ���ѥ���� make �Ͻ���ä��������������� make install ���褦�Ȥ����饨�顼��
install �Υ��ץ������������? ��� make �Ϥ褯�Τ�ʤ�������ɡ�����ϥ��ޥ�ɥ饤��λ���λ��������������äƥ��顼����͡�Squirm �Υ����Ȥ˽�Ƥ뵭�Ҥ��ѤʤΤ��ʡ�����Ȥ⡢�䤬�ȤäƤ� make �����������Τ��ʡ����������С���λȤäƤ��� make �ä� GNU make ����ʤ��� Solaris �����̤� make �ʤ�? ��ǧ���Ƥߤ롣
�ʲ��ν��Ϥ�¤ꡢ�������̤� GNU make �Τ褦����
�������ʤ������ make install ����äƤ뤳�Ȥäơ��ե�����Υ��ԡ��ȥѡ��ߥå���������Ȥ��Ǥ��礦? �Ȥ����櫓�ǡ��Ȥꤢ�������Ȥ� /usr/local/squirm �إե�����ԡ����ƥѡ��ߥå��������ꤷ����strip �Ϥ�ä�����ä�? �ޤ��Ȥꤢ�����Ϥɤ���Ǥ⤤���䡣
squid.conf �ˤϰʲ��Υ�����쥯���Τ����������ɲá�
Squid ��ư���Ȥꤢ�������ѥ����Υ�����쥯�Ȥ��Ƥߤ��������ޤ�ư���Ƥ���褦����
��������ASP.NET + IIS 6.0 ��ư�����Ƥ��륵���Ф˥�����쥯�Ȥ����Ȥ��ε�ư���ǧ���褦�Ȥ����Ȥ�������ȯ�����ɤ��� HTTP �� POST ��åɤˤ��ꥯ�����Ȥ�������쥯�Ȥ���Ƥ��ʤ����͡�������쥯���˽������Ϥ餺��Squid �����ǽ������Ƥ���褦�˸����롣����� Squid �������Τ�? Squirm �������Τ�?
squirm-1.0betaB �� squirm.c �� load_in_buff()
�Ȥʤ�ȡ�Apache + mod_proxy ��Ȥ��������Ȥϥ�С�����Υ����й������Ѥ��뤫����ʬ�ǥ�����쥯�������������
����������Ƥ������̡�URL �Υѥ���ʬ����ˤ�������ʬ������Ȥ���ɬ�ܤǤʤ��Ȥ������Ȥˤʤꡢ������쥯����Ȥ�ɬ�פϤʤ��ʤä����ĤޤꡢSquid �����Ǥ褤�Ȥ������Ȥ���
1.0BetaB ����쵤�˥С�����ʤ�� 1.26 �ˤʤäƤ�櫓�����顢�⤷������ POST ��åɤˤ��б����Ƥ뤫�⤷��ʤ����⤦ɬ�פʤ��ʤä����ɡ���� tar ball �����������ɤ��ƥ����������ϸ��Ƥߤ褦��
squirm 1.26 �� squrim.c
�嵭��¤ꡢSquirm 1.26 �ʤ� HTTP POST ��åɤˤ��б����Ƥ�褦�����⤷�������顢�б����Ƥ���褦�˸��������ơ��̤ΤȤ����ǥ�����쥯�Ȥ��������̤����Ƥ뤫�⤷��ʤ����ɡ��������ˤ���ʤ��ȤϤʤ�������POST �б����Ƥ�ʤ�ǽ餫�餳��Ȥ����ɤ��ä��͡�
- Squid ��Ȥä� SSL ��С����ץ�����
����ΰƷ�ǻȤ���С����ץ��������եȥ�������������� Squid (�����å�) ����¾��ô���Ԥ���꤫���Ƥ����Ȥ������Ȥȡ�Squid �ʤ��ȿ�������Ѥ��Ƥ�����Ӥ����äƱ��ѤΥΥ��ϥ����Ū�⤢��Ȥ����Τ���ͳ���������� Apache 2.2 �� + mod_proxy ���������������Ѥ���ޥ���� OS ��Ť�����Apache ��Ȥä���С����ץ������α��ѥΥ��ϥ��Ϥ��ޤ�ʤ����ᡢSquid �Ǥ�������λ��������Фޤ��ꤦͽ�ꡣ�軰����� Pound �����������Υ��ϥ����ʤ��ΤǺ���ΰƷ�ǤϤޤ��Ȥ�ʤ������������ʤߤ˱��ѥޥ���� Solaris 2.6�����ߥƥ�����Υޥ���Υ��ڥå��ϰʲ����̤ꡣ
$ uname -a
SunOS sonic64 5.6 Generic_105181-32 sun4u sparc SUNW,Ultra-1
$ dmesg
cpu0: SUNW,UltraSPARC (upaid 0 impl 0x10 ver 0x40 clock 200 MHz)
SunOS Release 5.6 Version Generic_105181-32 [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1997, Sun Microsystems, Inc.
mem = 131072K (0x8000000)
avail mem = 125919232
SSL ����ʬ��Ʃ��Ū�� SSL ��������졼�����������Ѥ���ͽ��ʤΤǡ�Squid �ϤȤ��˲��⤷�ʤ���
Squid ������ô���Ԥ����ȡ��뤷�Ƥ��� squid-2.5.STABLE12 ��Ȥ��������Ǥκǿ��� 2006ǯ3��12�������� squid-2.5.STABLE13 �������Ȥ������꤬�ʤ���� squid-2.5.STABLE12 �Τޤޱ��Ѥ˾褻��ͽ�ꡣ
- Squid + Squirm �ǥ�����쥯���դ���С����ץ�����
���������ʻ����Ƥ������̡��������Υɥᥤ��ϰ�Ĥˤ��Ƥ�������������������С����ץ�������ʣ���Υɥᥤ��˥ꥯ�����Ȥ���Ѥ��������Ĥޤꡢ�ʲ��Τ褦�˳������� URL �Υѥ���ʬ��������������褦�ˤ�������
example.jp/sonic64/ �ؤΥꥯ�����Ȥ� sonic64.intranet.example.jp �˥�����쥯�ȡ�
example.jp/landscape/ �ؤΥꥯ�����Ȥ� landscape.intranet.example.jp �˥�����쥯�ȡ�
������� Squid ñ�ΤǤϼ¸��Ǥ��ʤ��Τǡ�������쥯���ȸƤ֥��֥����ƥ�� Squid ��Ϣ�Ȥ����������뤲�롣����ϥ�����쥯���ˤ� Squirm (�������) ��Ȥ����Ȥˤ��������Ѥ���ͳ�ϲ��⤷�Ƥ��륦���֥����Ȥ����ä����Ȥȡ��饤���� GPL �����顣Perl �� C �ǥ�����쥯����Ƥ��ɤ�������ɡ������Ȥ��Ƥ����Τ�����ʤ餽�ä�������������
- Squirm �Υ���ѥ���ȥ��ȡ���
Squirm - A redirector for Squidhttp://squirm.foote.com.au/
�嵭�����Ȥ��� squirm-1.0betaB.tar �����������ɡ�tar ball ��Ÿ��������ϡ������Ȥ˽�Ƥ��������˽��äƥ���ѥ���ȥ��ȡ����ʤ�롣
cd regex
./configure
make clean
make
cp -p regex.o regex.h ..
cd ..
make
�ʤ�����빽��֤�������ʤ�����configure script ��ư��ˤĤ����Τä��ߤ�������פߤ����ʤ��Ȥ��嵭�����Ȥ˽�Ƥ����ɡ������������ȤʤΤ���
����ɽ���饤�֥��Υ���ѥ���� make �Ͻ���ä��������������� make install ���褦�Ȥ����饨�顼��
# make install
install -m 755 -o root -g root -d /usr/local/squirm \
/usr/local/squirm/bin
usage: install [options] file [dir1 ...]
make: *** [install] Error 2
install �Υ��ץ������������? ��� make �Ϥ褯�Τ�ʤ�������ɡ�����ϥ��ޥ�ɥ饤��λ���λ��������������äƥ��顼����͡�Squirm �Υ����Ȥ˽�Ƥ뵭�Ҥ��ѤʤΤ��ʡ�����Ȥ⡢�䤬�ȤäƤ� make �����������Τ��ʡ����������С���λȤäƤ��� make �ä� GNU make ����ʤ��� Solaris �����̤� make �ʤ�? ��ǧ���Ƥߤ롣
�ʲ��ν��Ϥ�¤ꡢ�������̤� GNU make �Τ褦����
$ make -v
GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.6
�������ʤ������ make install ����äƤ뤳�Ȥäơ��ե�����Υ��ԡ��ȥѡ��ߥå���������Ȥ��Ǥ��礦? �Ȥ����櫓�ǡ��Ȥꤢ�������Ȥ� /usr/local/squirm �إե�����ԡ����ƥѡ��ߥå��������ꤷ����strip �Ϥ�ä�����ä�? �ޤ��Ȥꤢ�����Ϥɤ���Ǥ⤤���䡣
- squirm.conf �� squid.conf �����ꤷ��ư���ǧ
squirm.conf �˰ʲ������ꡣregex ^http://.*?/ivalice/(.*) http://ivalice.intranet.example.jp/\1
regex ^http://.*?/landscape/(.*) http://landscape.intranet.example.jp/\1
squid.conf �ˤϰʲ��Υ�����쥯���Τ����������ɲá�
redirect_program /usr/local/squirm/bin/squirm
redirect_children 10
Squid ��ư���Ȥꤢ�������ѥ����Υ�����쥯�Ȥ��Ƥߤ��������ޤ�ư���Ƥ���褦����
��������ASP.NET + IIS 6.0 ��ư�����Ƥ��륵���Ф˥�����쥯�Ȥ����Ȥ��ε�ư���ǧ���褦�Ȥ����Ȥ�������ȯ�����ɤ��� HTTP �� POST ��åɤˤ��ꥯ�����Ȥ�������쥯�Ȥ���Ƥ��ʤ����͡�������쥯���˽������Ϥ餺��Squid �����ǽ������Ƥ���褦�˸����롣����� Squid �������Τ�? Squirm �������Τ�?
- Squirm �� POST �������쥯�Ȥ��ʤ�
Squirm �Υ��������ǧ���Ƥߤ����������ʤ�ۤɡ��б����Ƥ���Τ� GET ��åɤ����ǡ�POST ��åɤˤ��ꥯ�����Ȥϼ����դ��ʤ��褦�ˤʤäƤ롣Squid �Ȥ������ Squirm �λ��ͤʤΤ���squirm-1.0betaB �� squirm.c �� load_in_buff()
/* all methods must be GET */
if((strcmp(in_buff->method, "") == 0) ||
(strcmp(in_buff->method, "GET"))) {
#ifdef DEBUG
log(LOG_DEBUG, "in_buff.method not \"GET\"\n",
in_buff->src_address);
#endif
return 1;
}
�Ȥʤ�ȡ�Apache + mod_proxy ��Ȥ��������Ȥϥ�С�����Υ����й������Ѥ��뤫����ʬ�ǥ�����쥯�������������
����������Ƥ������̡�URL �Υѥ���ʬ����ˤ�������ʬ������Ȥ���ɬ�ܤǤʤ��Ȥ������Ȥˤʤꡢ������쥯����Ȥ�ɬ�פϤʤ��ʤä����ĤޤꡢSquid �����Ǥ褤�Ȥ������Ȥ���
- Squirm �� �С������ 1.26 ���ǿ�
���դ� Squirm �Υ����Ȥ�ȡ��ʤ�����ڡ����ξ�����ˡ�Squirm �� 1.26 ���ǿ����衣�Ǥ⡢�ɥ�����Ƚˤ��ʤ��衣�פߤ����ʤ��Ȥ��Ƥ��롣���Ť��ʤ��ä���Note: This web page documents version 1.0-BetaB. There is, in fact, a newer version: squirm-1.26, but I haven't documented it yet. This new version has some new features:
new squirm.conf file allows different redirection lists based upon different sets of source network addresses in CIDR notation.
Automagic accelerator string generation.
It compiles with a simple 'make'
A few other minor features.
Use your systems regex library
1.0BetaB ����쵤�˥С�����ʤ�� 1.26 �ˤʤäƤ�櫓�����顢�⤷������ POST ��åɤˤ��б����Ƥ뤫�⤷��ʤ����⤦ɬ�פʤ��ʤä����ɡ���� tar ball �����������ɤ��ƥ����������ϸ��Ƥߤ褦��
squirm 1.26 �� squrim.c
/* match_method() returns 1 on match, 0 for no-match */
int match_method(char *method, int accept) {
lower_case(method);
/* match all first */
if (accept == ALL) {
return 1;
}
/* and then the most common */
if (strcmp(method,"get") == 0) {
return ((GET & accept) != 0 ? 1 : 0);
}
if (strcmp(method,"put") == 0) {
return ((PUT & accept) != 0 ? 1 : 0);
}
if (strcmp(method,"post") == 0) {
return ((POST & accept) != 0 ? 1 : 0);
}
if (strcmp(method,"head") == 0) {
return ((HEAD & accept) != 0 ? 1 : 0);
}
return 0;
}
�嵭��¤ꡢSquirm 1.26 �ʤ� HTTP POST ��åɤˤ��б����Ƥ�褦�����⤷�������顢�б����Ƥ���褦�˸��������ơ��̤ΤȤ����ǥ�����쥯�Ȥ��������̤����Ƥ뤫�⤷��ʤ����ɡ��������ˤ���ʤ��ȤϤʤ�������POST �б����Ƥ�ʤ�ǽ餫�餳��Ȥ����ɤ��ä��͡�
* Squid �� http -> FTP �Ѵ� (ftp over http proxy)
�֥饦���� ftp://ftp.ring.gr.jp/pub/linux/ �� Squid ��ͳ�ǥ�����������Ȥ���
�ʲ��Τ褦�ʥꥯ�����Ȥ��ꤲ���롣
������ID/Password ����ꤹ�뤳�Ȥ��ǽ��
���åץ����ɤ���Ȥ��ϡ�PUT ��åɤ�Ȥ��в�ǽ�����������䤬�ȤäƤ��� HTTP �ץ�������ͳ�Ǥϻ�Ƥʤ���Netscape ��Ȥä� LAN ��� ftp ������ ���Ф� PUT ���뤳�ȤϤǤ�����
Squid ��ͳ���ȡ�FTP ���åץ����ɤ���Ȥ��� Netscape �ϰʲ��Τ褦�ʥꥯ�����Ȥ��ꤲ�Ƥ���褦����
�嵭�ꥯ�����Ȥǡ����åץ�������Υѥ��� PUT �ꥯ�����Ȥ˴ޤޤ�Ƥ��뤱�ɡ���������ե�����Υѥ��Ϥɤ��ǻ��ꤷ�Ƥ���������? �����ȤΥե����뤬�оݤˤʤ���������?
�������anonymous ���� ftp.ring.gr.jp �˥��åץ����ɤϤǤ��ʤ��Τǥ��顼�ˤʤä������ʤߤ� Squid �����֤äƤ������顼�ϰʲ����̤ꡣPUT �� STOR ���Ѵ����Ƥ�Τ��狼�롣
�ɵ���
2004-05-11 �ˡ�lftp �� FTP Over HTTP Proxy�פȤ������������
�ʲ��Τ褦�ʥꥯ�����Ȥ��ꤲ���롣
GET ftp://ftp.ring.gr.jp/pub/linux/ HTTP/1.1
Host: ftp.ring.gr.jp
������ID/Password ����ꤹ�뤳�Ȥ��ǽ��
GET ftp://anonymous:saitou-hiroaki%40example.com@ftp.ring.gr.jp/pub/linux/ HTTP/1.1
���åץ����ɤ���Ȥ��ϡ�PUT ��åɤ�Ȥ��в�ǽ�����������䤬�ȤäƤ��� HTTP �ץ�������ͳ�Ǥϻ�Ƥʤ���Netscape ��Ȥä� LAN ��� ftp ������ ���Ф� PUT ���뤳�ȤϤǤ�����
Squid ��ͳ���ȡ�FTP ���åץ����ɤ���Ȥ��� Netscape �ϰʲ��Τ褦�ʥꥯ�����Ȥ��ꤲ�Ƥ���褦����
PUT ftp://anonymous:saitou-hiroaki%40example.com@ftp.ring.gr.jp/pub/linux/Zip7Search.dll HTTP/1.0�ʲ����ե��������ȤΥǡ������Х��ʥ��³����
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.78 [en] (Windows NT 5.0; U)
Pragma: no-cache
Host: ftp.ring.gr.jp
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: ja,en
Accept-Charset: iso-8859-1,*,utf-8
Content-Length: 6144
�嵭�ꥯ�����Ȥǡ����åץ�������Υѥ��� PUT �ꥯ�����Ȥ˴ޤޤ�Ƥ��뤱�ɡ���������ե�����Υѥ��Ϥɤ��ǻ��ꤷ�Ƥ���������? �����ȤΥե����뤬�оݤˤʤ���������?
�������anonymous ���� ftp.ring.gr.jp �˥��åץ����ɤϤǤ��ʤ��Τǥ��顼�ˤʤä������ʤߤ� Squid �����֤äƤ������顼�ϰʲ����̤ꡣPUT �� STOR ���Ѵ����Ƥ�Τ��狼�롣
HTTP/1.0 500 Internal Server Error
Server: Squid/2.2.STABLE5
Mime-Version: 1.0
Date: Thu, 24 Apr 2003 09:55:52 GMT
Content-Type: text/html
Content-Length: 896
Expires: Thu, 24 Apr 2003 09:55:52 GMT
X-Squid-Error: ERR_FTP_PUT_ERROR 0
X-Cache: MISS from unknown
Age: 286
Via: HTTP/1.0 hostname (Traffic-Server/4.0.19 [cMs f ])
���顼
FTP ���åץ����ɤϼ��Ԥ��ޤ���
�ʲ��� URL �� PUT ���褦�Ȥ����ݤ�:
ftp://anonymous@ftp.ring.gr.jp/pub/linux/Zip7Search.dll
Squid �ϰʲ��� ftp ���ޥ�ɤ�����ޤ�����:
STOR Zip7Search.dll
���Τ褦�ʷ�̤�������ޤ�����
Zip7Search.dll: Permission denied on server. (Upload)
���ΰ�̣�ϼ����̤�Ǥ�:
�ѥ����ѡ��ߥå���ǥ������ζ������̤��ǧ�������ٻ�Ƥ���������
Generated Thu, 24 Apr 2003 09:55:52 GMT by unknown
(Squid/2.2.STABLE5)
�ɵ���
2004-05-11 �ˡ�lftp �� FTP Over HTTP Proxy�פȤ������������