TUN-6185: Fix tcpOverWSOriginService not using original scheme for String representation
This commit is contained in:
parent
99d4e48656
commit
fa2234d639
|
@ -109,6 +109,7 @@ func (o rawTCPService) MarshalJSON() ([]byte, error) {
|
|||
// tcpOverWSService models TCP origins serving eyeballs connecting over websocket, such as
|
||||
// cloudflared access commands.
|
||||
type tcpOverWSService struct {
|
||||
scheme string
|
||||
dest string
|
||||
isBastion bool
|
||||
streamHandler streamHandlerFunc
|
||||
|
@ -130,6 +131,7 @@ func newTCPOverWSService(url *url.URL) *tcpOverWSService {
|
|||
addPortIfMissing(url, 7864) // just a random port since there isn't a default in this case
|
||||
}
|
||||
return &tcpOverWSService{
|
||||
scheme: url.Scheme,
|
||||
dest: url.Host,
|
||||
}
|
||||
}
|
||||
|
@ -160,8 +162,13 @@ func (o *tcpOverWSService) String() string {
|
|||
if o.isBastion {
|
||||
return ServiceBastion
|
||||
}
|
||||
|
||||
if o.scheme != "" {
|
||||
return fmt.Sprintf("%s://%s", o.scheme, o.dest)
|
||||
} else {
|
||||
return o.dest
|
||||
}
|
||||
}
|
||||
|
||||
func (o *tcpOverWSService) start(log *zerolog.Logger, _ <-chan struct{}, cfg OriginRequestConfig) error {
|
||||
if cfg.ProxyType == socksProxy {
|
||||
|
|
Loading…
Reference in New Issue