Squid Web Cache master
Loading...
Searching...
No Matches
Intercept.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9/* DEBUG: section 89 NAT / IP Interception */
10
11#ifndef SQUID_SRC_IP_INTERCEPT_H
12#define SQUID_SRC_IP_INTERCEPT_H
13
14#include "comm/forward.h"
15
16namespace Ip
17{
18
19class Address;
20
30{
31public:
34
39 bool LookupNat(const Comm::Connection &);
40
50 bool ProbeForTproxy(Address &test);
51
56 inline int TransparentActive() { return transparentActive_; };
57
63 void StartTransparency();
64
71 void StopTransparency(const char *str);
72
77 inline int InterceptActive() { return interceptActive_; };
78
84 void StartInterception();
85
86private:
87
95
102 bool IpfwInterception(const Comm::ConnectionPointer &newConn);
103
110 bool IpfInterception(const Comm::ConnectionPointer &newConn);
111
118 bool PfInterception(const Comm::ConnectionPointer &newConn);
119
121
124};
125
126#if LINUX_NETFILTER && !defined(IP_TRANSPARENT)
128#define IP_TRANSPARENT 19
129#endif
130
135extern Intercept Interceptor;
136
137} // namespace Ip
138
139#endif /* SQUID_SRC_IP_INTERCEPT_H */
140
bool NetfilterInterception(const Comm::ConnectionPointer &newConn)
Definition Intercept.cc:125
bool PfInterception(const Comm::ConnectionPointer &newConn)
Definition Intercept.cc:326
void StopTransparency(const char *str)
Definition Intercept.cc:116
int InterceptActive()
Definition Intercept.h:77
void StartTransparency()
Definition Intercept.cc:154
bool IpfwInterception(const Comm::ConnectionPointer &newConn)
Definition Intercept.cc:183
bool ProbeForTproxy(Address &test)
Definition Intercept.cc:402
bool UseInterceptionAddressesLookedUpEarlier(const char *, const Comm::ConnectionPointer &)
Definition Intercept.cc:197
bool LookupNat(const Comm::Connection &)
Definition Intercept.cc:391
int TransparentActive()
Definition Intercept.h:56
void StartInterception()
Definition Intercept.cc:169
int interceptActive_
Definition Intercept.h:123
int transparentActive_
Definition Intercept.h:122
bool IpfInterception(const Comm::ConnectionPointer &newConn)
Definition Intercept.cc:213
Intercept Interceptor
Definition Intercept.h:135
Definition Xaction.cc:137