config.pb.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. package tls
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. // Reference imports to suppress errors if they are not otherwise used.
  6. var _ = proto.Marshal
  7. var _ = fmt.Errorf
  8. var _ = math.Inf
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the proto package it is being compiled against.
  11. // A compilation error at this line likely means your copy of the
  12. // proto package needs to be updated.
  13. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  14. type Certificate_Usage int32
  15. const (
  16. Certificate_ENCIPHERMENT Certificate_Usage = 0
  17. Certificate_AUTHORITY_VERIFY Certificate_Usage = 1
  18. Certificate_AUTHORITY_ISSUE Certificate_Usage = 2
  19. )
  20. var Certificate_Usage_name = map[int32]string{
  21. 0: "ENCIPHERMENT",
  22. 1: "AUTHORITY_VERIFY",
  23. 2: "AUTHORITY_ISSUE",
  24. }
  25. var Certificate_Usage_value = map[string]int32{
  26. "ENCIPHERMENT": 0,
  27. "AUTHORITY_VERIFY": 1,
  28. "AUTHORITY_ISSUE": 2,
  29. }
  30. func (x Certificate_Usage) String() string {
  31. return proto.EnumName(Certificate_Usage_name, int32(x))
  32. }
  33. func (Certificate_Usage) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
  34. type Certificate struct {
  35. // TLS certificate in x509 format.
  36. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  37. // TLS key in x509 format.
  38. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  39. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  40. }
  41. func (m *Certificate) Reset() { *m = Certificate{} }
  42. func (m *Certificate) String() string { return proto.CompactTextString(m) }
  43. func (*Certificate) ProtoMessage() {}
  44. func (*Certificate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  45. func (m *Certificate) GetCertificate() []byte {
  46. if m != nil {
  47. return m.Certificate
  48. }
  49. return nil
  50. }
  51. func (m *Certificate) GetKey() []byte {
  52. if m != nil {
  53. return m.Key
  54. }
  55. return nil
  56. }
  57. func (m *Certificate) GetUsage() Certificate_Usage {
  58. if m != nil {
  59. return m.Usage
  60. }
  61. return Certificate_ENCIPHERMENT
  62. }
  63. type Config struct {
  64. // Whether or not to allow self-signed certificates.
  65. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure" json:"allow_insecure,omitempty"`
  66. // List of certificates to be served on server.
  67. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate" json:"certificate,omitempty"`
  68. // Override server name.
  69. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
  70. // Lists of string as ALPN values.
  71. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol" json:"next_protocol,omitempty"`
  72. }
  73. func (m *Config) Reset() { *m = Config{} }
  74. func (m *Config) String() string { return proto.CompactTextString(m) }
  75. func (*Config) ProtoMessage() {}
  76. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  77. func (m *Config) GetAllowInsecure() bool {
  78. if m != nil {
  79. return m.AllowInsecure
  80. }
  81. return false
  82. }
  83. func (m *Config) GetCertificate() []*Certificate {
  84. if m != nil {
  85. return m.Certificate
  86. }
  87. return nil
  88. }
  89. func (m *Config) GetServerName() string {
  90. if m != nil {
  91. return m.ServerName
  92. }
  93. return ""
  94. }
  95. func (m *Config) GetNextProtocol() []string {
  96. if m != nil {
  97. return m.NextProtocol
  98. }
  99. return nil
  100. }
  101. func init() {
  102. proto.RegisterType((*Certificate)(nil), "v2ray.core.transport.internet.tls.Certificate")
  103. proto.RegisterType((*Config)(nil), "v2ray.core.transport.internet.tls.Config")
  104. proto.RegisterEnum("v2ray.core.transport.internet.tls.Certificate_Usage", Certificate_Usage_name, Certificate_Usage_value)
  105. }
  106. func init() { proto.RegisterFile("v2ray.com/core/transport/internet/tls/config.proto", fileDescriptor0) }
  107. var fileDescriptor0 = []byte{
  108. // 358 bytes of a gzipped FileDescriptorProto
  109. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xd1, 0x6e, 0xda, 0x30,
  110. 0x14, 0x40, 0x97, 0x64, 0xa0, 0xe1, 0x00, 0x8b, 0xbc, 0x3d, 0xe4, 0x6d, 0x81, 0x09, 0x29, 0x4f,
  111. 0x8e, 0x94, 0xed, 0x07, 0xb6, 0x34, 0x15, 0x69, 0x55, 0x1a, 0x99, 0x80, 0x44, 0x5f, 0x22, 0xd7,
  112. 0x32, 0x28, 0x52, 0x12, 0x23, 0xdb, 0xd0, 0xf2, 0x4b, 0xfd, 0x91, 0x7e, 0x40, 0x7f, 0xa8, 0x4a,
  113. 0x02, 0x14, 0x9e, 0x50, 0xdf, 0x7c, 0x8f, 0xcf, 0xbd, 0xd7, 0xf7, 0x1a, 0xf8, 0x5b, 0x5f, 0x90,
  114. 0x1d, 0xa2, 0xbc, 0xf0, 0x28, 0x17, 0xcc, 0x53, 0x82, 0x94, 0x72, 0xcd, 0x85, 0xf2, 0xb2, 0x52,
  115. 0x31, 0x51, 0x32, 0xe5, 0xa9, 0x5c, 0x7a, 0x94, 0x97, 0xcb, 0x6c, 0x85, 0xd6, 0x82, 0x2b, 0x0e,
  116. 0x07, 0x87, 0x1c, 0xc1, 0xd0, 0xd1, 0x47, 0x07, 0x1f, 0xa9, 0x5c, 0x0e, 0xdf, 0x34, 0x60, 0x06,
  117. 0x4c, 0xa8, 0x6c, 0x99, 0x51, 0xa2, 0x18, 0x74, 0xce, 0x42, 0x5b, 0x73, 0x34, 0xb7, 0x8b, 0xcf,
  118. 0x0c, 0x0b, 0x18, 0xb7, 0x6c, 0x67, 0xeb, 0xf5, 0x4d, 0x75, 0x84, 0x37, 0xa0, 0xb5, 0x91, 0x64,
  119. 0xc5, 0x6c, 0xc3, 0xd1, 0xdc, 0xbe, 0xff, 0x17, 0x5d, 0x6c, 0x8b, 0x4e, 0x0a, 0xa2, 0x59, 0x95,
  120. 0x8b, 0x9b, 0x12, 0xc3, 0x2b, 0xd0, 0xaa, 0x63, 0x68, 0x81, 0x6e, 0x38, 0x09, 0xa2, 0x78, 0x1c,
  121. 0xe2, 0xbb, 0x70, 0x92, 0x58, 0x5f, 0xe0, 0x4f, 0x60, 0xfd, 0x9b, 0x25, 0xe3, 0x7b, 0x1c, 0x25,
  122. 0x8b, 0x74, 0x1e, 0xe2, 0xe8, 0x7a, 0x61, 0x69, 0xf0, 0x07, 0xf8, 0xfe, 0x41, 0xa3, 0xe9, 0x74,
  123. 0x16, 0x5a, 0xfa, 0xf0, 0x55, 0x03, 0xed, 0xa0, 0xde, 0x04, 0x1c, 0x81, 0x3e, 0xc9, 0x73, 0xfe,
  124. 0x94, 0x66, 0xa5, 0x64, 0x74, 0x23, 0x9a, 0x99, 0xbe, 0xe1, 0x5e, 0x4d, 0xa3, 0x3d, 0x84, 0x31,
  125. 0x30, 0xe9, 0xc9, 0xdc, 0xba, 0x63, 0xb8, 0xa6, 0x8f, 0x3e, 0x37, 0x09, 0x3e, 0x2d, 0x01, 0x7f,
  126. 0x01, 0x53, 0x32, 0xb1, 0x65, 0x22, 0x2d, 0x49, 0xd1, 0xec, 0xa6, 0x83, 0x41, 0x83, 0x26, 0xa4,
  127. 0x60, 0xf0, 0x37, 0xe8, 0x95, 0xec, 0x59, 0xa5, 0xf5, 0x5f, 0x51, 0x9e, 0xdb, 0x5f, 0x1d, 0xc3,
  128. 0xed, 0xe0, 0x6e, 0x05, 0xe3, 0x3d, 0xfb, 0x8f, 0xc1, 0x88, 0xf2, 0xe2, 0xf2, 0x3b, 0x62, 0xed,
  129. 0xc1, 0x50, 0xb9, 0x7c, 0xd1, 0x07, 0x73, 0x1f, 0x93, 0x1d, 0x0a, 0x2a, 0x35, 0x39, 0xaa, 0xd1,
  130. 0x41, 0x4d, 0x72, 0xf9, 0xd8, 0xae, 0x3b, 0xfe, 0x79, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xcd,
  131. 0x2a, 0x68, 0x53, 0x02, 0x00, 0x00,
  132. }