My mirror of the Barnard terminal client for Mumble.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 9 година
пре 7 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
пре 9 година
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package main
  2. import (
  3. "crypto/tls"
  4. "flag"
  5. "fmt"
  6. "os"
  7. "layeh.com/barnard/uiterm"
  8. "layeh.com/gumble/gumble"
  9. _ "layeh.com/gumble/opus"
  10. )
  11. func main() {
  12. // Command line flags
  13. server := flag.String("server", "localhost:64738", "the server to connect to")
  14. username := flag.String("username", "", "the username of the client")
  15. password := flag.String("password", "", "the password of the server")
  16. insecure := flag.Bool("insecure", false, "skip server certificate verification")
  17. certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
  18. flag.Parse()
  19. // Initialize
  20. b := Barnard{
  21. Config: gumble.NewConfig(),
  22. Address: *server,
  23. }
  24. b.Config.Username = *username
  25. b.Config.Password = *password
  26. if *insecure {
  27. b.TLSConfig.InsecureSkipVerify = true
  28. }
  29. if *certificate != "" {
  30. cert, err := tls.LoadX509KeyPair(*certificate, *certificate)
  31. if err != nil {
  32. fmt.Fprintf(os.Stderr, "%s\n", err)
  33. os.Exit(1)
  34. }
  35. b.TLSConfig.Certificates = append(b.TLSConfig.Certificates, cert)
  36. }
  37. b.Ui = uiterm.New(&b)
  38. b.Ui.Run()
  39. }