config.proto 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. syntax = "proto3";
  2. package v2ray.core.app.proxyman;
  3. option csharp_namespace = "V2Ray.Core.App.Proxyman";
  4. option go_package = "v2ray.com/core/app/proxyman";
  5. option java_package = "com.v2ray.core.app.proxyman";
  6. option java_multiple_files = true;
  7. import "common/net/address.proto";
  8. import "common/net/port.proto";
  9. import "transport/internet/config.proto";
  10. import "common/serial/typed_message.proto";
  11. message InboundConfig {}
  12. message AllocationStrategy {
  13. enum Type {
  14. // Always allocate all connection handlers.
  15. Always = 0;
  16. // Randomly allocate specific range of handlers.
  17. Random = 1;
  18. // External. Not supported yet.
  19. External = 2;
  20. }
  21. Type type = 1;
  22. message AllocationStrategyConcurrency {
  23. uint32 value = 1;
  24. }
  25. // Number of handlers (ports) running in parallel.
  26. // Default value is 3 if unset.
  27. AllocationStrategyConcurrency concurrency = 2;
  28. message AllocationStrategyRefresh {
  29. uint32 value = 1;
  30. }
  31. // Number of minutes before a handler is regenerated.
  32. // Default value is 5 if unset.
  33. AllocationStrategyRefresh refresh = 3;
  34. }
  35. enum KnownProtocols {
  36. HTTP = 0;
  37. TLS = 1;
  38. }
  39. message SniffingConfig {
  40. // Whether or not to enable content sniffing on an inbound connection.
  41. bool enabled = 1;
  42. // Override target destination if sniff'ed protocol is in the given list.
  43. // Supported values are "http", "tls".
  44. repeated string destination_override = 2;
  45. }
  46. message ReceiverConfig {
  47. // PortRange specifies the ports which the Receiver should listen on.
  48. v2ray.core.common.net.PortRange port_range = 1;
  49. // Listen specifies the IP address that the Receiver should listen on.
  50. v2ray.core.common.net.IPOrDomain listen = 2;
  51. AllocationStrategy allocation_strategy = 3;
  52. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  53. bool receive_original_destination = 5;
  54. reserved 6;
  55. // Override domains for the given protocol.
  56. // Deprecated. Use sniffing_settings.
  57. repeated KnownProtocols domain_override = 7 [deprecated = true];
  58. SniffingConfig sniffing_settings = 8;
  59. }
  60. message InboundHandlerConfig {
  61. string tag = 1;
  62. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  63. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  64. }
  65. message OutboundConfig {}
  66. message SenderConfig {
  67. // Send traffic through the given IP. Only IP is allowed.
  68. v2ray.core.common.net.IPOrDomain via = 1;
  69. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  70. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  71. MultiplexingConfig multiplex_settings = 4;
  72. }
  73. message MultiplexingConfig {
  74. // Whether or not Mux is enabled.
  75. bool enabled = 1;
  76. // Max number of concurrent connections that one Mux connection can handle.
  77. uint32 concurrency = 2;
  78. }