github.com/xraypb/xray-core@v1.6.6/transport/internet/grpc/config.go (about)

     1  package grpc
     2  
     3  import (
     4  	"net/url"
     5  
     6  	"github.com/xraypb/xray-core/common"
     7  	"github.com/xraypb/xray-core/transport/internet"
     8  )
     9  
    10  const protocolName = "grpc"
    11  
    12  func init() {
    13  	common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
    14  		return new(Config)
    15  	}))
    16  }
    17  
    18  func (c *Config) getNormalizedName() string {
    19  	return url.PathEscape(c.ServiceName)
    20  }