config.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.26.0
  4. // protoc v3.15.6
  5. // source: transport/internet/tls/config.proto
  6. package tls
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. )
  13. const (
  14. // Verify that this generated code is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  16. // Verify that runtime/protoimpl is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  18. )
  19. type Certificate_Usage int32
  20. const (
  21. Certificate_ENCIPHERMENT Certificate_Usage = 0
  22. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  23. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  24. )
  25. // Enum value maps for Certificate_Usage.
  26. var (
  27. Certificate_Usage_name = map[int32]string{
  28. 0: "ENCIPHERMENT",
  29. 1: "AUTHORITY_VERIFY",
  30. 2: "AUTHORITY_ISSUE",
  31. }
  32. Certificate_Usage_value = map[string]int32{
  33. "ENCIPHERMENT": 0,
  34. "AUTHORITY_VERIFY": 1,
  35. "AUTHORITY_ISSUE": 2,
  36. }
  37. )
  38. func (x Certificate_Usage) Enum() *Certificate_Usage {
  39. p := new(Certificate_Usage)
  40. *p = x
  41. return p
  42. }
  43. func (x Certificate_Usage) String() string {
  44. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  45. }
  46. func (Certificate_Usage) Descriptor() protoreflect.EnumDescriptor {
  47. return file_transport_internet_tls_config_proto_enumTypes[0].Descriptor()
  48. }
  49. func (Certificate_Usage) Type() protoreflect.EnumType {
  50. return &file_transport_internet_tls_config_proto_enumTypes[0]
  51. }
  52. func (x Certificate_Usage) Number() protoreflect.EnumNumber {
  53. return protoreflect.EnumNumber(x)
  54. }
  55. // Deprecated: Use Certificate_Usage.Descriptor instead.
  56. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) {
  57. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0, 0}
  58. }
  59. type Certificate struct {
  60. state protoimpl.MessageState
  61. sizeCache protoimpl.SizeCache
  62. unknownFields protoimpl.UnknownFields
  63. // TLS certificate in x509 format.
  64. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  65. // TLS key in x509 format.
  66. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  67. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,proto3,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  68. }
  69. func (x *Certificate) Reset() {
  70. *x = Certificate{}
  71. if protoimpl.UnsafeEnabled {
  72. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  73. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  74. ms.StoreMessageInfo(mi)
  75. }
  76. }
  77. func (x *Certificate) String() string {
  78. return protoimpl.X.MessageStringOf(x)
  79. }
  80. func (*Certificate) ProtoMessage() {}
  81. func (x *Certificate) ProtoReflect() protoreflect.Message {
  82. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  83. if protoimpl.UnsafeEnabled && x != nil {
  84. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  85. if ms.LoadMessageInfo() == nil {
  86. ms.StoreMessageInfo(mi)
  87. }
  88. return ms
  89. }
  90. return mi.MessageOf(x)
  91. }
  92. // Deprecated: Use Certificate.ProtoReflect.Descriptor instead.
  93. func (*Certificate) Descriptor() ([]byte, []int) {
  94. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0}
  95. }
  96. func (x *Certificate) GetCertificate() []byte {
  97. if x != nil {
  98. return x.Certificate
  99. }
  100. return nil
  101. }
  102. func (x *Certificate) GetKey() []byte {
  103. if x != nil {
  104. return x.Key
  105. }
  106. return nil
  107. }
  108. func (x *Certificate) GetUsage() Certificate_Usage {
  109. if x != nil {
  110. return x.Usage
  111. }
  112. return Certificate_ENCIPHERMENT
  113. }
  114. type Config struct {
  115. state protoimpl.MessageState
  116. sizeCache protoimpl.SizeCache
  117. unknownFields protoimpl.UnknownFields
  118. // Whether or not to allow self-signed certificates.
  119. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
  120. // List of certificates to be served on server.
  121. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty"`
  122. // Override server name.
  123. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
  124. // Lists of string as ALPN values.
  125. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"`
  126. // Whether or not to enable session (ticket) resumption.
  127. EnableSessionResumption bool `protobuf:"varint,5,opt,name=enable_session_resumption,json=enableSessionResumption,proto3" json:"enable_session_resumption,omitempty"`
  128. // If true, root certificates on the system will not be loaded for
  129. // verification.
  130. DisableSystemRoot bool `protobuf:"varint,6,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"`
  131. }
  132. func (x *Config) Reset() {
  133. *x = Config{}
  134. if protoimpl.UnsafeEnabled {
  135. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  136. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  137. ms.StoreMessageInfo(mi)
  138. }
  139. }
  140. func (x *Config) String() string {
  141. return protoimpl.X.MessageStringOf(x)
  142. }
  143. func (*Config) ProtoMessage() {}
  144. func (x *Config) ProtoReflect() protoreflect.Message {
  145. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  146. if protoimpl.UnsafeEnabled && x != nil {
  147. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  148. if ms.LoadMessageInfo() == nil {
  149. ms.StoreMessageInfo(mi)
  150. }
  151. return ms
  152. }
  153. return mi.MessageOf(x)
  154. }
  155. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  156. func (*Config) Descriptor() ([]byte, []int) {
  157. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{1}
  158. }
  159. func (x *Config) GetAllowInsecure() bool {
  160. if x != nil {
  161. return x.AllowInsecure
  162. }
  163. return false
  164. }
  165. func (x *Config) GetCertificate() []*Certificate {
  166. if x != nil {
  167. return x.Certificate
  168. }
  169. return nil
  170. }
  171. func (x *Config) GetServerName() string {
  172. if x != nil {
  173. return x.ServerName
  174. }
  175. return ""
  176. }
  177. func (x *Config) GetNextProtocol() []string {
  178. if x != nil {
  179. return x.NextProtocol
  180. }
  181. return nil
  182. }
  183. func (x *Config) GetEnableSessionResumption() bool {
  184. if x != nil {
  185. return x.EnableSessionResumption
  186. }
  187. return false
  188. }
  189. func (x *Config) GetDisableSystemRoot() bool {
  190. if x != nil {
  191. return x.DisableSystemRoot
  192. }
  193. return false
  194. }
  195. var File_transport_internet_tls_config_proto protoreflect.FileDescriptor
  196. var file_transport_internet_tls_config_proto_rawDesc = []byte{
  197. 0x0a, 0x23, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65,
  198. 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
  199. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  200. 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65,
  201. 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x43, 0x65, 0x72,
  202. 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74,
  203. 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x43,
  204. 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65,
  205. 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x05,
  206. 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x76, 0x32,
  207. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
  208. 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
  209. 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x73, 0x61, 0x67,
  210. 0x65, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x44, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67,
  211. 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x4e, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x4d, 0x45, 0x4e,
  212. 0x54, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59,
  213. 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x55, 0x54,
  214. 0x48, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x22, 0xb3,
  215. 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c,
  216. 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
  217. 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65,
  218. 0x12, 0x50, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18,
  219. 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  220. 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74,
  221. 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
  222. 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
  223. 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d,
  224. 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
  225. 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74,
  226. 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x78, 0x74,
  227. 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x6e, 0x61, 0x62,
  228. 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d,
  229. 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x65, 0x6e, 0x61,
  230. 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70,
  231. 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f,
  232. 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
  233. 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
  234. 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x84, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72,
  235. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
  236. 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01,
  237. 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66,
  238. 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34,
  239. 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
  240. 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e,
  241. 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49,
  242. 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
  243. 0x74, 0x6f, 0x33,
  244. }
  245. var (
  246. file_transport_internet_tls_config_proto_rawDescOnce sync.Once
  247. file_transport_internet_tls_config_proto_rawDescData = file_transport_internet_tls_config_proto_rawDesc
  248. )
  249. func file_transport_internet_tls_config_proto_rawDescGZIP() []byte {
  250. file_transport_internet_tls_config_proto_rawDescOnce.Do(func() {
  251. file_transport_internet_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_internet_tls_config_proto_rawDescData)
  252. })
  253. return file_transport_internet_tls_config_proto_rawDescData
  254. }
  255. var file_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  256. var file_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  257. var file_transport_internet_tls_config_proto_goTypes = []interface{}{
  258. (Certificate_Usage)(0), // 0: v2ray.core.transport.internet.tls.Certificate.Usage
  259. (*Certificate)(nil), // 1: v2ray.core.transport.internet.tls.Certificate
  260. (*Config)(nil), // 2: v2ray.core.transport.internet.tls.Config
  261. }
  262. var file_transport_internet_tls_config_proto_depIdxs = []int32{
  263. 0, // 0: v2ray.core.transport.internet.tls.Certificate.usage:type_name -> v2ray.core.transport.internet.tls.Certificate.Usage
  264. 1, // 1: v2ray.core.transport.internet.tls.Config.certificate:type_name -> v2ray.core.transport.internet.tls.Certificate
  265. 2, // [2:2] is the sub-list for method output_type
  266. 2, // [2:2] is the sub-list for method input_type
  267. 2, // [2:2] is the sub-list for extension type_name
  268. 2, // [2:2] is the sub-list for extension extendee
  269. 0, // [0:2] is the sub-list for field type_name
  270. }
  271. func init() { file_transport_internet_tls_config_proto_init() }
  272. func file_transport_internet_tls_config_proto_init() {
  273. if File_transport_internet_tls_config_proto != nil {
  274. return
  275. }
  276. if !protoimpl.UnsafeEnabled {
  277. file_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  278. switch v := v.(*Certificate); i {
  279. case 0:
  280. return &v.state
  281. case 1:
  282. return &v.sizeCache
  283. case 2:
  284. return &v.unknownFields
  285. default:
  286. return nil
  287. }
  288. }
  289. file_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  290. switch v := v.(*Config); i {
  291. case 0:
  292. return &v.state
  293. case 1:
  294. return &v.sizeCache
  295. case 2:
  296. return &v.unknownFields
  297. default:
  298. return nil
  299. }
  300. }
  301. }
  302. type x struct{}
  303. out := protoimpl.TypeBuilder{
  304. File: protoimpl.DescBuilder{
  305. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  306. RawDescriptor: file_transport_internet_tls_config_proto_rawDesc,
  307. NumEnums: 1,
  308. NumMessages: 2,
  309. NumExtensions: 0,
  310. NumServices: 0,
  311. },
  312. GoTypes: file_transport_internet_tls_config_proto_goTypes,
  313. DependencyIndexes: file_transport_internet_tls_config_proto_depIdxs,
  314. EnumInfos: file_transport_internet_tls_config_proto_enumTypes,
  315. MessageInfos: file_transport_internet_tls_config_proto_msgTypes,
  316. }.Build()
  317. File_transport_internet_tls_config_proto = out.File
  318. file_transport_internet_tls_config_proto_rawDesc = nil
  319. file_transport_internet_tls_config_proto_goTypes = nil
  320. file_transport_internet_tls_config_proto_depIdxs = nil
  321. }