config.pb.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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_config_6493eeef2ca10012, []int{0}
  45. }
  46. type TransportConfig struct {
  47. // Type of network that this settings supports.
  48. Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,enum=v2ray.core.transport.internet.TransportProtocol" json:"protocol,omitempty"`
  49. // Specific settings. Must be of the transports.
  50. Settings *serial.TypedMessage `protobuf:"bytes,2,opt,name=settings" json:"settings,omitempty"`
  51. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  52. XXX_unrecognized []byte `json:"-"`
  53. XXX_sizecache int32 `json:"-"`
  54. }
  55. func (m *TransportConfig) Reset() { *m = TransportConfig{} }
  56. func (m *TransportConfig) String() string { return proto.CompactTextString(m) }
  57. func (*TransportConfig) ProtoMessage() {}
  58. func (*TransportConfig) Descriptor() ([]byte, []int) {
  59. return fileDescriptor_config_6493eeef2ca10012, []int{0}
  60. }
  61. func (m *TransportConfig) XXX_Unmarshal(b []byte) error {
  62. return xxx_messageInfo_TransportConfig.Unmarshal(m, b)
  63. }
  64. func (m *TransportConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  65. return xxx_messageInfo_TransportConfig.Marshal(b, m, deterministic)
  66. }
  67. func (dst *TransportConfig) XXX_Merge(src proto.Message) {
  68. xxx_messageInfo_TransportConfig.Merge(dst, src)
  69. }
  70. func (m *TransportConfig) XXX_Size() int {
  71. return xxx_messageInfo_TransportConfig.Size(m)
  72. }
  73. func (m *TransportConfig) XXX_DiscardUnknown() {
  74. xxx_messageInfo_TransportConfig.DiscardUnknown(m)
  75. }
  76. var xxx_messageInfo_TransportConfig proto.InternalMessageInfo
  77. func (m *TransportConfig) GetProtocol() TransportProtocol {
  78. if m != nil {
  79. return m.Protocol
  80. }
  81. return TransportProtocol_TCP
  82. }
  83. func (m *TransportConfig) GetSettings() *serial.TypedMessage {
  84. if m != nil {
  85. return m.Settings
  86. }
  87. return nil
  88. }
  89. type StreamConfig struct {
  90. // Effective network.
  91. Protocol TransportProtocol `protobuf:"varint,1,opt,name=protocol,enum=v2ray.core.transport.internet.TransportProtocol" json:"protocol,omitempty"`
  92. TransportSettings []*TransportConfig `protobuf:"bytes,2,rep,name=transport_settings,json=transportSettings" json:"transport_settings,omitempty"`
  93. // Type of security. Must be a message name of the settings proto.
  94. SecurityType string `protobuf:"bytes,3,opt,name=security_type,json=securityType" json:"security_type,omitempty"`
  95. // Settings for transport security. For now the only choice is TLS.
  96. SecuritySettings []*serial.TypedMessage `protobuf:"bytes,4,rep,name=security_settings,json=securitySettings" json:"security_settings,omitempty"`
  97. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  98. XXX_unrecognized []byte `json:"-"`
  99. XXX_sizecache int32 `json:"-"`
  100. }
  101. func (m *StreamConfig) Reset() { *m = StreamConfig{} }
  102. func (m *StreamConfig) String() string { return proto.CompactTextString(m) }
  103. func (*StreamConfig) ProtoMessage() {}
  104. func (*StreamConfig) Descriptor() ([]byte, []int) {
  105. return fileDescriptor_config_6493eeef2ca10012, []int{1}
  106. }
  107. func (m *StreamConfig) XXX_Unmarshal(b []byte) error {
  108. return xxx_messageInfo_StreamConfig.Unmarshal(m, b)
  109. }
  110. func (m *StreamConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  111. return xxx_messageInfo_StreamConfig.Marshal(b, m, deterministic)
  112. }
  113. func (dst *StreamConfig) XXX_Merge(src proto.Message) {
  114. xxx_messageInfo_StreamConfig.Merge(dst, src)
  115. }
  116. func (m *StreamConfig) XXX_Size() int {
  117. return xxx_messageInfo_StreamConfig.Size(m)
  118. }
  119. func (m *StreamConfig) XXX_DiscardUnknown() {
  120. xxx_messageInfo_StreamConfig.DiscardUnknown(m)
  121. }
  122. var xxx_messageInfo_StreamConfig proto.InternalMessageInfo
  123. func (m *StreamConfig) GetProtocol() TransportProtocol {
  124. if m != nil {
  125. return m.Protocol
  126. }
  127. return TransportProtocol_TCP
  128. }
  129. func (m *StreamConfig) GetTransportSettings() []*TransportConfig {
  130. if m != nil {
  131. return m.TransportSettings
  132. }
  133. return nil
  134. }
  135. func (m *StreamConfig) GetSecurityType() string {
  136. if m != nil {
  137. return m.SecurityType
  138. }
  139. return ""
  140. }
  141. func (m *StreamConfig) GetSecuritySettings() []*serial.TypedMessage {
  142. if m != nil {
  143. return m.SecuritySettings
  144. }
  145. return nil
  146. }
  147. type ProxyConfig struct {
  148. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  149. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  150. XXX_unrecognized []byte `json:"-"`
  151. XXX_sizecache int32 `json:"-"`
  152. }
  153. func (m *ProxyConfig) Reset() { *m = ProxyConfig{} }
  154. func (m *ProxyConfig) String() string { return proto.CompactTextString(m) }
  155. func (*ProxyConfig) ProtoMessage() {}
  156. func (*ProxyConfig) Descriptor() ([]byte, []int) {
  157. return fileDescriptor_config_6493eeef2ca10012, []int{2}
  158. }
  159. func (m *ProxyConfig) XXX_Unmarshal(b []byte) error {
  160. return xxx_messageInfo_ProxyConfig.Unmarshal(m, b)
  161. }
  162. func (m *ProxyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  163. return xxx_messageInfo_ProxyConfig.Marshal(b, m, deterministic)
  164. }
  165. func (dst *ProxyConfig) XXX_Merge(src proto.Message) {
  166. xxx_messageInfo_ProxyConfig.Merge(dst, src)
  167. }
  168. func (m *ProxyConfig) XXX_Size() int {
  169. return xxx_messageInfo_ProxyConfig.Size(m)
  170. }
  171. func (m *ProxyConfig) XXX_DiscardUnknown() {
  172. xxx_messageInfo_ProxyConfig.DiscardUnknown(m)
  173. }
  174. var xxx_messageInfo_ProxyConfig proto.InternalMessageInfo
  175. func (m *ProxyConfig) GetTag() string {
  176. if m != nil {
  177. return m.Tag
  178. }
  179. return ""
  180. }
  181. func init() {
  182. proto.RegisterType((*TransportConfig)(nil), "v2ray.core.transport.internet.TransportConfig")
  183. proto.RegisterType((*StreamConfig)(nil), "v2ray.core.transport.internet.StreamConfig")
  184. proto.RegisterType((*ProxyConfig)(nil), "v2ray.core.transport.internet.ProxyConfig")
  185. proto.RegisterEnum("v2ray.core.transport.internet.TransportProtocol", TransportProtocol_name, TransportProtocol_value)
  186. }
  187. func init() {
  188. proto.RegisterFile("v2ray.com/core/transport/internet/config.proto", fileDescriptor_config_6493eeef2ca10012)
  189. }
  190. var fileDescriptor_config_6493eeef2ca10012 = []byte{
  191. // 393 bytes of a gzipped FileDescriptorProto
  192. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x91, 0xcf, 0x6a, 0xdb, 0x40,
  193. 0x10, 0x87, 0x2b, 0xc9, 0x6d, 0xe5, 0xb1, 0xdd, 0xae, 0xf7, 0x64, 0x0a, 0xa6, 0xae, 0x0b, 0x45,
  194. 0xf4, 0xb0, 0x32, 0xea, 0x1b, 0x58, 0x3e, 0xb4, 0xb4, 0xa6, 0x42, 0x52, 0x5b, 0x30, 0x14, 0xb3,
  195. 0xde, 0x6c, 0x84, 0x88, 0xa5, 0x35, 0xab, 0x4d, 0x88, 0x9e, 0x27, 0xb7, 0xdc, 0xf3, 0x7e, 0x41,
  196. 0xff, 0x16, 0x93, 0x80, 0xf1, 0x25, 0xb7, 0x41, 0xf3, 0x9b, 0x6f, 0x3e, 0xcd, 0x02, 0xb9, 0xf1,
  197. 0x24, 0x2d, 0x09, 0x13, 0x99, 0xcb, 0x84, 0xe4, 0xae, 0x92, 0x34, 0x2f, 0x0e, 0x42, 0x2a, 0x37,
  198. 0xcd, 0x15, 0x97, 0x39, 0x57, 0x2e, 0x13, 0xf9, 0x65, 0x9a, 0x90, 0x83, 0x14, 0x4a, 0xe0, 0x69,
  199. 0x97, 0x97, 0x9c, 0xe8, 0x2c, 0xe9, 0xb2, 0x1f, 0x16, 0x4f, 0x70, 0x4c, 0x64, 0x99, 0xc8, 0xdd,
  200. 0x82, 0xcb, 0x94, 0xee, 0x5d, 0x55, 0x1e, 0xf8, 0xc5, 0x36, 0xe3, 0x45, 0x41, 0x13, 0xde, 0x00,
  201. 0xe7, 0x77, 0x06, 0xbc, 0x8f, 0x3b, 0x90, 0x5f, 0xaf, 0xc2, 0xbf, 0xc0, 0xae, 0x9b, 0x4c, 0xec,
  202. 0x27, 0xc6, 0xcc, 0x70, 0xde, 0x79, 0x0b, 0x72, 0x72, 0x2f, 0xd1, 0x84, 0xa0, 0x9d, 0x0b, 0x35,
  203. 0x01, 0x2f, 0xc1, 0x2e, 0xb8, 0x52, 0x69, 0x9e, 0x14, 0x13, 0x73, 0x66, 0x38, 0x03, 0xef, 0xcb,
  204. 0x31, 0xad, 0x51, 0x24, 0x8d, 0x22, 0x89, 0x2b, 0xc5, 0x75, 0x63, 0x18, 0xea, 0xb9, 0xf9, 0x83,
  205. 0x09, 0xc3, 0x48, 0x49, 0x4e, 0xb3, 0x17, 0x51, 0xfc, 0x0f, 0x58, 0x4f, 0x6c, 0x8f, 0x64, 0x2d,
  206. 0x67, 0xe0, 0x91, 0x73, 0xb9, 0x8d, 0x59, 0x38, 0xd6, 0x99, 0xa8, 0x05, 0xe1, 0xcf, 0x30, 0x2a,
  207. 0x38, 0xbb, 0x96, 0xa9, 0x2a, 0xb7, 0xd5, 0x1b, 0x4c, 0xac, 0x99, 0xe1, 0xf4, 0xc3, 0x61, 0xf7,
  208. 0xb1, 0xfa, 0x69, 0x1c, 0xc1, 0x58, 0x87, 0xb4, 0x42, 0xaf, 0x56, 0x38, 0xf7, 0x5e, 0xa8, 0x03,
  209. 0x74, 0x9b, 0xe7, 0x1f, 0x61, 0x10, 0x48, 0x71, 0x5b, 0xb6, 0x57, 0x43, 0x60, 0x29, 0x9a, 0xd4,
  210. 0x07, 0xeb, 0x87, 0x55, 0xf9, 0x75, 0x03, 0xe3, 0x67, 0x87, 0xc1, 0x6f, 0xc1, 0x8a, 0xfd, 0x00,
  211. 0xbd, 0xaa, 0x8a, 0x3f, 0xab, 0x00, 0x19, 0xd8, 0x86, 0xde, 0xfa, 0xa7, 0x1f, 0x20, 0x13, 0x8f,
  212. 0xa0, 0xff, 0x8f, 0xef, 0x22, 0xc1, 0xae, 0xb8, 0x42, 0x56, 0xd5, 0xf8, 0x1e, 0xc7, 0x01, 0xea,
  213. 0x61, 0x04, 0xc3, 0x95, 0xc8, 0x68, 0x9a, 0xb7, 0xbd, 0xd7, 0xcb, 0xdf, 0xf0, 0x89, 0x89, 0xec,
  214. 0xf4, 0xf9, 0x02, 0x63, 0x63, 0x77, 0xf5, 0xbd, 0x39, 0xfd, 0xeb, 0x85, 0xb4, 0x24, 0x7e, 0x95,
  215. 0xd5, 0x5a, 0xe4, 0x47, 0xdb, 0xdf, 0xbd, 0xa9, 0x1f, 0xec, 0xdb, 0x63, 0x00, 0x00, 0x00, 0xff,
  216. 0xff, 0xa2, 0xdf, 0xde, 0xa4, 0x35, 0x03, 0x00, 0x00,
  217. }