-
Notifications
You must be signed in to change notification settings - Fork 621
Update listening port modes #2382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,13 +21,22 @@ namespace AnyP | |||||
| class TrafficMode | ||||||
| { | ||||||
| public: | ||||||
| /** marks HTTP accelerator (reverse/surrogate proxy) traffic | ||||||
| /** marks HTTP Proxy (forward proxy) traffic | ||||||
| * | ||||||
| * Indicating the following are required: | ||||||
| * - URL in absolute form (exceptions for CONNECT and OPTIONS methods) | ||||||
| * - NAT is prohibited | ||||||
| * - WWW-Auth* is restricted to cache manager | ||||||
| */ | ||||||
| bool forwardProxy = false; | ||||||
|
|
||||||
| /** marks HTTP Gateway (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 = false; | ||||||
| bool gatewaySurrogate = false; | ||||||
|
|
||||||
| /** marks ports receiving PROXY protocol traffic | ||||||
| * | ||||||
|
|
@@ -73,10 +82,11 @@ class TrafficMode | |||||
| */ | ||||||
| bool tunnelSslBumping = false; | ||||||
|
|
||||||
| /** true if the traffic is in any way intercepted | ||||||
| * | ||||||
| */ | ||||||
| bool isIntercepted() { return natIntercept||tproxyIntercept ;} | ||||||
| /// whether the traffic is in any way intercepted | ||||||
| bool isIntercepted() const { return natIntercept||tproxyIntercept ;} | ||||||
|
|
||||||
| /// whether HTTP proxy (forward-proxy) traffic is expected | ||||||
| bool isForwardProxy() const { return forwardProxy || (!gatewaySurrogate && !isIntercepted()); } | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see no reason to imply that there is some other (unnamed) mode that has the same "forward proxy" meaning as
Suggested change
Edit: GitHub duplicated an earlier version of this change request while I was writing my review. I have deleted that earlier variation after spotting it in the posted review version.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method needs to return true when neither accel/gateway nor intercept/tproxy mode has been set. For backward compatibility with existing configurations before "proxy" mode existed as a setting. |
||||||
| }; | ||||||
|
|
||||||
| } // namespace AnyP | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.