2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 #include "anyp/PortCfg.h"
13 #include "security/PeerOptions.h"
15 #include "ssl/support.h"
21 AnyP::PortCfgPointer HttpPortList
;
22 AnyP::PortCfgPointer FtpPortList
;
25 int HttpSockets
[MAXTCPLISTENPORTS
];
27 AnyP::PortCfg::PortCfg() :
30 transport(AnyP::PROTO_HTTP
,1,1), // "Squid is an HTTP proxy", etc.
38 connection_auth_disabled(false),
39 ftp_track_dirs(false),
41 disable_pmtu_discovery(0),
44 memset(&tcp_keepalive
, 0, sizeof(tcp_keepalive
));
47 AnyP::PortCfg::~PortCfg()
49 if (Comm::IsConnOpen(listenConn
)) {
55 safe_free(defaultsite
);
59 AnyP::PortCfg::clone() const
61 AnyP::PortCfgPointer b
= new AnyP::PortCfg();
64 b
->name
= xstrdup(name
);
66 b
->defaultsite
= xstrdup(defaultsite
);
68 b
->transport
= transport
;
70 b
->allow_direct
= allow_direct
;
73 b
->connection_auth_disabled
= connection_auth_disabled
;
74 b
->ftp_track_dirs
= ftp_track_dirs
;
75 b
->disable_pmtu_discovery
= disable_pmtu_discovery
;
76 b
->tcp_keepalive
= tcp_keepalive
;