serverEntry.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2014, Psiphon Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. package psiphon
  20. // ServerEntry represents a Psiphon server. It contains information
  21. // about how to estalish a tunnel connection to the server through
  22. // several protocols. ServerEntry are JSON records downloaded from
  23. // various sources.
  24. type ServerEntry struct {
  25. ipAddress string `json:"ipAddress"`
  26. webServerPort string `json:"webServerPort"` // not an int
  27. webServerSecret string `json:"webServerSecret"`
  28. webServerCertificate string `json:"webServerCertificate"`
  29. sshPort int `json:"sshPort"`
  30. sshUsername string `json:"sshUsername"`
  31. sshPassword string `json:"sshPassword"`
  32. sshHostKey string `json:"sshHostKey"`
  33. sshObfuscatedPort int `json:"sshObfuscatedPort"`
  34. sshObfuscatedKey string `json:"sshObfuscatedKey"`
  35. capabilities []string `json:"capabilities"`
  36. region string `json:"region"`
  37. meekServerPort int `json:"meekServerPort"`
  38. meekCookieEncryptionPublicKey string `json:"meekCookieEncryptionPublicKey"`
  39. meekObfuscatedKey string `json:"meekObfuscatedKey"`
  40. meekFrontingDomain string `json:"meekFrontingDomain"`
  41. meekFrontingHost string `json:"meekFrontingHost"`
  42. }