config.pb.go 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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) {
  34. return fileDescriptor_config_e641ddfb53ec9d25, []int{0, 0}
  35. }
  36. type Certificate struct {
  37. // TLS certificate in x509 format.
  38. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
  39. // TLS key in x509 format.
  40. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
  41. Usage Certificate_Usage `protobuf:"varint,3,opt,name=usage,proto3,enum=v2ray.core.transport.internet.tls.Certificate_Usage" json:"usage,omitempty"`
  42. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  43. XXX_unrecognized []byte `json:"-"`
  44. XXX_sizecache int32 `json:"-"`
  45. }
  46. func (m *Certificate) Reset() { *m = Certificate{} }
  47. func (m *Certificate) String() string { return proto.CompactTextString(m) }
  48. func (*Certificate) ProtoMessage() {}
  49. func (*Certificate) Descriptor() ([]byte, []int) {
  50. return fileDescriptor_config_e641ddfb53ec9d25, []int{0}
  51. }
  52. func (m *Certificate) XXX_Unmarshal(b []byte) error {
  53. return xxx_messageInfo_Certificate.Unmarshal(m, b)
  54. }
  55. func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  56. return xxx_messageInfo_Certificate.Marshal(b, m, deterministic)
  57. }
  58. func (dst *Certificate) XXX_Merge(src proto.Message) {
  59. xxx_messageInfo_Certificate.Merge(dst, src)
  60. }
  61. func (m *Certificate) XXX_Size() int {
  62. return xxx_messageInfo_Certificate.Size(m)
  63. }
  64. func (m *Certificate) XXX_DiscardUnknown() {
  65. xxx_messageInfo_Certificate.DiscardUnknown(m)
  66. }
  67. var xxx_messageInfo_Certificate proto.InternalMessageInfo
  68. func (m *Certificate) GetCertificate() []byte {
  69. if m != nil {
  70. return m.Certificate
  71. }
  72. return nil
  73. }
  74. func (m *Certificate) GetKey() []byte {
  75. if m != nil {
  76. return m.Key
  77. }
  78. return nil
  79. }
  80. func (m *Certificate) GetUsage() Certificate_Usage {
  81. if m != nil {
  82. return m.Usage
  83. }
  84. return Certificate_ENCIPHERMENT
  85. }
  86. type Config struct {
  87. // Whether or not to allow self-signed certificates.
  88. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
  89. // Whether or not to allow insecure cipher suites.
  90. AllowInsecureCiphers bool `protobuf:"varint,5,opt,name=allow_insecure_ciphers,json=allowInsecureCiphers,proto3" json:"allow_insecure_ciphers,omitempty"`
  91. // List of certificates to be served on server.
  92. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty"`
  93. // Override server name.
  94. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
  95. // Lists of string as ALPN values.
  96. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol,proto3" json:"next_protocol,omitempty"`
  97. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  98. XXX_unrecognized []byte `json:"-"`
  99. XXX_sizecache int32 `json:"-"`
  100. }
  101. func (m *Config) Reset() { *m = Config{} }
  102. func (m *Config) String() string { return proto.CompactTextString(m) }
  103. func (*Config) ProtoMessage() {}
  104. func (*Config) Descriptor() ([]byte, []int) {
  105. return fileDescriptor_config_e641ddfb53ec9d25, []int{1}
  106. }
  107. func (m *Config) XXX_Unmarshal(b []byte) error {
  108. return xxx_messageInfo_Config.Unmarshal(m, b)
  109. }
  110. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  111. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  112. }
  113. func (dst *Config) XXX_Merge(src proto.Message) {
  114. xxx_messageInfo_Config.Merge(dst, src)
  115. }
  116. func (m *Config) XXX_Size() int {
  117. return xxx_messageInfo_Config.Size(m)
  118. }
  119. func (m *Config) XXX_DiscardUnknown() {
  120. xxx_messageInfo_Config.DiscardUnknown(m)
  121. }
  122. var xxx_messageInfo_Config proto.InternalMessageInfo
  123. func (m *Config) GetAllowInsecure() bool {
  124. if m != nil {
  125. return m.AllowInsecure
  126. }
  127. return false
  128. }
  129. func (m *Config) GetAllowInsecureCiphers() bool {
  130. if m != nil {
  131. return m.AllowInsecureCiphers
  132. }
  133. return false
  134. }
  135. func (m *Config) GetCertificate() []*Certificate {
  136. if m != nil {
  137. return m.Certificate
  138. }
  139. return nil
  140. }
  141. func (m *Config) GetServerName() string {
  142. if m != nil {
  143. return m.ServerName
  144. }
  145. return ""
  146. }
  147. func (m *Config) GetNextProtocol() []string {
  148. if m != nil {
  149. return m.NextProtocol
  150. }
  151. return nil
  152. }
  153. func init() {
  154. proto.RegisterType((*Certificate)(nil), "v2ray.core.transport.internet.tls.Certificate")
  155. proto.RegisterType((*Config)(nil), "v2ray.core.transport.internet.tls.Config")
  156. proto.RegisterEnum("v2ray.core.transport.internet.tls.Certificate_Usage", Certificate_Usage_name, Certificate_Usage_value)
  157. }
  158. func init() {
  159. proto.RegisterFile("v2ray.com/core/transport/internet/tls/config.proto", fileDescriptor_config_e641ddfb53ec9d25)
  160. }
  161. var fileDescriptor_config_e641ddfb53ec9d25 = []byte{
  162. // 376 bytes of a gzipped FileDescriptorProto
  163. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x51, 0x8f, 0x93, 0x40,
  164. 0x10, 0x80, 0x05, 0xec, 0xc5, 0x1b, 0x7a, 0x27, 0x59, 0x2f, 0x86, 0x37, 0xb9, 0x9a, 0x26, 0x3c,
  165. 0x2d, 0x09, 0xf6, 0x0f, 0x28, 0x62, 0x8a, 0xc6, 0x4a, 0xb6, 0xb4, 0x49, 0x7d, 0x21, 0xeb, 0x66,
  166. 0x5b, 0x49, 0x80, 0x6d, 0x76, 0xb7, 0xd5, 0xfe, 0x25, 0xff, 0x8e, 0xbf, 0xc7, 0xc4, 0x00, 0x6d,
  167. 0x2d, 0x4f, 0x8d, 0x6f, 0xcc, 0x37, 0xdf, 0xcc, 0x30, 0xb3, 0x10, 0xee, 0x43, 0x49, 0x0f, 0x98,
  168. 0x89, 0x2a, 0x60, 0x42, 0xf2, 0x40, 0x4b, 0x5a, 0xab, 0xad, 0x90, 0x3a, 0x28, 0x6a, 0xcd, 0x65,
  169. 0xcd, 0x75, 0xa0, 0x4b, 0x15, 0x30, 0x51, 0xaf, 0x8b, 0x0d, 0xde, 0x4a, 0xa1, 0x05, 0x7a, 0x3c,
  170. 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0x0b,
  181. 0xf4, 0x0a, 0x6c, 0xc5, 0xe5, 0x9e, 0xcb, 0xbc, 0xa6, 0x55, 0x77, 0xd1, 0x5b, 0x02, 0x1d, 0x9a,
  182. 0xd1, 0x8a, 0xa3, 0xd7, 0x70, 0x57, 0xf3, 0x9f, 0x3a, 0x6f, 0x5f, 0x98, 0x89, 0xd2, 0x7d, 0xea,
  183. 0x59, 0xfe, 0x2d, 0x19, 0x36, 0x30, 0x3d, 0xb2, 0x77, 0x04, 0xc6, 0x4c, 0x54, 0xd7, 0xff, 0x23,
  184. 0x35, 0xbe, 0x5a, 0xba, 0x54, 0xbf, 0xcc, 0xc7, 0x65, 0x48, 0xe8, 0x01, 0x47, 0x8d, 0x9a, 0x9d,
  185. 0xd5, 0xe4, 0xa4, 0x66, 0xa5, 0xfa, 0x76, 0xd3, 0x4e, 0x7c, 0xf3, 0x37, 0x00, 0x00, 0xff, 0xff,
  186. 0xd1, 0x3b, 0xdd, 0x37, 0x89, 0x02, 0x00, 0x00,
  187. }