config.proto 2.1 KB

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