Add Authority to gRPC Transport #3076
Merged
+57
−43
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.
今天心血来潮,想研究一下凭啥 gRPC 不能设置 Host,遂发现它有 Authority 可以当 Host 来用这个 PR 可以实现 TLS ServerName 和 gRPC Authority 不同,已测试兼容 Cloudflare但是不能让 gRPC 控制 TLS,否则会报错两个值不同,故代码里做了分离这下 gRPC 也能“域前置”了,没有 ALPN 问题,三年前就该出的
客户端用,配置示例: