config.pb.go 14 KB

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