]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/anyp/TrafficMode.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / anyp / TrafficMode.h
index 40e9865b8f01a3cb882f422ce33f1cd7e3b8bb01..2e74cad9aa4be159808bd9c11f6eae85deb88f73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -13,7 +13,7 @@ namespace AnyP
 {
 
 /**
- * Set of 'mode' flags defining types of trafic which can be received.
+ * Set of 'mode' flags defining types of traffic which can be received.
  *
  * Use to determine the processing steps which need to be applied
  * to this traffic under any special circumstances which may apply.
@@ -21,17 +21,13 @@ namespace AnyP
 class TrafficMode
 {
 public:
-    TrafficMode() : accelSurrogate(false), proxySurrogate(false), natIntercept(false), tproxyIntercept(false), tunnelSslBumping(false) {}
-    TrafficMode(const TrafficMode &rhs) { operator =(rhs); }
-    TrafficMode &operator =(const TrafficMode &rhs) { memcpy(this, &rhs, sizeof(TrafficMode)); return *this; }
-
     /** marks HTTP accelerator (reverse/surrogate proxy) traffic
      *
      * Indicating the following are required:
      *  - URL translation from relative to absolute form
      *  - restriction to origin peer relay recommended
      */
-    bool accelSurrogate;
+    bool accelSurrogate = false;
 
     /** marks ports receiving PROXY protocol traffic
      *
@@ -41,7 +37,7 @@ public:
      *  - indirect client IP trust verification is mandatory
      *  - TLS is not supported
      */
-    bool proxySurrogate;
+    bool proxySurrogate = false;
 
     /** marks NAT intercepted traffic
      *
@@ -52,7 +48,7 @@ public:
      *  - destination pinning is recommended
      *  - authentication prohibited
      */
-    bool natIntercept;
+    bool natIntercept = false;
 
     /** marks TPROXY intercepted traffic
      *
@@ -64,7 +60,7 @@ public:
      *  - destination pinning is recommended
      *  - authentication prohibited
      */
-    bool tproxyIntercept;
+    bool tproxyIntercept = false;
 
     /** marks intercept and decryption of CONNECT (tunnel) SSL traffic
      *
@@ -75,7 +71,7 @@ public:
      *  - encrypted outbound server connections
      *  - peer relay prohibited. TODO: re-encrypt and re-wrap with CONNECT
      */
-    bool tunnelSslBumping;
+    bool tunnelSslBumping = false;
 
     /** true if the traffic is in any way intercepted
      *