config.proto 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. syntax = "proto3";
  2. package v2ray.core.transport.internet;
  3. option csharp_namespace = "V2Ray.Core.Transport.Internet";
  4. option go_package = "internet";
  5. option java_package = "com.v2ray.core.transport.internet";
  6. option java_multiple_files = true;
  7. import "v2ray.com/core/common/serial/typed_message.proto";
  8. enum TransportProtocol {
  9. TCP = 0;
  10. UDP = 1;
  11. MKCP = 2;
  12. WebSocket = 3;
  13. HTTP = 4;
  14. DomainSocket = 5;
  15. }
  16. message TransportConfig {
  17. // Type of network that this settings supports.
  18. // Deprecated. Use the string form below.
  19. TransportProtocol protocol = 1;
  20. // Type of network that this settings supports.
  21. string protocol_name = 3;
  22. // Specific settings. Must be of the transports.
  23. v2ray.core.common.serial.TypedMessage settings = 2;
  24. }
  25. message StreamConfig {
  26. // Effective network. Deprecated. Use the string form below.
  27. TransportProtocol protocol = 1 [deprecated = true];
  28. // Effective network.
  29. string protocol_name = 5;
  30. repeated TransportConfig transport_settings = 2;
  31. // Type of security. Must be a message name of the settings proto.
  32. string security_type = 3;
  33. // Settings for transport security. For now the only choice is TLS.
  34. repeated v2ray.core.common.serial.TypedMessage security_settings = 4;
  35. SocketConfig socket_settings = 6;
  36. }
  37. message ProxyConfig {
  38. string tag = 1;
  39. }
  40. // SocketConfig is options to be applied on network sockets.
  41. message SocketConfig {
  42. // Mark of the connection. If non-zero, the value will be set to SO_MARK.
  43. int32 mark = 1;
  44. enum TCPFastOpenState {
  45. // AsIs is to leave the current TFO state as is, unmodified.
  46. AsIs = 0;
  47. // Enable is for enabling TFO explictly.
  48. Enable = 1;
  49. // Disable is for disabling TFO explictly.
  50. Disable = 2;
  51. }
  52. // TFO is the state of TFO settings.
  53. TCPFastOpenState tfo = 2;
  54. enum TProxyMode {
  55. // TProxy is off.
  56. Off = 0;
  57. // TProxy mode.
  58. TProxy = 1;
  59. // Redirect mode.
  60. Redirect = 2;
  61. }
  62. // TProxy is for enabling TProxy socket option.
  63. TProxyMode tproxy = 3;
  64. // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket option.
  65. // This option is for UDP only.
  66. bool receive_original_dest_address = 4;
  67. }