2021-03-14 15:02:07 +00:00
|
|
|
package grpc
|
|
|
|
|
|
|
|
import (
|
2021-06-27 08:41:19 +00:00
|
|
|
"net/url"
|
|
|
|
|
2021-03-14 15:02:07 +00:00
|
|
|
"github.com/xtls/xray-core/common"
|
|
|
|
"github.com/xtls/xray-core/transport/internet"
|
|
|
|
)
|
|
|
|
|
|
|
|
const protocolName = "grpc"
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
|
|
|
|
return new(Config)
|
|
|
|
}))
|
|
|
|
}
|
2021-06-27 08:41:19 +00:00
|
|
|
|
|
|
|
func (c *Config) getNormalizedName() string {
|
|
|
|
return url.PathEscape(c.ServiceName)
|
|
|
|
}
|