Hunter0x7c7
2022-08-11 a82f9cb69f63aaeba40c024960deda7d75b9fece
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
syntax = "proto3";
 
package v2ray.core.transport.internet;
option csharp_namespace = "V2Ray.Core.Transport.Internet";
option go_package = "github.com/v2fly/v2ray-core/v5/transport/internet";
option java_package = "com.v2ray.core.transport.internet";
option java_multiple_files = true;
 
import "google/protobuf/any.proto";
 
enum TransportProtocol {
  TCP = 0;
  UDP = 1;
  MKCP = 2;
  WebSocket = 3;
  HTTP = 4;
  DomainSocket = 5;
}
 
message TransportConfig {
  // Type of network that this settings supports.
  // Deprecated. Use the string form below.
  TransportProtocol protocol = 1 [ deprecated = true ];
 
  // Type of network that this settings supports.
  string protocol_name = 3;
 
  // Specific settings. Must be of the transports.
  google.protobuf.Any settings = 2;
}
 
message StreamConfig {
  // Effective network. Deprecated. Use the string form below.
  TransportProtocol protocol = 1 [ deprecated = true ];
 
  // Effective network.
  string protocol_name = 5;
 
  repeated TransportConfig transport_settings = 2;
 
  // Type of security. Must be a message name of the settings proto.
  string security_type = 3;
 
  // Settings for transport security. For now the only choice is TLS.
  repeated google.protobuf.Any security_settings = 4;
 
  SocketConfig socket_settings = 6;
}
 
message ProxyConfig {
  string tag = 1;
 
  bool transportLayerProxy = 2;
}
 
// SocketConfig is options to be applied on network sockets.
message SocketConfig {
  // Mark of the connection. If non-zero, the value will be set to SO_MARK.
  uint32 mark = 1;
 
  enum TCPFastOpenState {
    // AsIs is to leave the current TFO state as is, unmodified.
    AsIs = 0;
    // Enable is for enabling TFO explictly.
    Enable = 1;
    // Disable is for disabling TFO explictly.
    Disable = 2;
  }
 
  // TFO is the state of TFO settings.
  TCPFastOpenState tfo = 2;
 
  enum TProxyMode {
    // TProxy is off.
    Off = 0;
    // TProxy mode.
    TProxy = 1;
    // Redirect mode.
    Redirect = 2;
  }
 
  // TProxy is for enabling TProxy socket option.
  TProxyMode tproxy = 3;
 
  // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket
  // option. This option is for UDP only.
  bool receive_original_dest_address = 4;
 
  bytes bind_address = 5;
 
  uint32 bind_port = 6;
 
  bool accept_proxy_protocol = 7;
 
  int32 tcp_keep_alive_interval = 8;
 
  uint32 tfo_queue_length = 9;
 
  int32 tcp_keep_alive_idle = 10;
 
  string bind_to_device = 11;
 
  int64 rx_buf_size = 12;
  int64 tx_buf_size = 13;
  bool force_buf_size = 14;
}