-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding direct connect support. #21942
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e6d74a6
Adding direct connect support.
alyssawilk ae206f0
comments
alyssawilk 5298b63
Merge branch 'main' into dfp
alyssawilk db9ff26
theoretically fixing docs build
alyssawilk 57b8b6a
format?
alyssawilk ceec0fd
fixes
alyssawilk f0f6a0b
format
alyssawilk d4f0844
clang+coverage
alyssawilk 2ec1b9a
tidy
alyssawilk 82afcd2
Merge branch 'main' into dfp
alyssawilk cff9d17
coverage fix
alyssawilk 9b078cd
coverage fix
alyssawilk 903c300
comments
alyssawilk c0bb05a
and relnote
alyssawilk 1d491f7
comments
alyssawilk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
api/envoy/extensions/transport_sockets/http_11_proxy/v3/BUILD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. | ||
|
|
||
| load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") | ||
|
|
||
| licenses(["notice"]) # Apache 2 | ||
|
|
||
| api_proto_package( | ||
| deps = [ | ||
| "//envoy/config/core/v3:pkg", | ||
| "@com_github_cncf_udpa//udpa/annotations:pkg", | ||
| ], | ||
| ) |
31 changes: 31 additions & 0 deletions
31
api/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.extensions.transport_sockets.http_11_proxy.v3; | ||
|
|
||
| import "envoy/config/core/v3/base.proto"; | ||
|
|
||
| import "udpa/annotations/status.proto"; | ||
| import "validate/validate.proto"; | ||
|
|
||
| option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.http_11_proxy.v3"; | ||
| option java_outer_classname = "UpstreamHttp11ConnectProto"; | ||
| option java_multiple_files = true; | ||
| option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/http_11_proxy/v3;http_11_proxyv3"; | ||
| option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
|
||
| // [#protodoc-title: Upstream HTTP/1.1 Proxy] | ||
| // [#extension: envoy.transport_sockets.http_11_proxy] | ||
|
|
||
| // Configuration for HTTP/1.1 proxy transport sockets. | ||
| // If this is configured and an intermediate filter adds proxy metadata to the | ||
| // stream info then | ||
| // - Upstream connections will be directed to the specified proxy address rather | ||
| // than the host's address | ||
|
RyanTheOptimist marked this conversation as resolved.
Outdated
|
||
| // - Upstream TLS connections will have a raw HTTP/1.1 CONNECT header prefaced | ||
| // to the payload, and 200 response stripped (if less than 200 bytes) | ||
| // - Plaintext HTTP/1.1 connections will be sent with a fully qualified URL. | ||
| // This transport socket is not compatible with HTTP/3, plaintext HTTP/2, or raw TCP. | ||
| message Http11ProxyUpstreamTransport { | ||
| // The underlying transport socket being wrapped. | ||
| config.core.v3.TransportSocket transport_socket = 1 [(validate.rules).message = {required: true}]; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include "source/common/network/filter_state_proxy_info.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Network { | ||
|
|
||
| const std::string& Http11ProxyInfoFilterState::key() { | ||
| CONSTRUCT_ON_FIRST_USE(std::string, "envoy.network.transport_socket.http_11_proxy.info"); | ||
| } | ||
|
|
||
| } // namespace Network | ||
| } // namespace Envoy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #pragma once | ||
|
|
||
| #include "envoy/network/address.h" | ||
| #include "envoy/stream_info/filter_state.h" | ||
|
|
||
| #include "absl/strings/string_view.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Network { | ||
|
|
||
| /** | ||
| * Information which filters can add if they detect the stream should go | ||
| * upstream through an HTTP/1.1 proxy. | ||
| */ | ||
| class Http11ProxyInfoFilterState : public StreamInfo::FilterState::Object { | ||
| public: | ||
| // Returns the key for looking up the Http11ProxyInfoFilterState in the FilterState. | ||
| static const std::string& key(); | ||
|
RyanTheOptimist marked this conversation as resolved.
|
||
|
|
||
| Http11ProxyInfoFilterState(absl::string_view hostname, | ||
| Network::Address::InstanceConstSharedPtr address) | ||
| : hostname_(hostname), address_(address) {} | ||
| Network::Address::InstanceConstSharedPtr address() const { return address_; } | ||
|
RyanTheOptimist marked this conversation as resolved.
|
||
| const std::string& hostname() const { return hostname_; } | ||
|
|
||
| private: | ||
| // The hostname of this individual request. | ||
| const std::string hostname_; | ||
|
RyanTheOptimist marked this conversation as resolved.
|
||
| // The address of the proxy. | ||
| const Network::Address::InstanceConstSharedPtr address_; | ||
| }; | ||
|
|
||
| } // namespace Network | ||
| } // namespace Envoy | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify what "proxy metadata" means in this context?