Intercept.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_IP_IPINTERCEPT_H
12#define SQUID_IP_IPINTERCEPT_H
13
14namespace Ip
15{
16
17class Address;
18
28{
29public:
32
34 bool LookupNat(const Comm::Connection &);
35
45 bool ProbeForTproxy(Address &test);
46
51 inline int TransparentActive() { return transparentActive_; };
52
58 void StartTransparency();
59
66 void StopTransparency(const char *str);
67
72 inline int InterceptActive() { return interceptActive_; };
73
79 void StartInterception();
80
81private:
82
90
97 bool IpfwInterception(const Comm::ConnectionPointer &newConn);
98
105 bool IpfInterception(const Comm::ConnectionPointer &newConn);
106
113 bool PfInterception(const Comm::ConnectionPointer &newConn);
114
117};
118
119#if LINUX_NETFILTER && !defined(IP_TRANSPARENT)
121#define IP_TRANSPARENT 19
122#endif
123
128extern Intercept Interceptor;
129
130} // namespace Ip
131
132#endif /* SQUID_IP_IPINTERCEPT_H */
133
bool NetfilterInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:123
bool PfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:310
void StopTransparency(const char *str)
Definition: Intercept.cc:114
int InterceptActive()
Definition: Intercept.h:72
void StartTransparency()
Definition: Intercept.cc:152
bool IpfwInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:181
bool ProbeForTproxy(Address &test)
Definition: Intercept.cc:393
bool LookupNat(const Comm::Connection &)
perform NAT lookups for the local address of the given connection
Definition: Intercept.cc:382
int TransparentActive()
Definition: Intercept.h:51
void StartInterception()
Definition: Intercept.cc:167
int interceptActive_
Definition: Intercept.h:116
int transparentActive_
Definition: Intercept.h:115
bool IpfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:197
Intercept Interceptor
Definition: Intercept.h:128
Definition: Xaction.cc:139

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors