config.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  5. // source: transport/internet/tls/config.proto
  6. package tls
  7. import (
  8. internet "github.com/xtls/xray-core/transport/internet"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. type Certificate_Usage int32
  22. const (
  23. Certificate_ENCIPHERMENT Certificate_Usage = 0
  24. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  25. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  26. )
  27. // Enum value maps for Certificate_Usage.
  28. var (
  29. Certificate_Usage_name = map[int32]string{
  30. 0: "ENCIPHERMENT",
  31. 1: "AUTHORITY_VERIFY",
  32. 2: "AUTHORITY_ISSUE",
  33. }
  34. Certificate_Usage_value = map[string]int32{
  35. "ENCIPHERMENT": 0,
  36. "AUTHORITY_VERIFY": 1,
  37. "AUTHORITY_ISSUE": 2,
  38. }
  39. )
  40. func (x Certificate_Usage) Enum() *Certificate_Usage {
  41. p := new(Certificate_Usage)
  42. *p = x
  43. return p
  44. }
  45. func (x Certificate_Usage) String() string {
  46. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  47. }
  48. func (Certificate_Usage) Descriptor() protoreflect.EnumDescriptor {
  49. return file_transport_internet_tls_config_proto_enumTypes[0].Descriptor()
  50. }
  51. func (Certificate_Usage) Type() protoreflect.EnumType {
  52. return &file_transport_internet_tls_config_proto_enumTypes[0]
  53. }
  54. func (x Certificate_Usage) Number() protoreflect.EnumNumber {
  55. return protoreflect.EnumNumber(x)
  56. }
  57. // Deprecated: Use Certificate_Usage.Descriptor instead.
  58. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) {
  59. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0, 0}
  60. }
  61. type Certificate struct {
  62. state protoimpl.MessageState `protogen:"open.v1"`
  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=xray.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  68. OcspStapling uint64 `protobuf:"varint,4,opt,name=ocsp_stapling,json=ocspStapling,proto3" json:"ocsp_stapling,omitempty"`
  69. // TLS certificate path
  70. CertificatePath string `protobuf:"bytes,5,opt,name=certificate_path,json=certificatePath,proto3" json:"certificate_path,omitempty"`
  71. // TLS Key path
  72. KeyPath string `protobuf:"bytes,6,opt,name=key_path,json=keyPath,proto3" json:"key_path,omitempty"`
  73. // If true, one-Time Loading
  74. OneTimeLoading bool `protobuf:"varint,7,opt,name=One_time_loading,json=OneTimeLoading,proto3" json:"One_time_loading,omitempty"`
  75. BuildChain bool `protobuf:"varint,8,opt,name=build_chain,json=buildChain,proto3" json:"build_chain,omitempty"`
  76. unknownFields protoimpl.UnknownFields
  77. sizeCache protoimpl.SizeCache
  78. }
  79. func (x *Certificate) Reset() {
  80. *x = Certificate{}
  81. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. ms.StoreMessageInfo(mi)
  84. }
  85. func (x *Certificate) String() string {
  86. return protoimpl.X.MessageStringOf(x)
  87. }
  88. func (*Certificate) ProtoMessage() {}
  89. func (x *Certificate) ProtoReflect() protoreflect.Message {
  90. mi := &file_transport_internet_tls_config_proto_msgTypes[0]
  91. if x != nil {
  92. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  93. if ms.LoadMessageInfo() == nil {
  94. ms.StoreMessageInfo(mi)
  95. }
  96. return ms
  97. }
  98. return mi.MessageOf(x)
  99. }
  100. // Deprecated: Use Certificate.ProtoReflect.Descriptor instead.
  101. func (*Certificate) Descriptor() ([]byte, []int) {
  102. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{0}
  103. }
  104. func (x *Certificate) GetCertificate() []byte {
  105. if x != nil {
  106. return x.Certificate
  107. }
  108. return nil
  109. }
  110. func (x *Certificate) GetKey() []byte {
  111. if x != nil {
  112. return x.Key
  113. }
  114. return nil
  115. }
  116. func (x *Certificate) GetUsage() Certificate_Usage {
  117. if x != nil {
  118. return x.Usage
  119. }
  120. return Certificate_ENCIPHERMENT
  121. }
  122. func (x *Certificate) GetOcspStapling() uint64 {
  123. if x != nil {
  124. return x.OcspStapling
  125. }
  126. return 0
  127. }
  128. func (x *Certificate) GetCertificatePath() string {
  129. if x != nil {
  130. return x.CertificatePath
  131. }
  132. return ""
  133. }
  134. func (x *Certificate) GetKeyPath() string {
  135. if x != nil {
  136. return x.KeyPath
  137. }
  138. return ""
  139. }
  140. func (x *Certificate) GetOneTimeLoading() bool {
  141. if x != nil {
  142. return x.OneTimeLoading
  143. }
  144. return false
  145. }
  146. func (x *Certificate) GetBuildChain() bool {
  147. if x != nil {
  148. return x.BuildChain
  149. }
  150. return false
  151. }
  152. type Config struct {
  153. state protoimpl.MessageState `protogen:"open.v1"`
  154. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
  155. // List of certificates to be served on server.
  156. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty"`
  157. // Override server name.
  158. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
  159. // Lists of string as ALPN values.
  160. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"`
  161. // Whether or not to enable session (ticket) resumption.
  162. EnableSessionResumption bool `protobuf:"varint,5,opt,name=enable_session_resumption,json=enableSessionResumption,proto3" json:"enable_session_resumption,omitempty"`
  163. // If true, root certificates on the system will not be loaded for
  164. // verification.
  165. DisableSystemRoot bool `protobuf:"varint,6,opt,name=disable_system_root,json=disableSystemRoot,proto3" json:"disable_system_root,omitempty"`
  166. // The minimum TLS version.
  167. MinVersion string `protobuf:"bytes,7,opt,name=min_version,json=minVersion,proto3" json:"min_version,omitempty"`
  168. // The maximum TLS version.
  169. MaxVersion string `protobuf:"bytes,8,opt,name=max_version,json=maxVersion,proto3" json:"max_version,omitempty"`
  170. // Specify cipher suites, except for TLS 1.3.
  171. CipherSuites string `protobuf:"bytes,9,opt,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"`
  172. // TLS Client Hello fingerprint (uTLS).
  173. Fingerprint string `protobuf:"bytes,11,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
  174. RejectUnknownSni bool `protobuf:"varint,12,opt,name=reject_unknown_sni,json=rejectUnknownSni,proto3" json:"reject_unknown_sni,omitempty"`
  175. MasterKeyLog string `protobuf:"bytes,15,opt,name=master_key_log,json=masterKeyLog,proto3" json:"master_key_log,omitempty"`
  176. // Lists of string as CurvePreferences values.
  177. CurvePreferences []string `protobuf:"bytes,16,rep,name=curve_preferences,json=curvePreferences,proto3" json:"curve_preferences,omitempty"`
  178. VerifyPeerCertByName []string `protobuf:"bytes,17,rep,name=verify_peer_cert_by_name,json=verifyPeerCertByName,proto3" json:"verify_peer_cert_by_name,omitempty"`
  179. EchServerKeys []byte `protobuf:"bytes,18,opt,name=ech_server_keys,json=echServerKeys,proto3" json:"ech_server_keys,omitempty"`
  180. EchConfigList string `protobuf:"bytes,19,opt,name=ech_config_list,json=echConfigList,proto3" json:"ech_config_list,omitempty"`
  181. EchForceQuery string `protobuf:"bytes,20,opt,name=ech_force_query,json=echForceQuery,proto3" json:"ech_force_query,omitempty"`
  182. EchSocketSettings *internet.SocketConfig `protobuf:"bytes,21,opt,name=ech_socket_settings,json=echSocketSettings,proto3" json:"ech_socket_settings,omitempty"`
  183. PinnedPeerCertSha256 [][]byte `protobuf:"bytes,22,rep,name=pinned_peer_cert_sha256,json=pinnedPeerCertSha256,proto3" json:"pinned_peer_cert_sha256,omitempty"`
  184. unknownFields protoimpl.UnknownFields
  185. sizeCache protoimpl.SizeCache
  186. }
  187. func (x *Config) Reset() {
  188. *x = Config{}
  189. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  190. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  191. ms.StoreMessageInfo(mi)
  192. }
  193. func (x *Config) String() string {
  194. return protoimpl.X.MessageStringOf(x)
  195. }
  196. func (*Config) ProtoMessage() {}
  197. func (x *Config) ProtoReflect() protoreflect.Message {
  198. mi := &file_transport_internet_tls_config_proto_msgTypes[1]
  199. if x != nil {
  200. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  201. if ms.LoadMessageInfo() == nil {
  202. ms.StoreMessageInfo(mi)
  203. }
  204. return ms
  205. }
  206. return mi.MessageOf(x)
  207. }
  208. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  209. func (*Config) Descriptor() ([]byte, []int) {
  210. return file_transport_internet_tls_config_proto_rawDescGZIP(), []int{1}
  211. }
  212. func (x *Config) GetAllowInsecure() bool {
  213. if x != nil {
  214. return x.AllowInsecure
  215. }
  216. return false
  217. }
  218. func (x *Config) GetCertificate() []*Certificate {
  219. if x != nil {
  220. return x.Certificate
  221. }
  222. return nil
  223. }
  224. func (x *Config) GetServerName() string {
  225. if x != nil {
  226. return x.ServerName
  227. }
  228. return ""
  229. }
  230. func (x *Config) GetNextProtocol() []string {
  231. if x != nil {
  232. return x.NextProtocol
  233. }
  234. return nil
  235. }
  236. func (x *Config) GetEnableSessionResumption() bool {
  237. if x != nil {
  238. return x.EnableSessionResumption
  239. }
  240. return false
  241. }
  242. func (x *Config) GetDisableSystemRoot() bool {
  243. if x != nil {
  244. return x.DisableSystemRoot
  245. }
  246. return false
  247. }
  248. func (x *Config) GetMinVersion() string {
  249. if x != nil {
  250. return x.MinVersion
  251. }
  252. return ""
  253. }
  254. func (x *Config) GetMaxVersion() string {
  255. if x != nil {
  256. return x.MaxVersion
  257. }
  258. return ""
  259. }
  260. func (x *Config) GetCipherSuites() string {
  261. if x != nil {
  262. return x.CipherSuites
  263. }
  264. return ""
  265. }
  266. func (x *Config) GetFingerprint() string {
  267. if x != nil {
  268. return x.Fingerprint
  269. }
  270. return ""
  271. }
  272. func (x *Config) GetRejectUnknownSni() bool {
  273. if x != nil {
  274. return x.RejectUnknownSni
  275. }
  276. return false
  277. }
  278. func (x *Config) GetMasterKeyLog() string {
  279. if x != nil {
  280. return x.MasterKeyLog
  281. }
  282. return ""
  283. }
  284. func (x *Config) GetCurvePreferences() []string {
  285. if x != nil {
  286. return x.CurvePreferences
  287. }
  288. return nil
  289. }
  290. func (x *Config) GetVerifyPeerCertByName() []string {
  291. if x != nil {
  292. return x.VerifyPeerCertByName
  293. }
  294. return nil
  295. }
  296. func (x *Config) GetEchServerKeys() []byte {
  297. if x != nil {
  298. return x.EchServerKeys
  299. }
  300. return nil
  301. }
  302. func (x *Config) GetEchConfigList() string {
  303. if x != nil {
  304. return x.EchConfigList
  305. }
  306. return ""
  307. }
  308. func (x *Config) GetEchForceQuery() string {
  309. if x != nil {
  310. return x.EchForceQuery
  311. }
  312. return ""
  313. }
  314. func (x *Config) GetEchSocketSettings() *internet.SocketConfig {
  315. if x != nil {
  316. return x.EchSocketSettings
  317. }
  318. return nil
  319. }
  320. func (x *Config) GetPinnedPeerCertSha256() [][]byte {
  321. if x != nil {
  322. return x.PinnedPeerCertSha256
  323. }
  324. return nil
  325. }
  326. var File_transport_internet_tls_config_proto protoreflect.FileDescriptor
  327. const file_transport_internet_tls_config_proto_rawDesc = "" +
  328. "\n" +
  329. "#transport/internet/tls/config.proto\x12\x1bxray.transport.internet.tls\x1a\x1ftransport/internet/config.proto\"\x83\x03\n" +
  330. "\vCertificate\x12 \n" +
  331. "\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x10\n" +
  332. "\x03key\x18\x02 \x01(\fR\x03key\x12D\n" +
  333. "\x05usage\x18\x03 \x01(\x0e2..xray.transport.internet.tls.Certificate.UsageR\x05usage\x12#\n" +
  334. "\rocsp_stapling\x18\x04 \x01(\x04R\focspStapling\x12)\n" +
  335. "\x10certificate_path\x18\x05 \x01(\tR\x0fcertificatePath\x12\x19\n" +
  336. "\bkey_path\x18\x06 \x01(\tR\akeyPath\x12(\n" +
  337. "\x10One_time_loading\x18\a \x01(\bR\x0eOneTimeLoading\x12\x1f\n" +
  338. "\vbuild_chain\x18\b \x01(\bR\n" +
  339. "buildChain\"D\n" +
  340. "\x05Usage\x12\x10\n" +
  341. "\fENCIPHERMENT\x10\x00\x12\x14\n" +
  342. "\x10AUTHORITY_VERIFY\x10\x01\x12\x13\n" +
  343. "\x0fAUTHORITY_ISSUE\x10\x02\"\xf5\x06\n" +
  344. "\x06Config\x12%\n" +
  345. "\x0eallow_insecure\x18\x01 \x01(\bR\rallowInsecure\x12J\n" +
  346. "\vcertificate\x18\x02 \x03(\v2(.xray.transport.internet.tls.CertificateR\vcertificate\x12\x1f\n" +
  347. "\vserver_name\x18\x03 \x01(\tR\n" +
  348. "serverName\x12#\n" +
  349. "\rnext_protocol\x18\x04 \x03(\tR\fnextProtocol\x12:\n" +
  350. "\x19enable_session_resumption\x18\x05 \x01(\bR\x17enableSessionResumption\x12.\n" +
  351. "\x13disable_system_root\x18\x06 \x01(\bR\x11disableSystemRoot\x12\x1f\n" +
  352. "\vmin_version\x18\a \x01(\tR\n" +
  353. "minVersion\x12\x1f\n" +
  354. "\vmax_version\x18\b \x01(\tR\n" +
  355. "maxVersion\x12#\n" +
  356. "\rcipher_suites\x18\t \x01(\tR\fcipherSuites\x12 \n" +
  357. "\vfingerprint\x18\v \x01(\tR\vfingerprint\x12,\n" +
  358. "\x12reject_unknown_sni\x18\f \x01(\bR\x10rejectUnknownSni\x12$\n" +
  359. "\x0emaster_key_log\x18\x0f \x01(\tR\fmasterKeyLog\x12+\n" +
  360. "\x11curve_preferences\x18\x10 \x03(\tR\x10curvePreferences\x126\n" +
  361. "\x18verify_peer_cert_by_name\x18\x11 \x03(\tR\x14verifyPeerCertByName\x12&\n" +
  362. "\x0fech_server_keys\x18\x12 \x01(\fR\rechServerKeys\x12&\n" +
  363. "\x0fech_config_list\x18\x13 \x01(\tR\rechConfigList\x12&\n" +
  364. "\x0fech_force_query\x18\x14 \x01(\tR\rechForceQuery\x12U\n" +
  365. "\x13ech_socket_settings\x18\x15 \x01(\v2%.xray.transport.internet.SocketConfigR\x11echSocketSettings\x125\n" +
  366. "\x17pinned_peer_cert_sha256\x18\x16 \x03(\fR\x14pinnedPeerCertSha256Bs\n" +
  367. "\x1fcom.xray.transport.internet.tlsP\x01Z0github.com/xtls/xray-core/transport/internet/tls\xaa\x02\x1bXray.Transport.Internet.Tlsb\x06proto3"
  368. var (
  369. file_transport_internet_tls_config_proto_rawDescOnce sync.Once
  370. file_transport_internet_tls_config_proto_rawDescData []byte
  371. )
  372. func file_transport_internet_tls_config_proto_rawDescGZIP() []byte {
  373. file_transport_internet_tls_config_proto_rawDescOnce.Do(func() {
  374. file_transport_internet_tls_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_transport_internet_tls_config_proto_rawDesc), len(file_transport_internet_tls_config_proto_rawDesc)))
  375. })
  376. return file_transport_internet_tls_config_proto_rawDescData
  377. }
  378. var file_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  379. var file_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  380. var file_transport_internet_tls_config_proto_goTypes = []any{
  381. (Certificate_Usage)(0), // 0: xray.transport.internet.tls.Certificate.Usage
  382. (*Certificate)(nil), // 1: xray.transport.internet.tls.Certificate
  383. (*Config)(nil), // 2: xray.transport.internet.tls.Config
  384. (*internet.SocketConfig)(nil), // 3: xray.transport.internet.SocketConfig
  385. }
  386. var file_transport_internet_tls_config_proto_depIdxs = []int32{
  387. 0, // 0: xray.transport.internet.tls.Certificate.usage:type_name -> xray.transport.internet.tls.Certificate.Usage
  388. 1, // 1: xray.transport.internet.tls.Config.certificate:type_name -> xray.transport.internet.tls.Certificate
  389. 3, // 2: xray.transport.internet.tls.Config.ech_socket_settings:type_name -> xray.transport.internet.SocketConfig
  390. 3, // [3:3] is the sub-list for method output_type
  391. 3, // [3:3] is the sub-list for method input_type
  392. 3, // [3:3] is the sub-list for extension type_name
  393. 3, // [3:3] is the sub-list for extension extendee
  394. 0, // [0:3] is the sub-list for field type_name
  395. }
  396. func init() { file_transport_internet_tls_config_proto_init() }
  397. func file_transport_internet_tls_config_proto_init() {
  398. if File_transport_internet_tls_config_proto != nil {
  399. return
  400. }
  401. type x struct{}
  402. out := protoimpl.TypeBuilder{
  403. File: protoimpl.DescBuilder{
  404. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  405. RawDescriptor: unsafe.Slice(unsafe.StringData(file_transport_internet_tls_config_proto_rawDesc), len(file_transport_internet_tls_config_proto_rawDesc)),
  406. NumEnums: 1,
  407. NumMessages: 2,
  408. NumExtensions: 0,
  409. NumServices: 0,
  410. },
  411. GoTypes: file_transport_internet_tls_config_proto_goTypes,
  412. DependencyIndexes: file_transport_internet_tls_config_proto_depIdxs,
  413. EnumInfos: file_transport_internet_tls_config_proto_enumTypes,
  414. MessageInfos: file_transport_internet_tls_config_proto_msgTypes,
  415. }.Build()
  416. File_transport_internet_tls_config_proto = out.File
  417. file_transport_internet_tls_config_proto_goTypes = nil
  418. file_transport_internet_tls_config_proto_depIdxs = nil
  419. }