code: func (k *Kite) registerToProxyKite(c *Client, kiteURL *url.URL) (*url.URL, error) {
  	err := c.Dial()
  	if err != nil {
  		k.Log.Error("Cannot connect to Proxy kite: %s", err.Error())
  		return nil, err
  	}
  
  	// Disconnect from Proxy Kite if error happens while registering.
  	defer func() {
  		if err != nil {
  			c.Close()
  		}
  	}()
  
  	// do not panic if we call Tell method below
  	if kiteURL == nil {
  		kiteURL = &url.URL{}
  	}
  
  	// this could be tunnelproxy or reverseproxy. Tunnelproxy doesn't need an
  	// URL however Reverseproxy needs one.
  	result, err := c.TellWithTimeout("register", k.Config.Timeout, kiteURL.String())
  	if err != nil {
  		k.Log.Error("Proxy register error: %s", err.Error())
  		return nil, err
  	}
  
  	proxyURL, err := result.String()
  	if err != nil {
  		k.Log.Error("Proxy register result error: %s", err.Error())
  		return nil, err
  	}
  
  	parsed, err := url.Parse(proxyURL)
  	if err != nil {
  		k.Log.Error("Cannot parse Proxy URL: %s", err.Error())
  		return nil, err
  	}
  
  	return parsed, nil
  }
docs: // registerToProxyKite dials the proxy kite and calls register method then
  // returns the reverse-proxy URL.