diff --git a/infra/conf/transport.go b/infra/conf/transport.go index 321890a77..ffff9a5c2 100644 --- a/infra/conf/transport.go +++ b/infra/conf/transport.go @@ -14,6 +14,7 @@ type TransportConfig struct { DSConfig *DomainSocketConfig `json:"dsSettings"` QUICConfig *QUICConfig `json:"quicSettings"` GunConfig *GunConfig `json:"gunSettings"` + GRPCConfig *GunConfig `json:"grpcSettings"` } // Build implements Buildable. @@ -86,6 +87,9 @@ func (c *TransportConfig) Build() (*transport.Config, error) { }) } + if c.GunConfig == nil { + c.GunConfig = c.GRPCConfig + } if c.GunConfig != nil { gs, err := c.GunConfig.Build() if err != nil { diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 85baa9614..80e18b58f 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -336,9 +336,7 @@ func (p TransportProtocol) Build() (string, error) { return "domainsocket", nil case "quic": return "quic", nil - case "gun": - return "gun", nil - case "grpc": // gun alias + case "gun", "grpc": return "gun", nil default: return "", newError("Config: unknown transport protocol: ", p)