You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Server.cs 902 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.IO;
  5. using System.Diagnostics;
  6. using SimpleJson;
  7. using Shadowsocks.Controller;
  8. namespace Shadowsocks.Model
  9. {
  10. [Serializable]
  11. public class Server
  12. {
  13. public string server;
  14. public int server_port;
  15. public int local_port;
  16. public string password;
  17. public string method;
  18. public string remarks;
  19. public string FriendlyName()
  20. {
  21. if (string.IsNullOrEmpty(server))
  22. {
  23. return I18N.GetString("New server");
  24. }
  25. if (string.IsNullOrEmpty(remarks))
  26. {
  27. return server + ":" + server_port;
  28. }
  29. else
  30. {
  31. return remarks + " (" + server + ":" + server_port + ")";
  32. }
  33. }
  34. }
  35. }