Xray-core/transport/internet/httpupgrade/config.go

24 lines
401 B
Go
Raw Normal View History

2024-03-03 07:12:38 +02:00
package httpupgrade
2024-04-07 18:53:34 +03:00
import (
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/transport/internet"
)
2024-03-03 07:12:38 +02:00
func (c *Config) GetNormalizedPath() string {
path := c.Path
if path == "" {
return "/"
}
if path[0] != '/' {
return "/" + path
}
return path
}
2024-04-07 18:53:34 +03:00
func init() {
common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
return new(Config)
}))
}