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_SRC_IP_INTERCEPT_H
12 #define SQUID_SRC_IP_INTERCEPT_H
13 
14 #include "comm/forward.h"
15 
16 namespace Ip
17 {
18 
19 class Address;
20 
29 class Intercept
30 {
31 public:
33  ~Intercept() {};
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 
86 private:
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)
127 #define IP_TRANSPARENT 19
129 #endif
130 
136 
137 } // namespace Ip
138 
139 #endif /* SQUID_SRC_IP_INTERCEPT_H */
140 
void StopTransparency(const char *str)
Definition: Intercept.cc:115
void StartTransparency()
Definition: Intercept.cc:153
bool NetfilterInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:124
int TransparentActive()
Definition: Intercept.h:56
bool IpfwInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:182
bool UseInterceptionAddressesLookedUpEarlier(const char *, const Comm::ConnectionPointer &)
Definition: Intercept.cc:196
int transparentActive_
Definition: Intercept.h:122
int interceptActive_
Definition: Intercept.h:123
bool IpfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:212
int InterceptActive()
Definition: Intercept.h:77
void StartInterception()
Definition: Intercept.cc:168
Definition: Xaction.cc:137
bool ProbeForTproxy(Address &test)
Definition: Intercept.cc:401
Intercept Interceptor
Definition: Intercept.h:135
bool LookupNat(const Comm::Connection &)
Definition: Intercept.cc:390
bool PfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:325

 

Introduction

Documentation

Support

Miscellaneous