config.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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/v4/app/observatory";
  5. option java_package = "com.v2ray.core.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. }