Darien Raymond 8 anos atrás
pai
commit
cfcf16feed

+ 1 - 1
transport/internet/websocket/dialer.go

@@ -82,7 +82,7 @@ func wsDial(ctx context.Context, dest v2net.Destination) (net.Conn, error) {
 		if resp != nil {
 			reason = resp.Status
 		}
-		return nil, errors.Base(err).Format("WebSocket|Dialer: Failed to dial to (", uri, "): ", reason)
+		return nil, errors.Base(err).Message("WebSocket|Dialer: Failed to dial to (", uri, "): ", reason)
 	}
 
 	return &wsconn{

+ 2 - 3
transport/internet/websocket/hub.go

@@ -74,8 +74,7 @@ func ListenWS(address v2net.Address, port v2net.Port, options internet.ListenOpt
 	if options.Stream != nil && options.Stream.HasSecuritySettings() {
 		securitySettings, err := options.Stream.GetEffectiveSecuritySettings()
 		if err != nil {
-			log.Error("WebSocket: Failed to create apply TLS config: ", err)
-			return nil, err
+			return nil, errors.Base(err).Message("WebSocket: Failed to create apply TLS config.")
 		}
 		tlsConfig, ok := securitySettings.(*v2tls.Config)
 		if ok {
@@ -108,7 +107,7 @@ func (ln *Listener) listenws(address v2net.Address, port v2net.Port) error {
 
 	go func() {
 		http.Serve(listener, &requestHandler{
-			path:  "/" + ln.config.GetNormailzedPath(),
+			path:  ln.config.GetNormailzedPath(),
 			conns: ln.awaitingConns,
 		})
 	}()