Config.cs 1.0 KB

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