mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
Add grpcSettings (alias of gunSettings)
This commit is contained in:
parent
971eddaa12
commit
3b7ed982fb
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user