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.

RoutingObject.cs 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Shadowsocks.Interop.V2Ray.Routing;
  2. using System.Collections.Generic;
  3. namespace Shadowsocks.Interop.V2Ray
  4. {
  5. public class RoutingObject
  6. {
  7. /// <summary>
  8. /// Gets or sets the domain strategy used for routing.
  9. /// Default value: AsIs.
  10. /// Available values: "AsIs" | "IPIfNonMatch" | "IPOnDemand"
  11. /// </summary>
  12. public string DomainStrategy { get; set; }
  13. /// <summary>
  14. /// Gets or sets the domain matcher used for routing.
  15. /// Default value: "" (binary search).
  16. /// Available values: "" | "hybrid"
  17. /// </summary>
  18. public string DomainMatcher { get; set; }
  19. /// <summary>
  20. /// Gets or sets the list of routing rules.
  21. /// </summary>
  22. public List<RuleObject> Rules { get; set; }
  23. /// <summary>
  24. /// Gets or sets the list of load balancers.
  25. /// </summary>
  26. public List<BalancerObject>? Balancers { get; set; }
  27. public RoutingObject()
  28. {
  29. DomainStrategy = "AsIs";
  30. DomainMatcher = "";
  31. Rules = new();
  32. }
  33. public static RoutingObject Default => new()
  34. {
  35. DomainStrategy = "IPOnDemand",
  36. DomainMatcher = "hybrid",
  37. };
  38. public static RoutingObject DefaultBalancers => new()
  39. {
  40. Balancers = new(),
  41. };
  42. }
  43. }