config.proto 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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/port.proto";
  12. import "v2ray.com/core/transport/internet/config.proto";
  13. message AllocationStrategy {
  14. enum Type {
  15. // Always allocate all connection handlers.
  16. Always = 0;
  17. // Randomly allocate specific range of handlers.
  18. Random = 1;
  19. // External. Not supported yet.
  20. External = 2;
  21. }
  22. Type type = 1;
  23. message AllocationStrategyConcurrency {
  24. uint32 value = 1;
  25. }
  26. // Number of handlers (ports) running in parallel.
  27. // Default value is 3 if unset.
  28. AllocationStrategyConcurrency concurrency = 2;
  29. message AllocationStrategyRefresh {
  30. uint32 value = 1;
  31. }
  32. // Number of minutes before a handler is regenerated.
  33. // Default value is 5 if unset.
  34. AllocationStrategyRefresh refresh = 3;
  35. }
  36. message StreamReceiverConfig {
  37. v2ray.core.common.net.PortRange port_range = 1;
  38. v2ray.core.common.net.IPOrDomain listen = 2;
  39. AllocationStrategy allocation_strategy = 3;
  40. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  41. }
  42. message DatagramReceiverConfig {
  43. v2ray.core.common.net.PortRange port_range = 1;
  44. v2ray.core.common.net.IPOrDomain listen = 2;
  45. AllocationStrategy allocation_strategy = 3;
  46. }
  47. message InboundHandlerConfig {
  48. string tag = 1;
  49. repeated v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  50. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  51. }
  52. message OutboundConfig {
  53. }
  54. message StreamSenderConfig {
  55. // Send traffic through the given IP. Only IP is allowed.
  56. v2ray.core.common.net.IPOrDomain via = 1;
  57. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  58. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  59. }
  60. message DatagramSenderConfig {
  61. // Send traffic through the given IP. Only IP is allowed.
  62. v2ray.core.common.net.IPOrDomain via = 1;
  63. v2ray.core.transport.internet.ProxyConfig proxy_settings = 2;
  64. }
  65. message OutboundHandlerConfig {
  66. string tag = 1;
  67. repeated v2ray.core.common.serial.TypedMessage sender_settings = 2;
  68. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  69. }