Add REALITY support to gRPC client and server

Now you are able to configure REALITY gRPC client and server
Duplicate of REALITY H2, perhaps, just for fun
This commit is contained in:
RPRX authored and GitHub committed 2023-02-27 19:52:01 +00:00
1 parent 9401d65ef1
commit 55dc26f228
5 files changed
+17 -6

No files matched your search

+2 -2
View File
@@ -849,8 +849,8 @@ func (c *StreamConfig) Build() (*internet.StreamConfig, error) {
config.SecurityType = tm.Type
}
if strings.EqualFold(c.Security, "reality") {
if config.ProtocolName != "tcp" && config.ProtocolName != "http" && config.ProtocolName != "domainsocket" {
return nil, newError("REALITY only supports TCP, H2 and DomainSocket for now.")
if config.ProtocolName != "tcp" && config.ProtocolName != "http" && config.ProtocolName != "grpc" && config.ProtocolName != "domainsocket" {
return nil, newError("REALITY only supports TCP, H2, gRPC and DomainSocket for now.")
}
if c.REALITYSettings == nil {
return nil, newError(`REALITY: Empty "realitySettings".`)