Config.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using JetBrains.Annotations;
  2. using ReactiveUI;
  3. using STUN.Enums;
  4. using Volo.Abp.DependencyInjection;
  5. namespace NatTypeTester.Models
  6. {
  7. [UsedImplicitly]
  8. public record Config : ReactiveRecord, ISingletonDependency
  9. {
  10. private string _stunServer = @"stun.syncthing.net";
  11. public string StunServer
  12. {
  13. get => _stunServer;
  14. set => this.RaiseAndSetIfChanged(ref _stunServer, value);
  15. }
  16. private ProxyType _proxyType = ProxyType.Plain;
  17. public ProxyType ProxyType
  18. {
  19. get => _proxyType;
  20. set => this.RaiseAndSetIfChanged(ref _proxyType, value);
  21. }
  22. private string _proxyServer = @"127.0.0.1:1080";
  23. public string ProxyServer
  24. {
  25. get => _proxyServer;
  26. set => this.RaiseAndSetIfChanged(ref _proxyServer, value);
  27. }
  28. private string? _proxyUser;
  29. public string? ProxyUser
  30. {
  31. get => _proxyUser;
  32. set => this.RaiseAndSetIfChanged(ref _proxyUser, value);
  33. }
  34. private string? _proxyPassword;
  35. public string? ProxyPassword
  36. {
  37. get => _proxyPassword;
  38. set => this.RaiseAndSetIfChanged(ref _proxyPassword, value);
  39. }
  40. }
  41. }