config.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. syntax = "proto3";
  2. package v2ray.core.app.proxyman;
  3. option csharp_namespace = "V2Ray.Core.App.Proxyman";
  4. option go_package = "proxyman";
  5. option java_package = "com.v2ray.core.app.proxyman";
  6. option java_outer_classname = "ConfigProto";
  7. message InboundConfig {
  8. }
  9. import "v2ray.com/core/common/serial/typed_message.proto";
  10. import "v2ray.com/core/common/net/address.proto";
  11. import "v2ray.com/core/common/net/destination.proto";
  12. import "v2ray.com/core/common/net/port.proto";
  13. import "v2ray.com/core/transport/internet/config.proto";
  14. message AllocationStrategy {
  15. enum Type {
  16. // Always allocate all connection handlers.
  17. Always = 0;
  18. // Randomly allocate specific range of handlers.
  19. Random = 1;
  20. // External. Not supported yet.
  21. External = 2;
  22. }
  23. Type type = 1;
  24. message AllocationStrategyConcurrency {
  25. uint32 value = 1;
  26. }
  27. // Number of handlers (ports) running in parallel.
  28. // Default value is 3 if unset.
  29. AllocationStrategyConcurrency concurrency = 2;
  30. message AllocationStrategyRefresh {
  31. uint32 value = 1;
  32. }
  33. // Number of minutes before a handler is regenerated.
  34. // Default value is 5 if unset.
  35. AllocationStrategyRefresh refresh = 3;
  36. }
  37. message ReceiverConfig {
  38. v2ray.core.common.net.PortRange port_range = 1;
  39. v2ray.core.common.net.IPOrDomain listen = 2;
  40. AllocationStrategy allocation_strategy = 3;
  41. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  42. bool receive_original_destination = 5;
  43. bool allow_passive_connection = 6;
  44. }
  45. message InboundHandlerConfig {
  46. string tag = 1;
  47. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  48. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  49. }
  50. message OutboundConfig {
  51. }
  52. message SenderConfig {
  53. // Send traffic through the given IP. Only IP is allowed.
  54. v2ray.core.common.net.IPOrDomain via = 1;
  55. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  56. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  57. }
  58. message OutboundHandlerConfig {
  59. string tag = 1;
  60. v2ray.core.common.serial.TypedMessage sender_settings = 2;
  61. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  62. int64 expire = 4;
  63. string comment = 5;
  64. }
  65. message MultiplexingConfig {
  66. bool enabled = 1;
  67. }
  68. message DispatchConfig {
  69. MultiplexingConfig mux_settings = 1;
  70. }
  71. message SessionFrame {
  72. uint32 id = 1;
  73. v2ray.core.common.net.Endpoint target = 2;
  74. bytes payload = 3;
  75. }