code: func (c *NodeClient) dynamicListenAndForward(ctx context.Context, ln net.Listener) {
  	defer ln.Close()
  	defer c.Close()
  
  	for {
  		// Accept connection from the client. Here the client is typically
  		// something like a web browser or other SOCKS5 aware application.
  		conn, err := ln.Accept()
  		if err != nil {
  			log.Errorf("Dynamic port forwarding (SOCKS5) failed: %v.", err)
  			break
  		}
  
  		// Perform the SOCKS5 handshake with the client to find out the remote
  		// address to proxy.
  		remoteAddr, err := socks.Handshake(conn)
  		if err != nil {
  			log.Errorf("SOCKS5 handshake failed: %v.", err)
  			break
  		}
  		log.Debugf("SOCKS5 proxy forwarding requests to %v.", remoteAddr)
  
  		// Proxy the connection to the remote address.
  		go func() {
  			err := c.proxyConnection(ctx, conn, remoteAddr)
  			if err != nil {
  				log.Warnf("Failed to proxy connection: %v.", err)
  			}
  		}()
  	}
  }
docs: // dynamicListenAndForward listens for connections, performs a SOCKS5
  // handshake, and then proxies the connection to the requested address.