config.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. syntax = "proto3";
  2. package xray.core.app.observatory;
  3. option csharp_namespace = "Xray.App.Observatory";
  4. option go_package = "github.com/xtls/xray-core/app/observatory";
  5. option java_package = "com.xray.app.observatory";
  6. option java_multiple_files = true;
  7. message ObservationResult {
  8. repeated OutboundStatus status = 1;
  9. }
  10. message HealthPingMeasurementResult {
  11. int64 all = 1;
  12. int64 fail = 2;
  13. int64 deviation = 3;
  14. int64 average = 4;
  15. int64 max = 5;
  16. int64 min = 6;
  17. }
  18. message OutboundStatus{
  19. /* @Document Whether this outbound is usable
  20. @Restriction ReadOnlyForUser
  21. */
  22. bool alive = 1;
  23. /* @Document The time for probe request to finish.
  24. @Type time.ms
  25. @Restriction ReadOnlyForUser
  26. */
  27. int64 delay = 2;
  28. /* @Document The last error caused this outbound failed to relay probe request
  29. @Restriction NotMachineReadable
  30. */
  31. string last_error_reason = 3;
  32. /* @Document The outbound tag for this Server
  33. @Type id.outboundTag
  34. */
  35. string outbound_tag = 4;
  36. /* @Document The time this outbound is known to be alive
  37. @Type id.outboundTag
  38. */
  39. int64 last_seen_time = 5;
  40. /* @Document The time this outbound is tried
  41. @Type id.outboundTag
  42. */
  43. int64 last_try_time = 6;
  44. HealthPingMeasurementResult health_ping = 7;
  45. }
  46. message ProbeResult{
  47. /* @Document Whether this outbound is usable
  48. @Restriction ReadOnlyForUser
  49. */
  50. bool alive = 1;
  51. /* @Document The time for probe request to finish.
  52. @Type time.ms
  53. @Restriction ReadOnlyForUser
  54. */
  55. int64 delay = 2;
  56. /* @Document The error caused this outbound failed to relay probe request
  57. @Restriction NotMachineReadable
  58. */
  59. string last_error_reason = 3;
  60. }
  61. message Intensity{
  62. /* @Document The time interval for a probe request in ms.
  63. @Type time.ms
  64. */
  65. uint32 probe_interval = 1;
  66. }
  67. message Config {
  68. /* @Document The selectors for outbound under observation
  69. */
  70. repeated string subject_selector = 2;
  71. string probe_url = 3;
  72. int64 probe_interval = 4;
  73. bool enable_concurrency = 5;
  74. }