config.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. syntax = "proto3";
  2. package v2ray.core.app.policy;
  3. option csharp_namespace = "V2Ray.Core.App.Policy";
  4. option go_package = "github.com/v2fly/v2ray-core/v5/app/policy";
  5. option java_package = "com.v2ray.core.app.policy";
  6. option java_multiple_files = true;
  7. import "common/protoext/extensions.proto";
  8. message Second {
  9. uint32 value = 1;
  10. }
  11. message Policy {
  12. // Timeout is a message for timeout settings in various stages, in seconds.
  13. message Timeout {
  14. Second handshake = 1;
  15. Second connection_idle = 2;
  16. Second uplink_only = 3;
  17. Second downlink_only = 4;
  18. }
  19. message Stats {
  20. bool user_uplink = 1;
  21. bool user_downlink = 2;
  22. }
  23. message Buffer {
  24. // Buffer size per connection, in bytes. -1 for unlimited buffer.
  25. int32 connection = 1;
  26. }
  27. Timeout timeout = 1;
  28. Stats stats = 2;
  29. Buffer buffer = 3;
  30. }
  31. message SystemPolicy {
  32. message Stats {
  33. bool inbound_uplink = 1;
  34. bool inbound_downlink = 2;
  35. bool outbound_uplink = 3;
  36. bool outbound_downlink = 4;
  37. }
  38. Stats stats = 1;
  39. }
  40. message Config {
  41. option (v2ray.core.common.protoext.message_opt).type = "service";
  42. option (v2ray.core.common.protoext.message_opt).short_name = "policy";
  43. map<uint32, Policy> level = 1;
  44. SystemPolicy system = 2;
  45. }