Intercept.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 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 
14 namespace Ip
15 {
16 
17 class Address;
18 
27 class Intercept
28 {
29 public:
31  ~Intercept() {};
32 
34  bool Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn);
35 
45  bool ProbeForTproxy(Address &test);
46 
51  inline int TransparentActive() { return transparentActive_; };
52 
58  inline void StartTransparency() { transparentActive_=1; };
59 
66  void StopTransparency(const char *str);
67 
72  inline int InterceptActive() { return interceptActive_; };
73 
79  inline void StartInterception() { interceptActive_=1; };
80 
87  inline void StopInterception(const char *str);
88 
89 private:
90 
98  bool TproxyTransparent(const Comm::ConnectionPointer &newConn);
99 
106  bool NetfilterInterception(const Comm::ConnectionPointer &newConn);
107 
114  bool IpfwInterception(const Comm::ConnectionPointer &newConn);
115 
122  bool IpfInterception(const Comm::ConnectionPointer &newConn);
123 
130  bool PfInterception(const Comm::ConnectionPointer &newConn);
131 
134 };
135 
136 #if LINUX_NETFILTER && !defined(IP_TRANSPARENT)
137 #define IP_TRANSPARENT 19
139 #endif
140 
146 
147 } // namespace Ip
148 
149 #endif /* SQUID_IP_IPINTERCEPT_H */
150 
bool TproxyTransparent(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:161
void StopTransparency(const char *str)
Definition: Intercept.cc:114
void StartTransparency()
Definition: Intercept.h:58
bool NetfilterInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:132
int TransparentActive()
Definition: Intercept.h:51
void StopInterception(const char *str)
Definition: Intercept.cc:123
bool IpfwInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:179
int transparentActive_
Definition: Intercept.h:132
int interceptActive_
Definition: Intercept.h:133
bool IpfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:195
bool Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn)
Definition: Intercept.cc:380
int InterceptActive()
Definition: Intercept.h:72
void StartInterception()
Definition: Intercept.h:79
Definition: client_db.h:23
bool ProbeForTproxy(Address &test)
Definition: Intercept.cc:417
Intercept Interceptor
Definition: Intercept.h:145
bool PfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:308

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors