also documents the name= port option which was previously implemented but unused
--- /dev/null
+
+/*
+ * $Id: ACLMyPortName.cc,v 1.1 2008/01/14 13:19:48 hno Exp $
+ *
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ *
+ * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
+ */
+
+#include "squid.h"
+#include "ACLMyPortName.h"
+#include "ACLStringData.h"
+#include "ACLChecklist.h"
+
+/* explicit template instantiation required for some systems */
+
+template class ACLStrategised<const char *>;
+
+ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
+
+ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
+
+int
+ACLMyPortNameStrategy::match (ACLData<MatchType> * &data, ACLChecklist *checklist)
+{
+ if (checklist->conn() != NULL)
+ return data->match (checklist->conn()->port->name);
+ return 0;
+}
+
+ACLMyPortNameStrategy *
+ACLMyPortNameStrategy::Instance()
+{
+ return &Instance_;
+}
+
+ACLMyPortNameStrategy ACLMyPortNameStrategy::Instance_;
--- /dev/null
+
+/*
+ * $Id: ACLMyPortName.h,v 1.1 2008/01/14 13:19:48 hno Exp $
+ *
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ *
+ * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
+ */
+
+#ifndef SQUID_ACLMYPORTNAME_H
+#define SQUID_ACLMYPORTNAME_H
+#include "ACLStrategy.h"
+#include "ACLStrategised.h"
+
+class ACLMyPortNameStrategy : public ACLStrategy<const char *>
+{
+
+public:
+ virtual int match (ACLData<MatchType> * &, ACLChecklist *);
+ static ACLMyPortNameStrategy *Instance();
+ /* Not implemented to prevent copies of the instance. */
+ /* Not private to prevent brain dead g+++ warnings about
+ * private constructors with no friends */
+ ACLMyPortNameStrategy(ACLMyPortNameStrategy const &);
+
+private:
+ static ACLMyPortNameStrategy Instance_;
+ ACLMyPortNameStrategy(){}
+
+ ACLMyPortNameStrategy&operator=(ACLMyPortNameStrategy const &);
+};
+
+class ACLMyPortName
+{
+
+private:
+ static ACL::Prototype RegistryProtoype;
+ static ACLStrategised<const char *> RegistryEntry_;
+};
+
+#endif /* SQUID_ACLMYPORTNAME_H */
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.197 2007/12/27 15:48:53 hno Exp $
+# $Id: Makefile.am,v 1.198 2008/01/14 13:19:48 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
ACLMyIP.h \
ACLMyPort.cc \
ACLMyPort.h \
+ ACLMyPortName.cc \
+ ACLMyPortName.h \
ACLProtocol.cc \
ACLProtocol.h \
ACLProtocolData.cc \
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.453 2007/12/27 15:50:00 hno Exp $
+# $Id: Makefile.in,v 1.454 2008/01/14 13:19:48 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
ACLMaxConnection.cc ACLMaxConnection.h ACLMaxUserIP.cc \
ACLMaxUserIP.h ACLMethod.cc ACLMethod.h ACLMethodData.cc \
ACLMethodData.h ACLMyIP.cc ACLMyIP.h ACLMyPort.cc ACLMyPort.h \
- ACLProtocol.cc ACLProtocol.h ACLProtocolData.cc \
- ACLProtocolData.h ACLProxyAuth.cc ACLProxyAuth.h ACLReferer.cc \
- ACLReferer.h ACLRegexData.cc ACLRegexData.h \
- ACLReplyHeaderStrategy.h ACLReplyMIMEType.cc \
+ ACLMyPortName.cc ACLMyPortName.h ACLProtocol.cc ACLProtocol.h \
+ ACLProtocolData.cc ACLProtocolData.h ACLProxyAuth.cc \
+ ACLProxyAuth.h ACLReferer.cc ACLReferer.h ACLRegexData.cc \
+ ACLRegexData.h ACLReplyHeaderStrategy.h ACLReplyMIMEType.cc \
ACLReplyMIMEType.h ACLHTTPRepHeader.cc ACLHTTPRepHeader.h \
ACLHTTPReqHeader.cc ACLHTTPReqHeader.h \
ACLRequestHeaderStrategy.h ACLRequestMIMEType.cc \
ACLIntRange.$(OBJEXT) ACLIP.$(OBJEXT) \
ACLMaxConnection.$(OBJEXT) ACLMaxUserIP.$(OBJEXT) \
ACLMethod.$(OBJEXT) ACLMethodData.$(OBJEXT) ACLMyIP.$(OBJEXT) \
- ACLMyPort.$(OBJEXT) ACLProtocol.$(OBJEXT) \
- ACLProtocolData.$(OBJEXT) ACLProxyAuth.$(OBJEXT) \
- ACLReferer.$(OBJEXT) ACLRegexData.$(OBJEXT) \
- ACLReplyMIMEType.$(OBJEXT) ACLHTTPRepHeader.$(OBJEXT) \
- ACLHTTPReqHeader.$(OBJEXT) ACLRequestMIMEType.$(OBJEXT) \
- ACLSourceDomain.$(OBJEXT) ACLSourceIP.$(OBJEXT) \
- ACLStrategised.$(OBJEXT) ACLStringData.$(OBJEXT) \
- ACLTime.$(OBJEXT) ACLTimeData.$(OBJEXT) ACLUrl.$(OBJEXT) \
- ACLUrlPath.$(OBJEXT) ACLUrlPort.$(OBJEXT) \
- ACLUserData.$(OBJEXT)
+ ACLMyPort.$(OBJEXT) ACLMyPortName.$(OBJEXT) \
+ ACLProtocol.$(OBJEXT) ACLProtocolData.$(OBJEXT) \
+ ACLProxyAuth.$(OBJEXT) ACLReferer.$(OBJEXT) \
+ ACLRegexData.$(OBJEXT) ACLReplyMIMEType.$(OBJEXT) \
+ ACLHTTPRepHeader.$(OBJEXT) ACLHTTPReqHeader.$(OBJEXT) \
+ ACLRequestMIMEType.$(OBJEXT) ACLSourceDomain.$(OBJEXT) \
+ ACLSourceIP.$(OBJEXT) ACLStrategised.$(OBJEXT) \
+ ACLStringData.$(OBJEXT) ACLTime.$(OBJEXT) \
+ ACLTimeData.$(OBJEXT) ACLUrl.$(OBJEXT) ACLUrlPath.$(OBJEXT) \
+ ACLUrlPort.$(OBJEXT) ACLUserData.$(OBJEXT)
am__objects_7 = comm_select.$(OBJEXT) comm_select_win32.$(OBJEXT) \
comm_poll.$(OBJEXT) comm_epoll.$(OBJEXT) comm_kqueue.$(OBJEXT)
am__objects_8 = delay_pools.$(OBJEXT) DelayId.$(OBJEXT) \
ACLMyIP.h \
ACLMyPort.cc \
ACLMyPort.h \
+ ACLMyPortName.cc \
+ ACLMyPortName.h \
ACLProtocol.cc \
ACLProtocol.h \
ACLProtocolData.cc \
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLMethodData.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLMyIP.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLMyPort.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLMyPortName.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLProtocol.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLProtocolData.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ACLProxyAuth.Po@am__quote@
/*
- * $Id: cache_cf.cc,v 1.533 2008/01/11 02:38:59 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.534 2008/01/14 13:19:48 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
char *junk = NULL;
s->disable_pmtu_discovery = DISABLE_PMTU_OFF;
+ s->name = strdup(token);
#if USE_IPV6
if (*token == '[') {
#
-# $Id: cf.data.pre,v 1.492 2007/12/29 18:20:22 hno Exp $
+# $Id: cf.data.pre,v 1.493 2008/01/14 13:19:48 hno Exp $
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
# ----------------------------------------------------------
sporadically hang or never complete requests set
disable-pmtu-discovery option to 'transparent'.
+ name= Specifies a internal name for the port. Defaults to
+ the port specification (port or addr:port)
+
If you run Squid on a dual-homed machine with an internal
and an external interface we recommend you to specify the
internal address:port in http_port. This way Squid will only be
vport=NN As above, but uses specified port number rather
than the https_port number. Implies accel.
+ name= Specifies a internal name for the port. Defaults to
+ the port specification (port or addr:port)
+
DOC_END
NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp