func (d *DNSProxy) Start() error {
	d.Lock()
	defer d.Unlock()

	if d.dnsProxy != nil {
		return errors.New("DNS proxy is already started")
	}

	c, err := createConfig(d.Config)
	if err != nil {
		return fmt.Errorf("cannot start the DNS proxy: %s", err)
	}
	d.dnsProxy = &proxy.Proxy{Config: *c}

	// Start the proxy
	return d.dnsProxy.Start()
}
// Start starts the DNS proxy
Start starts the DNS proxy
// Start starts the DNS proxy
func (d *DNSProxy) Start() error {
	d.Lock()
	defer d.Unlock()
	if d.dnsProxy != nil {
		return errors.New("DNS proxy is already started")
	}
	c, err := createConfig(d.Config)
	if err != nil {
		return fmt.Errorf("cannot start the DNS proxy: %s", err)
	}
	d.dnsProxy = &proxy.Proxy{Config: *c}
	return d.dnsProxy.Start()
}
func ( d * DNSProxy ) Start ( ) error { d . Lock ( ) defer d . Unlock ( ) if d . dnsProxy != nil { return errors . New ( " " ) } c , err := createConfig ( d . Config ) if err != nil { return fmt . Errorf ( " " , err ) } d . dnsProxy = & proxy . Proxy { Config : * c } return d . dnsProxy . Start ( ) }
Start starts the DNS proxy
Start starts the DNS proxy
// Start the proxy