@@ -472,67 +472,6 @@ func (c *Client) GetHandshakeTimeout() time.Duration {
472472
473473// GetWsDialer builds the WebSocket dialer options for SOCKS over WS.
474474//
475- // GetWsDialer creates coder/websocket.DialOptions configured from WebSocketConfig,
476- // GetDialer, and GetTLSConfig. Returns nil if WebSocketURL is empty.
477- //
478- // # Configuration
479- //
480- // The dialer is configured with:
481- // - HTTPClient: Uses custom Dialer via Transport for TCP connections
482- // - Subprotocols: From WebSocketConfig
483- // - CompressionMode: From WebSocketConfig.EnableCompression
484- // - HTTPHeader: From WebSocketConfig.RequestHeader
485- //
486- // # Returns
487- //
488- // *websocket.DialOptions for WebSocket connections, or nil if WebSocketURL is empty.
489- //
490- // # See Also
491- //
492- // - WebSocketConfig: WebSocket configuration options
493- // - github.com/coder/websocket: Underlying WebSocket library
494- func (c * Client ) GetWsDialer () * websocket.DialOptions {
495- if c .WebSocketURL == "" {
496- return nil
497- }
498-
499- httpClient := & http.Client {
500- Jar : c .WebSocketConfig .jar (),
501- }
502- tlsConfig := c .GetTLSConfig ()
503-
504- if tlsConfig != nil || c .Dialer != nil {
505- transport := & http.Transport {}
506- if c .Dialer != nil {
507- transport .DialContext = c .Dialer
508- }
509- if tlsConfig != nil {
510- transport .TLSClientConfig = tlsConfig
511- }
512- httpClient .Transport = transport
513- }
514-
515- // Configure compression
516- compressionMode := websocket .CompressionDisabled
517- var httpHeader http.Header
518- var subprotocols []string
519-
520- if c .WebSocketConfig != nil {
521- if c .WebSocketConfig .enableCompression () {
522- compressionMode = websocket .CompressionContextTakeover
523- }
524- httpHeader = c .WebSocketConfig .RequestHeader
525- subprotocols = c .WebSocketConfig .subprotocols ()
526- }
527-
528- return & websocket.DialOptions {
529- HTTPClient : httpClient ,
530- HTTPHeader : httpHeader ,
531- Subprotocols : subprotocols ,
532- CompressionMode : compressionMode ,
533- }
534- }
535-
536475// connectWebSocket establishes a WebSocket connection to the proxy.
537476//
538477// connectWebSocket dials the WebSocket URL and wraps the connection
0 commit comments