Add package squid v5.7 (#4814)
* adding squid package version 5.7 * updated cgmanifest and licenses for squid * License verified * license map updated * squid spec changelog updated Co-authored-by: Muhammad Falak R Wani <falakreyaz@gmail.com> * removed unused files and ran lint * updating signatures --------- Co-authored-by: Sindhu Karri <lakarri@microsoft.com> Co-authored-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
parent
ae58625333
commit
c365fa8e7e
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
if [ -f /etc/sysconfig/squid ]; then
|
||||
. /etc/sysconfig/squid
|
||||
fi
|
||||
|
||||
SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}
|
||||
|
||||
CACHE_SWAP=`awk '/^[[:blank:]]*cache_dir/ { print $3 }' "$SQUID_CONF"`
|
||||
|
||||
init_cache_dirs=0
|
||||
for adir in $CACHE_SWAP; do
|
||||
if [ ! -d $adir/00 ]; then
|
||||
echo -n "init_cache_dir $adir... "
|
||||
init_cache_dirs=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $init_cache_dirs -ne 0 ]; then
|
||||
echo ""
|
||||
squid --foreground -z -f "$SQUID_CONF" >> /var/log/squid/squid.out 2>&1
|
||||
fi
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/lib/rpm/perl.req $* | grep -v "Authen::Smb"
|
|
@ -0,0 +1,10 @@
|
|||
diff --git a/contrib/url-normalizer.pl b/contrib/url-normalizer.pl
|
||||
index 4cb0480..4b89910 100755
|
||||
--- a/contrib/url-normalizer.pl
|
||||
+++ b/contrib/url-normalizer.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -Tw
|
||||
+#!/usr/bin/perl -Tw
|
||||
#
|
||||
# * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
|
||||
# *
|
|
@ -0,0 +1,32 @@
|
|||
diff -up squid-3.1.0.9/QUICKSTART.location squid-3.1.0.9/QUICKSTART
|
||||
--- squid-3.1.0.9/QUICKSTART.location 2009-06-26 12:35:27.000000000 +0200
|
||||
+++ squid-3.1.0.9/QUICKSTART 2009-07-17 14:03:10.000000000 +0200
|
||||
@@ -10,10 +10,9 @@ After you retrieved, compiled and instal
|
||||
INSTALL in the same directory), you have to configure the squid.conf
|
||||
file. This is the list of the values you *need* to change, because no
|
||||
sensible defaults could be defined. Do not touch the other variables
|
||||
-for now. We assume you have installed Squid in the default location:
|
||||
-/usr/local/squid
|
||||
+for now.
|
||||
|
||||
-Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:
|
||||
+Uncomment and edit the following lines in /etc/squid/squid.conf:
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -82,12 +81,12 @@ After editing squid.conf to your liking,
|
||||
line TWICE:
|
||||
|
||||
To create any disk cache_dir configured:
|
||||
- % /usr/local/squid/sbin/squid -z
|
||||
+ % /usr/sbin/squid -z
|
||||
|
||||
To start squid:
|
||||
- % /usr/local/squid/sbin/squid
|
||||
+ % /usr/sbin/squid
|
||||
|
||||
-Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
|
||||
+Check in the cache.log (/var/log/squid/cache.log) that
|
||||
everything is all right.
|
||||
|
||||
Once Squid created all its files (it can take several minutes on some
|
|
@ -0,0 +1,95 @@
|
|||
------------------------------------------------------------
|
||||
revno: 14311
|
||||
revision-id: squid3@treenet.co.nz-20150924130537-lqwzd1z99a3l9gt4
|
||||
parent: squid3@treenet.co.nz-20150924032241-6cx3g6hwz9xfoybr
|
||||
------------------------------------------------------------
|
||||
revno: 14311
|
||||
revision-id: squid3@treenet.co.nz-20150924130537-lqwzd1z99a3l9gt4
|
||||
parent: squid3@treenet.co.nz-20150924032241-6cx3g6hwz9xfoybr
|
||||
fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4323
|
||||
author: Francesco Chemolli <kinkie@squid-cache.org>
|
||||
committer: Amos Jeffries <squid3@treenet.co.nz>
|
||||
branch nick: trunk
|
||||
timestamp: Thu 2015-09-24 06:05:37 -0700
|
||||
message:
|
||||
Bug 4323: Netfilter broken cross-includes with Linux 4.2
|
||||
------------------------------------------------------------
|
||||
# Bazaar merge directive format 2 (Bazaar 0.90)
|
||||
# revision_id: squid3@treenet.co.nz-20150924130537-lqwzd1z99a3l9gt4
|
||||
# target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/
|
||||
# testament_sha1: c67cfca81040f3845d7c4caf2f40518511f14d0b
|
||||
# timestamp: 2015-09-24 13:06:33 +0000
|
||||
# source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk
|
||||
# base_revision_id: squid3@treenet.co.nz-20150924032241-\
|
||||
# 6cx3g6hwz9xfoybr
|
||||
#
|
||||
# Begin patch
|
||||
=== modified file 'compat/os/linux.h'
|
||||
--- compat/os/linux.h 2015-01-13 07:25:36 +0000
|
||||
+++ compat/os/linux.h 2015-09-24 13:05:37 +0000
|
||||
@@ -30,6 +30,21 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
+ * Netfilter header madness. (see Bug 4323)
|
||||
+ *
|
||||
+ * Netfilter have a history of defining their own versions of network protocol
|
||||
+ * primitives without sufficient protection against the POSIX defines which are
|
||||
+ * aways present in Linux.
|
||||
+ *
|
||||
+ * netinet/in.h must be included before any other sys header in order to properly
|
||||
+ * activate include guards in <linux/libc-compat.h> the kernel maintainers added
|
||||
+ * to workaround it.
|
||||
+ */
|
||||
+#if HAVE_NETINET_IN_H
|
||||
+#include <netinet/in.h>
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
* sys/capability.h is only needed in Linux apparently.
|
||||
*
|
||||
* HACK: LIBCAP_BROKEN Ugly glue to get around linux header madness colliding with glibc
|
||||
fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4323
|
||||
author: Francesco Chemolli <kinkie@squid-cache.org>
|
||||
committer: Amos Jeffries <squid3@treenet.co.nz>
|
||||
branch nick: trunk
|
||||
timestamp: Thu 2015-09-24 06:05:37 -0700
|
||||
message:
|
||||
Bug 4323: Netfilter broken cross-includes with Linux 4.2
|
||||
------------------------------------------------------------
|
||||
# Bazaar merge directive format 2 (Bazaar 0.90)
|
||||
# revision_id: squid3@treenet.co.nz-20150924130537-lqwzd1z99a3l9gt4
|
||||
# target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/
|
||||
# testament_sha1: c67cfca81040f3845d7c4caf2f40518511f14d0b
|
||||
# timestamp: 2015-09-24 13:06:33 +0000
|
||||
# source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk
|
||||
# base_revision_id: squid3@treenet.co.nz-20150924032241-\
|
||||
# 6cx3g6hwz9xfoybr
|
||||
#
|
||||
# Begin patch
|
||||
=== modified file 'compat/os/linux.h'
|
||||
--- compat/os/linux.h 2015-01-13 07:25:36 +0000
|
||||
+++ compat/os/linux.h 2015-09-24 13:05:37 +0000
|
||||
@@ -30,6 +30,21 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
+ * Netfilter header madness. (see Bug 4323)
|
||||
+ *
|
||||
+ * Netfilter have a history of defining their own versions of network protocol
|
||||
+ * primitives without sufficient protection against the POSIX defines which are
|
||||
+ * aways present in Linux.
|
||||
+ *
|
||||
+ * netinet/in.h must be included before any other sys header in order to properly
|
||||
+ * activate include guards in <linux/libc-compat.h> the kernel maintainers added
|
||||
+ * to workaround it.
|
||||
+ */
|
||||
+#if HAVE_NETINET_IN_H
|
||||
+#include <netinet/in.h>
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
* sys/capability.h is only needed in Linux apparently.
|
||||
*
|
||||
* HACK: LIBCAP_BROKEN Ugly glue to get around linux header madness colliding with glibc
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
diff -up squid-4.0.11/src/cf.data.pre.config squid-4.0.11/src/cf.data.pre
|
||||
--- squid-4.0.11/src/cf.data.pre.config 2016-06-09 22:32:57.000000000 +0200
|
||||
+++ squid-4.0.11/src/cf.data.pre 2016-07-11 21:08:35.090976840 +0200
|
||||
@@ -4658,7 +4658,7 @@ DOC_END
|
||||
|
||||
NAME: logfile_rotate
|
||||
TYPE: int
|
||||
-DEFAULT: 10
|
||||
+DEFAULT: 0
|
||||
LOC: Config.Log.rotateNumber
|
||||
DOC_START
|
||||
Specifies the default number of logfile rotations to make when you
|
||||
@@ -6444,11 +6444,11 @@ COMMENT_END
|
||||
|
||||
NAME: cache_mgr
|
||||
TYPE: string
|
||||
-DEFAULT: webmaster
|
||||
+DEFAULT: root
|
||||
LOC: Config.adminEmail
|
||||
DOC_START
|
||||
Email-address of local cache manager who will receive
|
||||
- mail if the cache dies. The default is "webmaster".
|
||||
+ mail if the cache dies. The default is "root".
|
||||
DOC_END
|
||||
|
||||
NAME: mail_from
|
|
@ -0,0 +1,116 @@
|
|||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 81403a7..5e2a493 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -2477,6 +2477,7 @@ tests_testHttpRequest_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
|
||||
@@ -2781,6 +2782,7 @@ tests_testCacheManager_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
tests_testCacheManager_LDFLAGS = $(LIBADD_DL)
|
||||
@@ -3101,6 +3103,7 @@ tests_testEvent_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
tests_testEvent_LDFLAGS = $(LIBADD_DL)
|
||||
@@ -3339,6 +3342,7 @@ tests_testEventLoop_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
tests_testEventLoop_LDFLAGS = $(LIBADD_DL)
|
||||
diff --git a/src/Makefile.in b/src/Makefile.in
|
||||
index fda6de6..4e047cc 100644
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -4581,6 +4581,7 @@ tests_test_http_range_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
|
||||
@@ -4972,6 +4973,7 @@ tests_testHttpRequest_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
|
||||
@@ -5274,6 +5276,7 @@ tests_testCacheManager_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
|
||||
@@ -5593,6 +5596,7 @@ tests_testEvent_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
|
||||
@@ -5832,6 +5836,7 @@ tests_testEventLoop_LDADD = \
|
||||
$(SSLLIB) \
|
||||
$(KRB5LIBS) \
|
||||
$(LIBCPPUNIT_LIBS) \
|
||||
+ $(SYSTEMD_LIBS) \
|
||||
$(COMPAT_LIB) \
|
||||
$(XTRA_LIBS)
|
||||
|
||||
diff --git a/src/proxyp/Parser.cc b/src/proxyp/Parser.cc
|
||||
index 328d207..2f358a7 100644
|
||||
--- a/src/proxyp/Parser.cc
|
||||
+++ b/src/proxyp/Parser.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "sbuf/Stream.h"
|
||||
|
||||
#include <algorithm>
|
||||
+#include <limits>
|
||||
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
diff --git a/src/security/ServerOptions.cc b/src/security/ServerOptions.cc
|
||||
index e114ed8..22bce84 100644
|
||||
--- a/src/security/ServerOptions.cc
|
||||
+++ b/src/security/ServerOptions.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
#if USE_OPENSSL
|
||||
#include "compat/openssl.h"
|
||||
#include "ssl/support.h"
|
||||
+#include <limits>
|
||||
|
||||
#if HAVE_OPENSSL_ERR_H
|
||||
#include <openssl/err.h>
|
||||
diff --git a/src/acl/ConnMark.cc b/src/acl/ConnMark.cc
|
||||
index 1fdae0c..213cf39 100644
|
||||
--- a/src/acl/ConnMark.cc
|
||||
+++ b/src/acl/ConnMark.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Debug.h"
|
||||
#include "http/Stream.h"
|
||||
#include "sbuf/Stream.h"
|
||||
+#include <limits>
|
||||
|
||||
bool
|
||||
Acl::ConnMark::empty() const
|
|
@ -0,0 +1,68 @@
|
|||
From fc01451000eaa5592cd5afbd6aee14e53f7dd2c3 Mon Sep 17 00:00:00 2001
|
||||
From: Amos Jeffries <amosjeffries@squid-cache.org>
|
||||
Date: Sun, 18 Oct 2020 20:23:10 +1300
|
||||
Subject: [PATCH] Update translations integration
|
||||
|
||||
* Add credits for es-mx translation moderator
|
||||
* Use es-mx for default of all Spanish (Central America) texts
|
||||
* Update translation related .am files
|
||||
---
|
||||
doc/manuals/language.am | 2 +-
|
||||
errors/TRANSLATORS | 1 +
|
||||
errors/aliases | 3 ++-
|
||||
errors/language.am | 3 ++-
|
||||
errors/template.am | 2 +-
|
||||
5 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/doc/manuals/language.am b/doc/manuals/language.am
|
||||
index 7670c88380c..f03c4cf71b4 100644
|
||||
--- a/doc/manuals/language.am
|
||||
+++ b/doc/manuals/language.am
|
||||
@@ -18,4 +18,4 @@ TRANSLATE_LANGUAGES = \
|
||||
oc.lang \
|
||||
pt.lang \
|
||||
ro.lang \
|
||||
- ru.lang
|
||||
+ ru.lang
|
||||
diff --git a/errors/aliases b/errors/aliases
|
||||
index 36f17f4b80f..cf0116f297d 100644
|
||||
--- a/errors/aliases
|
||||
+++ b/errors/aliases
|
||||
@@ -14,7 +14,8 @@ da da-dk
|
||||
de de-at de-ch de-de de-li de-lu
|
||||
el el-gr
|
||||
en en-au en-bz en-ca en-cn en-gb en-ie en-in en-jm en-nz en-ph en-sg en-tt en-uk en-us en-za en-zw
|
||||
-es es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-gt es-hn es-mx es-ni es-pa es-pe es-pr es-py es-sv es-us es-uy es-ve es-xl
|
||||
+es es-ar es-bo es-cl es-cu es-co es-do es-ec es-es es-pe es-pr es-py es-us es-uy es-ve es-xl spq
|
||||
+es-mx es-bz es-cr es-gt es-hn es-ni es-pa es-sv
|
||||
et et-ee
|
||||
fa fa-fa fa-ir
|
||||
fi fi-fi
|
||||
diff --git a/errors/language.am b/errors/language.am
|
||||
index 12b1b2b3b43..029e8c1eb2f 100644
|
||||
--- a/errors/language.am
|
||||
+++ b/errors/language.am
|
||||
@@ -17,6 +17,7 @@ TRANSLATE_LANGUAGES = \
|
||||
de.lang \
|
||||
el.lang \
|
||||
en.lang \
|
||||
+ es-mx.lang \
|
||||
es.lang \
|
||||
et.lang \
|
||||
fa.lang \
|
||||
@@ -51,4 +52,4 @@ TRANSLATE_LANGUAGES = \
|
||||
uz.lang \
|
||||
vi.lang \
|
||||
zh-hans.lang \
|
||||
- zh-hant.lang
|
||||
+ zh-hant.lang
|
||||
diff --git a/errors/template.am b/errors/template.am
|
||||
index 6c12781e6f4..715c65aa22b 100644
|
||||
--- a/errors/template.am
|
||||
+++ b/errors/template.am
|
||||
@@ -48,4 +48,4 @@ ERROR_TEMPLATES = \
|
||||
templates/ERR_UNSUP_REQ \
|
||||
templates/ERR_URN_RESOLVE \
|
||||
templates/ERR_WRITE_ERROR \
|
||||
- templates/ERR_ZERO_SIZE_OBJECT
|
||||
+ templates/ERR_ZERO_SIZE_OBJECT
|
|
@ -0,0 +1,156 @@
|
|||
commit c54122584d175cf1d292b239a5b70f2d1aa77c3a
|
||||
Author: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Mon Dec 5 15:03:07 2022 +0100
|
||||
|
||||
Backport adding IP_BIND_ADDRESS_NO_PORT flag to outgoing connections
|
||||
|
||||
diff --git a/src/comm.cc b/src/comm.cc
|
||||
index b4818f3..b18d175 100644
|
||||
--- a/src/comm.cc
|
||||
+++ b/src/comm.cc
|
||||
@@ -59,6 +59,7 @@
|
||||
*/
|
||||
|
||||
static IOCB commHalfClosedReader;
|
||||
+static int comm_openex(int sock_type, int proto, Ip::Address &, int flags, const char *note);
|
||||
static void comm_init_opened(const Comm::ConnectionPointer &conn, const char *note, struct addrinfo *AI);
|
||||
static int comm_apply_flags(int new_socket, Ip::Address &addr, int flags, struct addrinfo *AI);
|
||||
|
||||
@@ -76,6 +77,7 @@ static EVH commHalfClosedCheck;
|
||||
static void commPlanHalfClosedCheck();
|
||||
|
||||
static Comm::Flag commBind(int s, struct addrinfo &);
|
||||
+static void commSetBindAddressNoPort(int);
|
||||
static void commSetReuseAddr(int);
|
||||
static void commSetNoLinger(int);
|
||||
#ifdef TCP_NODELAY
|
||||
@@ -202,6 +204,22 @@ comm_local_port(int fd)
|
||||
return F->local_addr.port();
|
||||
}
|
||||
|
||||
+/// sets the IP_BIND_ADDRESS_NO_PORT socket option to optimize ephemeral port
|
||||
+/// reuse by outgoing TCP connections that must bind(2) to a source IP address
|
||||
+static void
|
||||
+commSetBindAddressNoPort(const int fd)
|
||||
+{
|
||||
+#if defined(IP_BIND_ADDRESS_NO_PORT)
|
||||
+ int flag = 1;
|
||||
+ if (setsockopt(fd, IPPROTO_IP, IP_BIND_ADDRESS_NO_PORT, reinterpret_cast<char*>(&flag), sizeof(flag)) < 0) {
|
||||
+ const auto savedErrno = errno;
|
||||
+ debugs(50, DBG_IMPORTANT, "ERROR: setsockopt(IP_BIND_ADDRESS_NO_PORT) failure: " << xstrerr(savedErrno));
|
||||
+ }
|
||||
+#else
|
||||
+ (void)fd;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static Comm::Flag
|
||||
commBind(int s, struct addrinfo &inaddr)
|
||||
{
|
||||
@@ -228,6 +246,10 @@ comm_open(int sock_type,
|
||||
int flags,
|
||||
const char *note)
|
||||
{
|
||||
+ // assume zero-port callers do not need to know the assigned port right away
|
||||
+ if (sock_type == SOCK_STREAM && addr.port() == 0 && ((flags & COMM_DOBIND) || !addr.isAnyAddr()))
|
||||
+ flags |= COMM_DOBIND_PORT_LATER;
|
||||
+
|
||||
return comm_openex(sock_type, proto, addr, flags, note);
|
||||
}
|
||||
|
||||
@@ -329,7 +351,7 @@ comm_set_transparent(int fd)
|
||||
* Create a socket. Default is blocking, stream (TCP) socket. IO_TYPE
|
||||
* is OR of flags specified in defines.h:COMM_*
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
comm_openex(int sock_type,
|
||||
int proto,
|
||||
Ip::Address &addr,
|
||||
@@ -488,6 +510,9 @@ comm_apply_flags(int new_socket,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+ if ((flags & COMM_DOBIND_PORT_LATER))
|
||||
+ commSetBindAddressNoPort(new_socket);
|
||||
+
|
||||
if (commBind(new_socket, *AI) != Comm::OK) {
|
||||
comm_close(new_socket);
|
||||
return -1;
|
||||
diff --git a/src/comm.h b/src/comm.h
|
||||
index 5a1a7c2..a9f33db 100644
|
||||
--- a/src/comm.h
|
||||
+++ b/src/comm.h
|
||||
@@ -43,7 +43,6 @@ void comm_import_opened(const Comm::ConnectionPointer &, const char *note, struc
|
||||
|
||||
/**
|
||||
* Open a port specially bound for listening or sending through a specific port.
|
||||
- * This is a wrapper providing IPv4/IPv6 failover around comm_openex().
|
||||
* Please use for all listening sockets and bind() outbound sockets.
|
||||
*
|
||||
* It will open a socket bound for:
|
||||
@@ -59,7 +58,6 @@ void comm_import_opened(const Comm::ConnectionPointer &, const char *note, struc
|
||||
int comm_open_listener(int sock_type, int proto, Ip::Address &addr, int flags, const char *note);
|
||||
void comm_open_listener(int sock_type, int proto, Comm::ConnectionPointer &conn, const char *note);
|
||||
|
||||
-int comm_openex(int, int, Ip::Address &, int, const char *);
|
||||
unsigned short comm_local_port(int fd);
|
||||
|
||||
int comm_udp_sendto(int sock, const Ip::Address &to, const void *buf, int buflen);
|
||||
diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc
|
||||
index 19c1237..79fa2ed 100644
|
||||
--- a/src/comm/ConnOpener.cc
|
||||
+++ b/src/comm/ConnOpener.cc
|
||||
@@ -285,7 +285,7 @@ Comm::ConnOpener::createFd()
|
||||
if (callback_ == NULL || callback_->canceled())
|
||||
return false;
|
||||
|
||||
- temporaryFd_ = comm_openex(SOCK_STREAM, IPPROTO_TCP, conn_->local, conn_->flags, host_);
|
||||
+ temporaryFd_ = comm_open(SOCK_STREAM, IPPROTO_TCP, conn_->local, conn_->flags, host_);
|
||||
if (temporaryFd_ < 0) {
|
||||
sendAnswer(Comm::ERR_CONNECT, 0, "Comm::ConnOpener::createFd");
|
||||
return false;
|
||||
diff --git a/src/comm/Connection.h b/src/comm/Connection.h
|
||||
index 40c2249..2641f4e 100644
|
||||
--- a/src/comm/Connection.h
|
||||
+++ b/src/comm/Connection.h
|
||||
@@ -52,6 +52,8 @@ namespace Comm
|
||||
#define COMM_REUSEPORT 0x40 //< needs SO_REUSEPORT
|
||||
/// not registered with Comm and not owned by any connection-closing code
|
||||
#define COMM_ORPHANED 0x40
|
||||
+/// Internal Comm optimization: Keep the source port unassigned until connect(2)
|
||||
+#define COMM_DOBIND_PORT_LATER 0x100
|
||||
|
||||
/**
|
||||
* Store data about the physical and logical attributes of a connection.
|
||||
diff --git a/src/ipc.cc b/src/ipc.cc
|
||||
index 45cab52..42e11e6 100644
|
||||
--- a/src/ipc.cc
|
||||
+++ b/src/ipc.cc
|
||||
@@ -95,12 +95,12 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
|
||||
} else void(0)
|
||||
|
||||
if (type == IPC_TCP_SOCKET) {
|
||||
- crfd = cwfd = comm_open(SOCK_STREAM,
|
||||
+ crfd = cwfd = comm_open_listener(SOCK_STREAM,
|
||||
0,
|
||||
local_addr,
|
||||
COMM_NOCLOEXEC,
|
||||
name);
|
||||
- prfd = pwfd = comm_open(SOCK_STREAM,
|
||||
+ prfd = pwfd = comm_open_listener(SOCK_STREAM,
|
||||
0, /* protocol */
|
||||
local_addr,
|
||||
0, /* blocking */
|
||||
diff --git a/src/tests/stub_comm.cc b/src/tests/stub_comm.cc
|
||||
index a1d33d6..bf4bea6 100644
|
||||
--- a/src/tests/stub_comm.cc
|
||||
+++ b/src/tests/stub_comm.cc
|
||||
@@ -48,7 +48,6 @@ int comm_open_uds(int sock_type, int proto, struct sockaddr_un* addr, int flags)
|
||||
void comm_import_opened(const Comm::ConnectionPointer &, const char *note, struct addrinfo *AI) STUB
|
||||
int comm_open_listener(int sock_type, int proto, Ip::Address &addr, int flags, const char *note) STUB_RETVAL(-1)
|
||||
void comm_open_listener(int sock_type, int proto, Comm::ConnectionPointer &conn, const char *note) STUB
|
||||
-int comm_openex(int, int, Ip::Address &, int, tos_t tos, nfmark_t nfmark, const char *) STUB_RETVAL(-1)
|
||||
unsigned short comm_local_port(int fd) STUB_RETVAL(0)
|
||||
int comm_udp_sendto(int sock, const Ip::Address &to, const void *buf, int buflen) STUB_RETVAL(-1)
|
||||
void commCallCloseHandlers(int fd) STUB
|
|
@ -0,0 +1,15 @@
|
|||
/var/log/squid/*.log {
|
||||
weekly
|
||||
rotate 5
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
# Asks squid to reopen its logs. (logfile_rotate 0 is set in squid.conf)
|
||||
# errors redirected to make it silent if squid is not running
|
||||
/usr/sbin/squid -k rotate 2>/dev/null
|
||||
endscript
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$2" in
|
||||
up|down|vpn-up|vpn-down)
|
||||
/usr/bin/systemctl -q reload squid.service || :
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,3 @@
|
|||
#%PAM-1.0
|
||||
auth include password-auth
|
||||
account include password-auth
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Squid caching proxy
|
||||
Documentation=man:squid(8)
|
||||
After=network.target network-online.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
LimitNOFILE=16384
|
||||
PIDFile=/run/squid.pid
|
||||
EnvironmentFile=/etc/sysconfig/squid
|
||||
ExecStartPre=/usr/libexec/squid/cache_swap.sh
|
||||
ExecStart=/usr/sbin/squid --foreground $SQUID_OPTS -f ${SQUID_CONF}
|
||||
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||
KillMode=mixed
|
||||
NotifyAccess=all
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"cache_swap.sh": "266f97f9541f49b715c3b3b468871528b70660415016cae4592c7fab249f6ba4",
|
||||
"perl-requires-squid.sh": "6d142ffcfb64d9dedbed785c85d96fe15293feb589e7d8170c4d825302021401",
|
||||
"squid-5.7.tar.xz": "6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81",
|
||||
"squid.logrotate": "a6954fdc5cfaff414645b6c2d5f4d1ed952681fd47c75b0fdb7d5db8ebbf28d2",
|
||||
"squid.nm": "f7a1b043d4ad9bb1b14a11035594db65ae414012ee8b414e9b701338d5b2828d",
|
||||
"squid.pam": "7b2ccad84e5f2b337985c983b6085e17c47643abaa0b7033c36145864f123a62",
|
||||
"squid.service": "23ba45e089ee7b292e18fc03ad6d26673794f4d0ced2f6f5974ee8f6908bdc5b",
|
||||
"squid.sysconfig": "4c6f7398a7ab025c0d6c85ccdf965a0ce7eef4ea13f5220b9a4d23e19d63b381",
|
||||
"squid.sysusers": "2dedfe271df52dc742a7b185af3c932b03c016dfe05837e01d518b2f7adfd8e5"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,5 @@
|
|||
# default squid options
|
||||
SQUID_OPTS=""
|
||||
|
||||
# default squid conf file
|
||||
SQUID_CONF="/etc/squid/squid.conf"
|
|
@ -0,0 +1,2 @@
|
|||
g squid 23 -
|
||||
u squid 23 "Squid proxy user" /var/spool/squid /sbin/nologin
|
File diff suppressed because one or more lines are too long
|
@ -1858,6 +1858,7 @@
|
|||
"spirv-tools",
|
||||
"splix",
|
||||
"squashfs-tools",
|
||||
"squid",
|
||||
"sratom",
|
||||
"sscg",
|
||||
"star",
|
||||
|
|
|
@ -26652,6 +26652,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
"other": {
|
||||
"name": "squid",
|
||||
"version": "5.7",
|
||||
"downloadUrl": "http://www.squid-cache.org/Versions/v5/squid-5.7.tar.xz"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "other",
|
||||
|
|
Loading…
Reference in New Issue