1 package main // import "layeh.com/barnard/cmd/barnard"
10 "layeh.com/barnard/uiterm"
11 "layeh.com/gumble/gumble"
12 _ "layeh.com/gumble/opus"
17 server := flag.String("server", "localhost:64738", "the server to connect to")
18 username := flag.String("username", "", "the username of the client")
19 password := flag.String("password", "", "the password of the server")
20 insecure := flag.Bool("insecure", false, "skip server certificate verification")
21 certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
27 Config: gumble.NewConfig(),
31 b.Config.Username = *username
32 b.Config.Password = *password
35 b.TLSConfig.InsecureSkipVerify = true
37 if *certificate != "" {
38 cert, err := tls.LoadX509KeyPair(*certificate, *certificate)
40 fmt.Fprintf(os.Stderr, "%s\n", err)
43 b.TLSConfig.Certificates = append(b.TLSConfig.Certificates, cert)