config.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. package internet
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import serial "v2ray.com/core/common/serial"
  6. // Reference imports to suppress errors if they are not otherwise used.
  7. var _ = proto.Marshal
  8. var _ = fmt.Errorf
  9. var _ = math.Inf
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the proto package it is being compiled against.
  12. // A compilation error at this line likely means your copy of the
  13. // proto package needs to be updated.
  14. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  15. type TransportProtocol int32
  16. const (
  17. TransportProtocol_TCP TransportProtocol = 0
  18. TransportProtocol_UDP TransportProtocol = 1
  19. TransportProtocol_MKCP TransportProtocol = 2
  20. TransportProtocol_WebSocket TransportProtocol = 3
  21. TransportProtocol_HTTP TransportProtocol = 4
  22. TransportProtocol_DomainSocket TransportProtocol = 5
  23. )
  24. var TransportProtocol_name = map[int32]string{
  25. 0: "TCP",
  26. 1: "UDP",
  27. 2: "MKCP",
  28. 3: "WebSocket",
  29. 4: "HTTP",
  30. 5: "DomainSocket",
  31. }
  32. var TransportProtocol_value = map[string]int32{
  33. "TCP": 0,
  34. "UDP": 1,
  35. "MKCP": 2,
  36. "WebSocket": 3,
  37. "HTTP": 4,
  38. "DomainSocket": 5,
  39. }
  40. func (x TransportProtocol) String() string {
  41. return proto.EnumName(TransportProtocol_name, int32(x))
  42. }
  43. func (TransportProtocol) EnumDescriptor() ([]byte, []int) {
  44. return fileDescriptor_91dbc815c3d97a05, []int{0}
  45. }
  46. type SocketConfig_TCPFastOpenState int32
  47. const (
  48. // AsIs is to leave the current TFO state as is, unmodified.
  49. SocketConfig_AsIs SocketConfig_TCPFastOpenState = 0
  50. // Enable is for enabling TFO explictly.
  51. SocketConfig_Enable SocketConfig_TCPFastOpenState = 1
  52. // Disable is for disabling TFO explictly.
  53. SocketConfig_Disable SocketConfig_TCPFastOpenState = 2
  54. )
  55. var SocketConfig_TCPFastOpenState_name = map[int32]string{
  56. 0: "AsIs",
  57. 1: "Enable",
  58. 2: "Disable",
  59. }
  60. var SocketConfig_TCPFastOpenState_value = map[string]int32{
  61. "AsIs": 0,
  62. "Enable": 1,
  63. "Disable": 2,
  64. }
  65. func (x SocketConfig_TCPFastOpenState) String() string {
  66. return proto.EnumName(SocketConfig_TCPFastOpenState_name, int32(x))
  67. }
  68. func (SocketConfig_TCPFastOpenState) EnumDescriptor() ([]byte, []int) {
  69. return fileDescriptor_91dbc815c3d97a05, []int{3, 0}
  70. }
  71. type TransportConfig struct {
  72. // Type of network that this settings supports.
  73. // Deprecated. Use the string form below.
  74. Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=v2ray.core.transport.internet.TransportProtocol" json:"protocol,omitempty"`
  75. // Type of network that this settings supports.
  76. ProtocolName string `protobuf:"bytes,3,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"`
  77. // Specific settings. Must be of the transports.
  78. Settings *serial.TypedMessage `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
  79. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  80. XXX_unrecognized []byte `json:"-"`
  81. XXX_sizecache int32 `json:"-"`
  82. }
  83. func (m *TransportConfig) Reset() { *m = TransportConfig{} }
  84. func (m *TransportConfig) String() string { return proto.CompactTextString(m) }
  85. func (*TransportConfig) ProtoMessage() {}
  86. func (*TransportConfig) Descriptor() ([]byte, []int) {
  87. return fileDescriptor_91dbc815c3d97a05, []int{0}
  88. }
  89. func (m *TransportConfig) XXX_Unmarshal(b []byte) error {
  90. return xxx_messageInfo_TransportConfig.Unmarshal(m, b)
  91. }
  92. func (m *TransportConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  93. return xxx_messageInfo_TransportConfig.Marshal(b, m, deterministic)
  94. }
  95. func (m *TransportConfig) XXX_Merge(src proto.Message) {
  96. xxx_messageInfo_TransportConfig.Merge(m, src)
  97. }
  98. func (m *TransportConfig) XXX_Size() int {
  99. return xxx_messageInfo_TransportConfig.Size(m)
  100. }
  101. func (m *TransportConfig) XXX_DiscardUnknown() {
  102. xxx_messageInfo_TransportConfig.DiscardUnknown(m)
  103. }
  104. var xxx_messageInfo_TransportConfig proto.InternalMessageInfo
  105. func (m *TransportConfig) GetProtocol() TransportProtocol {
  106. if m != nil {
  107. return m.Protocol
  108. }
  109. return TransportProtocol_TCP
  110. }
  111. func (m *TransportConfig) GetProtocolName() string {
  112. if m != nil {
  113. return m.ProtocolName
  114. }
  115. return ""
  116. }
  117. func (m *TransportConfig) GetSettings() *serial.TypedMessage {
  118. if m != nil {
  119. return m.Settings
  120. }
  121. return nil
  122. }
  123. type StreamConfig struct {
  124. // Effective network. Deprecated. Use the string form below.
  125. Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=v2ray.core.transport.internet.TransportProtocol" json:"protocol,omitempty"` // Deprecated: Do not use.
  126. // Effective network.
  127. ProtocolName string `protobuf:"bytes,5,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"`
  128. TransportSettings []*TransportConfig `protobuf:"bytes,2,rep,name=transport_settings,json=transportSettings,proto3" json:"transport_settings,omitempty"`
  129. // Type of security. Must be a message name of the settings proto.
  130. SecurityType string `protobuf:"bytes,3,opt,name=security_type,json=securityType,proto3" json:"security_type,omitempty"`
  131. // Settings for transport security. For now the only choice is TLS.
  132. SecuritySettings []*serial.TypedMessage `protobuf:"bytes,4,rep,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"`
  133. SocketSettings *SocketConfig `protobuf:"bytes,6,opt,name=socket_settings,json=socketSettings,proto3" json:"socket_settings,omitempty"`
  134. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  135. XXX_unrecognized []byte `json:"-"`
  136. XXX_sizecache int32 `json:"-"`
  137. }
  138. func (m *StreamConfig) Reset() { *m = StreamConfig{} }
  139. func (m *StreamConfig) String() string { return proto.CompactTextString(m) }
  140. func (*StreamConfig) ProtoMessage() {}
  141. func (*StreamConfig) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_91dbc815c3d97a05, []int{1}
  143. }
  144. func (m *StreamConfig) XXX_Unmarshal(b []byte) error {
  145. return xxx_messageInfo_StreamConfig.Unmarshal(m, b)
  146. }
  147. func (m *StreamConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. return xxx_messageInfo_StreamConfig.Marshal(b, m, deterministic)
  149. }
  150. func (m *StreamConfig) XXX_Merge(src proto.Message) {
  151. xxx_messageInfo_StreamConfig.Merge(m, src)
  152. }
  153. func (m *StreamConfig) XXX_Size() int {
  154. return xxx_messageInfo_StreamConfig.Size(m)
  155. }
  156. func (m *StreamConfig) XXX_DiscardUnknown() {
  157. xxx_messageInfo_StreamConfig.DiscardUnknown(m)
  158. }
  159. var xxx_messageInfo_StreamConfig proto.InternalMessageInfo
  160. // Deprecated: Do not use.
  161. func (m *StreamConfig) GetProtocol() TransportProtocol {
  162. if m != nil {
  163. return m.Protocol
  164. }
  165. return TransportProtocol_TCP
  166. }
  167. func (m *StreamConfig) GetProtocolName() string {
  168. if m != nil {
  169. return m.ProtocolName
  170. }
  171. return ""
  172. }
  173. func (m *StreamConfig) GetTransportSettings() []*TransportConfig {
  174. if m != nil {
  175. return m.TransportSettings
  176. }
  177. return nil
  178. }
  179. func (m *StreamConfig) GetSecurityType() string {
  180. if m != nil {
  181. return m.SecurityType
  182. }
  183. return ""
  184. }
  185. func (m *StreamConfig) GetSecuritySettings() []*serial.TypedMessage {
  186. if m != nil {
  187. return m.SecuritySettings
  188. }
  189. return nil
  190. }
  191. func (m *StreamConfig) GetSocketSettings() *SocketConfig {
  192. if m != nil {
  193. return m.SocketSettings
  194. }
  195. return nil
  196. }
  197. type ProxyConfig struct {
  198. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  199. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  200. XXX_unrecognized []byte `json:"-"`
  201. XXX_sizecache int32 `json:"-"`
  202. }
  203. func (m *ProxyConfig) Reset() { *m = ProxyConfig{} }
  204. func (m *ProxyConfig) String() string { return proto.CompactTextString(m) }
  205. func (*ProxyConfig) ProtoMessage() {}
  206. func (*ProxyConfig) Descriptor() ([]byte, []int) {
  207. return fileDescriptor_91dbc815c3d97a05, []int{2}
  208. }
  209. func (m *ProxyConfig) XXX_Unmarshal(b []byte) error {
  210. return xxx_messageInfo_ProxyConfig.Unmarshal(m, b)
  211. }
  212. func (m *ProxyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  213. return xxx_messageInfo_ProxyConfig.Marshal(b, m, deterministic)
  214. }
  215. func (m *ProxyConfig) XXX_Merge(src proto.Message) {
  216. xxx_messageInfo_ProxyConfig.Merge(m, src)
  217. }
  218. func (m *ProxyConfig) XXX_Size() int {
  219. return xxx_messageInfo_ProxyConfig.Size(m)
  220. }
  221. func (m *ProxyConfig) XXX_DiscardUnknown() {
  222. xxx_messageInfo_ProxyConfig.DiscardUnknown(m)
  223. }
  224. var xxx_messageInfo_ProxyConfig proto.InternalMessageInfo
  225. func (m *ProxyConfig) GetTag() string {
  226. if m != nil {
  227. return m.Tag
  228. }
  229. return ""
  230. }
  231. // SocketConfig is options to be applied on network sockets.
  232. type SocketConfig struct {
  233. // Mark of the connection. If non-zero, the value will be set to SO_MARK.
  234. Mark int32 `protobuf:"varint,1,opt,name=mark,proto3" json:"mark,omitempty"`
  235. // TFO is the state of TFO settings.
  236. Tfo SocketConfig_TCPFastOpenState `protobuf:"varint,2,opt,name=tfo,proto3,enum=v2ray.core.transport.internet.SocketConfig_TCPFastOpenState" json:"tfo,omitempty"`
  237. // TProxy is for enabling TProxy socket option.
  238. Tproxy bool `protobuf:"varint,3,opt,name=tproxy,proto3" json:"tproxy,omitempty"`
  239. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  240. XXX_unrecognized []byte `json:"-"`
  241. XXX_sizecache int32 `json:"-"`
  242. }
  243. func (m *SocketConfig) Reset() { *m = SocketConfig{} }
  244. func (m *SocketConfig) String() string { return proto.CompactTextString(m) }
  245. func (*SocketConfig) ProtoMessage() {}
  246. func (*SocketConfig) Descriptor() ([]byte, []int) {
  247. return fileDescriptor_91dbc815c3d97a05, []int{3}
  248. }
  249. func (m *SocketConfig) XXX_Unmarshal(b []byte) error {
  250. return xxx_messageInfo_SocketConfig.Unmarshal(m, b)
  251. }
  252. func (m *SocketConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  253. return xxx_messageInfo_SocketConfig.Marshal(b, m, deterministic)
  254. }
  255. func (m *SocketConfig) XXX_Merge(src proto.Message) {
  256. xxx_messageInfo_SocketConfig.Merge(m, src)
  257. }
  258. func (m *SocketConfig) XXX_Size() int {
  259. return xxx_messageInfo_SocketConfig.Size(m)
  260. }
  261. func (m *SocketConfig) XXX_DiscardUnknown() {
  262. xxx_messageInfo_SocketConfig.DiscardUnknown(m)
  263. }
  264. var xxx_messageInfo_SocketConfig proto.InternalMessageInfo
  265. func (m *SocketConfig) GetMark() int32 {
  266. if m != nil {
  267. return m.Mark
  268. }
  269. return 0
  270. }
  271. func (m *SocketConfig) GetTfo() SocketConfig_TCPFastOpenState {
  272. if m != nil {
  273. return m.Tfo
  274. }
  275. return SocketConfig_AsIs
  276. }
  277. func (m *SocketConfig) GetTproxy() bool {
  278. if m != nil {
  279. return m.Tproxy
  280. }
  281. return false
  282. }
  283. func init() {
  284. proto.RegisterType((*TransportConfig)(nil), "v2ray.core.transport.internet.TransportConfig")
  285. proto.RegisterType((*StreamConfig)(nil), "v2ray.core.transport.internet.StreamConfig")
  286. proto.RegisterType((*ProxyConfig)(nil), "v2ray.core.transport.internet.ProxyConfig")
  287. proto.RegisterType((*SocketConfig)(nil), "v2ray.core.transport.internet.SocketConfig")
  288. proto.RegisterEnum("v2ray.core.transport.internet.TransportProtocol", TransportProtocol_name, TransportProtocol_value)
  289. proto.RegisterEnum("v2ray.core.transport.internet.SocketConfig_TCPFastOpenState", SocketConfig_TCPFastOpenState_name, SocketConfig_TCPFastOpenState_value)
  290. }
  291. func init() {
  292. proto.RegisterFile("v2ray.com/core/transport/internet/config.proto", fileDescriptor_91dbc815c3d97a05)
  293. }
  294. var fileDescriptor_91dbc815c3d97a05 = []byte{
  295. // 533 bytes of a gzipped FileDescriptorProto
  296. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xd1, 0x6b, 0x13, 0x4f,
  297. 0x10, 0xc7, 0x7b, 0xb9, 0x24, 0x4d, 0x26, 0x69, 0xba, 0xd9, 0x87, 0x1f, 0xe1, 0x07, 0xc5, 0x18,
  298. 0x41, 0x82, 0xc2, 0x5e, 0x39, 0xf1, 0xcd, 0x17, 0x93, 0x28, 0x16, 0x6d, 0x7b, 0x5c, 0x4e, 0x85,
  299. 0x82, 0x84, 0xcd, 0xb9, 0x0d, 0x47, 0x73, 0xb7, 0x61, 0x77, 0x15, 0xf3, 0x2f, 0xf9, 0xec, 0x3f,
  300. 0xe0, 0x9b, 0x7f, 0x96, 0xec, 0xde, 0xed, 0x12, 0xaa, 0xc4, 0x8a, 0x6f, 0x73, 0x37, 0x33, 0xdf,
  301. 0xf9, 0x7e, 0x66, 0x16, 0xc8, 0xe7, 0x50, 0xd0, 0x2d, 0x49, 0x79, 0x1e, 0xa4, 0x5c, 0xb0, 0x40,
  302. 0x09, 0x5a, 0xc8, 0x0d, 0x17, 0x2a, 0xc8, 0x0a, 0xc5, 0x44, 0xc1, 0x54, 0x90, 0xf2, 0xe2, 0x3a,
  303. 0x5b, 0x91, 0x8d, 0xe0, 0x8a, 0xe3, 0x13, 0x5b, 0x2f, 0x18, 0x71, 0xb5, 0xc4, 0xd6, 0xfe, 0x7f,
  304. 0x7a, 0x4b, 0x2e, 0xe5, 0x79, 0xce, 0x8b, 0x40, 0x32, 0x91, 0xd1, 0x75, 0xa0, 0xb6, 0x1b, 0xf6,
  305. 0x71, 0x91, 0x33, 0x29, 0xe9, 0x8a, 0x95, 0x82, 0xa3, 0x1f, 0x1e, 0x1c, 0x27, 0x56, 0x68, 0x6a,
  306. 0x46, 0xe1, 0x37, 0xd0, 0x32, 0xc9, 0x94, 0xaf, 0x07, 0xde, 0xd0, 0x1b, 0xf7, 0xc2, 0x53, 0xb2,
  307. 0x77, 0x2e, 0x71, 0x0a, 0x51, 0xd5, 0x17, 0x3b, 0x05, 0xfc, 0x00, 0x8e, 0x6c, 0xbc, 0x28, 0x68,
  308. 0xce, 0x06, 0xfe, 0xd0, 0x1b, 0xb7, 0xe3, 0xae, 0xfd, 0x79, 0x41, 0x73, 0x86, 0x27, 0xd0, 0x92,
  309. 0x4c, 0xa9, 0xac, 0x58, 0xc9, 0x41, 0x6d, 0xe8, 0x8d, 0x3b, 0xe1, 0xc3, 0xdd, 0x91, 0x25, 0x07,
  310. 0x29, 0x39, 0x48, 0xa2, 0x39, 0xce, 0x4b, 0x8c, 0xd8, 0xf5, 0x8d, 0xbe, 0xf9, 0xd0, 0x9d, 0x2b,
  311. 0xc1, 0x68, 0x5e, 0x71, 0x44, 0xff, 0xce, 0x31, 0xa9, 0x0d, 0xbc, 0x7d, 0x2c, 0x8d, 0xdf, 0xb0,
  312. 0x7c, 0x00, 0xec, 0xa4, 0x17, 0x3b, 0x54, 0xfe, 0xb8, 0x13, 0x92, 0xbb, 0x1a, 0x28, 0x11, 0xe2,
  313. 0xbe, 0xab, 0x99, 0x57, 0x42, 0xda, 0x83, 0x64, 0xe9, 0x27, 0x91, 0xa9, 0xed, 0x42, 0x5f, 0xd4,
  314. 0xee, 0xd3, 0xfe, 0xd4, 0xdb, 0xc1, 0x73, 0xe8, 0xbb, 0x22, 0x67, 0xa1, 0x6e, 0x2c, 0xdc, 0x75,
  315. 0xb1, 0xc8, 0x0a, 0xb8, 0xc9, 0x09, 0x1c, 0x4b, 0x9e, 0xde, 0xb0, 0x1d, 0xaa, 0xa6, 0xb9, 0xd5,
  316. 0xe3, 0x3f, 0x50, 0xcd, 0x4d, 0x57, 0x85, 0xd4, 0x2b, 0x35, 0xac, 0xea, 0xe8, 0x1e, 0x74, 0x22,
  317. 0xc1, 0xbf, 0x6c, 0xab, 0xa3, 0x21, 0xf0, 0x15, 0x5d, 0x99, 0x7b, 0xb5, 0x63, 0x1d, 0x8e, 0xbe,
  318. 0x7b, 0xd0, 0xdd, 0x55, 0xc0, 0x18, 0xea, 0x39, 0x15, 0x37, 0xa6, 0xa6, 0x11, 0x9b, 0x18, 0x5f,
  319. 0x80, 0xaf, 0xae, 0xb9, 0x79, 0x3b, 0xbd, 0xf0, 0xd9, 0x5f, 0xf8, 0x21, 0xc9, 0x34, 0x7a, 0x49,
  320. 0xa5, 0xba, 0xdc, 0xb0, 0x62, 0xae, 0xa8, 0x62, 0xb1, 0x16, 0xc2, 0xff, 0x41, 0x53, 0x6d, 0xb4,
  321. 0x2d, 0xb3, 0xde, 0x56, 0x5c, 0x7d, 0x8d, 0x9e, 0x02, 0xba, 0xdd, 0x80, 0x5b, 0x50, 0x7f, 0x2e,
  322. 0xcf, 0x24, 0x3a, 0xc0, 0x00, 0xcd, 0x17, 0x05, 0x5d, 0xae, 0x19, 0xf2, 0x70, 0x07, 0x0e, 0x67,
  323. 0x99, 0x34, 0x1f, 0xb5, 0x47, 0x57, 0xd0, 0xff, 0xe5, 0x6d, 0xe1, 0x43, 0xf0, 0x93, 0x69, 0x84,
  324. 0x0e, 0x74, 0xf0, 0x76, 0x16, 0x21, 0x4f, 0x2b, 0x9d, 0xbf, 0x9e, 0x46, 0xa8, 0x86, 0x8f, 0xa0,
  325. 0xfd, 0x9e, 0x2d, 0x4b, 0xa3, 0xc8, 0xd7, 0x89, 0x57, 0x49, 0x12, 0xa1, 0x3a, 0x46, 0xd0, 0x9d,
  326. 0xf1, 0x9c, 0x66, 0x45, 0x95, 0x6b, 0x4c, 0x2e, 0xe1, 0x7e, 0xca, 0xf3, 0xfd, 0xc8, 0x91, 0x77,
  327. 0xd5, 0xb2, 0xf1, 0xd7, 0xda, 0xc9, 0xbb, 0x30, 0xa6, 0x5b, 0x32, 0xd5, 0xb5, 0xce, 0x16, 0x39,
  328. 0xab, 0xf2, 0xcb, 0xa6, 0x79, 0xce, 0x4f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x1d, 0xbb,
  329. 0xfd, 0x9d, 0x04, 0x00, 0x00,
  330. }