func ConnectPublicLXD(url string, args *ConnectionArgs) (ImageServer, error) {
	logger.Debugf("Connecting to a remote public LXD over HTTPs")
	return httpsLXD(url, args)
}
ConnectPublicLXD lets you connect to a remote public LXD daemon over HTTPs.

Unless the remote server is trusted by the system CA, the remote certificate must be provided (TLSServerCert).
package lxd
import (
	"net/http"
	"net/url"
	"os"
	"path/filepath"
	"github.com/lxc/lxd/shared/logger"
	"github.com/lxc/lxd/shared/simplestreams"
	"gopkg.in/macaroon-bakery.v2/httpbakery"
)
type ConnectionArgs struct {
	TLSServerCert string
	TLSClientCert string
	TLSClientKey string
	TLSCA string
	UserAgent string
	AuthType string
	AuthInteractor httpbakery.Interactor
	Proxy func(*http.Request) (*url.URL, error)
	HTTPClient *http.Client
	InsecureSkipVerify bool
	CookieJar http.CookieJar
	SkipGetServer bool
}
func ConnectLXD(url string, args *ConnectionArgs) (ContainerServer, error) {
	logger.Debugf("Connecting to a remote LXD over HTTPs")
	return httpsLXD(url, args)
}
func ConnectLXDUnix(path string, args *ConnectionArgs) (ContainerServer, error) {
	logger.Debugf("Connecting to a local LXD over a Unix socket")
	if args == nil {
		args = &ConnectionArgs{}
	}
	server := ProtocolLXD{
		httpHost:      "http://unix.socket",
		httpProtocol:  "unix",
		httpUserAgent: args.UserAgent,
	}
	if path == "" {
		path = os.Getenv("LXD_SOCKET")
		if path == "" {
			lxdDir := os.Getenv("LXD_DIR")
			if lxdDir == "" {
				lxdDir = "/var/lib/lxd"
			}
			path = filepath.Join(lxdDir, "unix.socket")
		}
	}
	httpClient, err := unixHTTPClient(args.HTTPClient, path)
	if err != nil {
		return nil, err
	}
	server.http = httpClient
	if !args.SkipGetServer {
		serverStatus, _, err := server.GetServer()
		if err != nil {
			return nil, err
		}
		server.httpCertificate = serverStatus.Environment.Certificate
	}
	return &server, nil
}