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
14#include "comm/forward.h"
15
16namespace Ip
17{
18
19class Address;
20
30{
31public:
34
36 bool LookupNat(const Comm::Connection &);
37
47 bool ProbeForTproxy(Address &test);
48
53 inline int TransparentActive() { return transparentActive_; };
54
60 void StartTransparency();
61
68 void StopTransparency(const char *str);
69
74 inline int InterceptActive() { return interceptActive_; };
75
81 void StartInterception();
82
83private:
84
92
99 bool IpfwInterception(const Comm::ConnectionPointer &newConn);
100
107 bool IpfInterception(const Comm::ConnectionPointer &newConn);
108
115 bool PfInterception(const Comm::ConnectionPointer &newConn);
116
119};
120
121#if LINUX_NETFILTER && !defined(IP_TRANSPARENT)
123#define IP_TRANSPARENT 19
124#endif
125
130extern Intercept Interceptor;
131
132} // namespace Ip
133
134#endif /* SQUID_IP_IPINTERCEPT_H */
135
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:74
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:53
void StartInterception()
Definition: Intercept.cc:167
int interceptActive_
Definition: Intercept.h:118
int transparentActive_
Definition: Intercept.h:117
bool IpfInterception(const Comm::ConnectionPointer &newConn)
Definition: Intercept.cc:197
Intercept Interceptor
Definition: Intercept.h:130
Definition: Xaction.cc:139

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors