config.proto 1.0 KB

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