config.pb.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. package shadowsocks
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import v2ray_core_common_protocol "v2ray.com/core/common/protocol"
  6. import v2ray_core_common_protocol1 "v2ray.com/core/common/protocol"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. type CipherType int32
  17. const (
  18. CipherType_UNKNOWN CipherType = 0
  19. CipherType_AES_128_CFB CipherType = 1
  20. CipherType_AES_256_CFB CipherType = 2
  21. CipherType_CHACHA20 CipherType = 3
  22. CipherType_CHACHA20_IETF CipherType = 4
  23. CipherType_AES_128_GCM CipherType = 5
  24. CipherType_AES_256_GCM CipherType = 6
  25. CipherType_CHACHA20_POLY1305 CipherType = 7
  26. CipherType_NONE CipherType = 8
  27. )
  28. var CipherType_name = map[int32]string{
  29. 0: "UNKNOWN",
  30. 1: "AES_128_CFB",
  31. 2: "AES_256_CFB",
  32. 3: "CHACHA20",
  33. 4: "CHACHA20_IETF",
  34. 5: "AES_128_GCM",
  35. 6: "AES_256_GCM",
  36. 7: "CHACHA20_POLY1305",
  37. 8: "NONE",
  38. }
  39. var CipherType_value = map[string]int32{
  40. "UNKNOWN": 0,
  41. "AES_128_CFB": 1,
  42. "AES_256_CFB": 2,
  43. "CHACHA20": 3,
  44. "CHACHA20_IETF": 4,
  45. "AES_128_GCM": 5,
  46. "AES_256_GCM": 6,
  47. "CHACHA20_POLY1305": 7,
  48. "NONE": 8,
  49. }
  50. func (x CipherType) String() string {
  51. return proto.EnumName(CipherType_name, int32(x))
  52. }
  53. func (CipherType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  54. type Account_OneTimeAuth int32
  55. const (
  56. Account_Auto Account_OneTimeAuth = 0
  57. Account_Disabled Account_OneTimeAuth = 1
  58. Account_Enabled Account_OneTimeAuth = 2
  59. )
  60. var Account_OneTimeAuth_name = map[int32]string{
  61. 0: "Auto",
  62. 1: "Disabled",
  63. 2: "Enabled",
  64. }
  65. var Account_OneTimeAuth_value = map[string]int32{
  66. "Auto": 0,
  67. "Disabled": 1,
  68. "Enabled": 2,
  69. }
  70. func (x Account_OneTimeAuth) String() string {
  71. return proto.EnumName(Account_OneTimeAuth_name, int32(x))
  72. }
  73. func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
  74. type Account struct {
  75. Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
  76. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,enum=v2ray.core.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  77. Ota Account_OneTimeAuth `protobuf:"varint,3,opt,name=ota,enum=v2ray.core.proxy.shadowsocks.Account_OneTimeAuth" json:"ota,omitempty"`
  78. }
  79. func (m *Account) Reset() { *m = Account{} }
  80. func (m *Account) String() string { return proto.CompactTextString(m) }
  81. func (*Account) ProtoMessage() {}
  82. func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  83. func (m *Account) GetPassword() string {
  84. if m != nil {
  85. return m.Password
  86. }
  87. return ""
  88. }
  89. func (m *Account) GetCipherType() CipherType {
  90. if m != nil {
  91. return m.CipherType
  92. }
  93. return CipherType_UNKNOWN
  94. }
  95. func (m *Account) GetOta() Account_OneTimeAuth {
  96. if m != nil {
  97. return m.Ota
  98. }
  99. return Account_Auto
  100. }
  101. type ServerConfig struct {
  102. UdpEnabled bool `protobuf:"varint,1,opt,name=udp_enabled,json=udpEnabled" json:"udp_enabled,omitempty"`
  103. User *v2ray_core_common_protocol.User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
  104. }
  105. func (m *ServerConfig) Reset() { *m = ServerConfig{} }
  106. func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
  107. func (*ServerConfig) ProtoMessage() {}
  108. func (*ServerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  109. func (m *ServerConfig) GetUdpEnabled() bool {
  110. if m != nil {
  111. return m.UdpEnabled
  112. }
  113. return false
  114. }
  115. func (m *ServerConfig) GetUser() *v2ray_core_common_protocol.User {
  116. if m != nil {
  117. return m.User
  118. }
  119. return nil
  120. }
  121. type ClientConfig struct {
  122. Server []*v2ray_core_common_protocol1.ServerEndpoint `protobuf:"bytes,1,rep,name=server" json:"server,omitempty"`
  123. }
  124. func (m *ClientConfig) Reset() { *m = ClientConfig{} }
  125. func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
  126. func (*ClientConfig) ProtoMessage() {}
  127. func (*ClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  128. func (m *ClientConfig) GetServer() []*v2ray_core_common_protocol1.ServerEndpoint {
  129. if m != nil {
  130. return m.Server
  131. }
  132. return nil
  133. }
  134. func init() {
  135. proto.RegisterType((*Account)(nil), "v2ray.core.proxy.shadowsocks.Account")
  136. proto.RegisterType((*ServerConfig)(nil), "v2ray.core.proxy.shadowsocks.ServerConfig")
  137. proto.RegisterType((*ClientConfig)(nil), "v2ray.core.proxy.shadowsocks.ClientConfig")
  138. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.CipherType", CipherType_name, CipherType_value)
  139. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.Account_OneTimeAuth", Account_OneTimeAuth_name, Account_OneTimeAuth_value)
  140. }
  141. func init() { proto.RegisterFile("v2ray.com/core/proxy/shadowsocks/config.proto", fileDescriptor0) }
  142. var fileDescriptor0 = []byte{
  143. // 477 bytes of a gzipped FileDescriptorProto
  144. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x51, 0x8f, 0x93, 0x40,
  145. 0x14, 0x85, 0x97, 0xb6, 0xb6, 0xf5, 0x52, 0x95, 0x9d, 0xc4, 0xa4, 0x69, 0x36, 0xb1, 0xe9, 0x53,
  146. 0xdd, 0xc4, 0xa1, 0x65, 0x5d, 0xe3, 0x2b, 0x45, 0xd6, 0xdd, 0xa8, 0xb4, 0xa1, 0x5d, 0x8d, 0xbe,
  147. 0x10, 0x76, 0x18, 0x2d, 0xb1, 0x30, 0x93, 0x19, 0xd8, 0x95, 0x5f, 0xe3, 0xbb, 0xff, 0xcc, 0x7f,
  148. 0x61, 0x18, 0xda, 0x2e, 0xf1, 0xa1, 0xfb, 0xc6, 0xbd, 0x9c, 0x73, 0x38, 0xf7, 0x03, 0x5e, 0xdd,
  149. 0x5a, 0x22, 0x2c, 0x30, 0x61, 0x89, 0x49, 0x98, 0xa0, 0x26, 0x17, 0xec, 0x57, 0x61, 0xca, 0x75,
  150. 0x18, 0xb1, 0x3b, 0xc9, 0xc8, 0x4f, 0x69, 0x12, 0x96, 0x7e, 0x8f, 0x7f, 0x60, 0x2e, 0x58, 0xc6,
  151. 0xd0, 0xc9, 0x4e, 0x2e, 0x28, 0x56, 0x52, 0x5c, 0x93, 0x0e, 0x5e, 0xfe, 0x17, 0x46, 0x58, 0x92,
  152. 0xb0, 0xd4, 0x54, 0x56, 0xc2, 0x36, 0x66, 0x2e, 0xa9, 0xa8, 0x82, 0x06, 0x93, 0x07, 0xa4, 0x92,
  153. 0x8a, 0x5b, 0x2a, 0x02, 0xc9, 0x29, 0xa9, 0x1c, 0xa3, 0xbf, 0x1a, 0x74, 0x6c, 0x42, 0x58, 0x9e,
  154. 0x66, 0x68, 0x00, 0x5d, 0x1e, 0x4a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3, 0xf4, 0xb7, 0x06, 0x70, 0x8f, 0xb3, 0x3c, 0xeb, 0xda, 0xfb, 0xe0, 0xcd,
  166. 0xbf, 0x78, 0xc6, 0x11, 0x7a, 0x06, 0xba, 0xed, 0x2e, 0x83, 0xa9, 0xf5, 0x36, 0x70, 0x2e, 0x66,
  167. 0x86, 0xb6, 0x5b, 0x58, 0xe7, 0x6f, 0xd4, 0xa2, 0x51, 0x32, 0x71, 0x2e, 0x6d, 0xe7, 0xd2, 0xb6,
  168. 0x26, 0x46, 0x13, 0x1d, 0xc3, 0x93, 0xdd, 0x14, 0x5c, 0xb9, 0xab, 0x0b, 0xa3, 0x55, 0x8f, 0x78,
  169. 0xef, 0x7c, 0x32, 0x1e, 0xd5, 0x23, 0xca, 0x45, 0x1b, 0x3d, 0x87, 0xe3, 0xbd, 0x69, 0x31, 0xff,
  170. 0xf8, 0x75, 0x7a, 0x36, 0x39, 0x37, 0x3a, 0x25, 0x77, 0x6f, 0xee, 0xb9, 0x46, 0x77, 0xb6, 0x80,
  171. 0x21, 0x61, 0xc9, 0xc1, 0xbf, 0xb9, 0xd0, 0xbe, 0xe9, 0xb5, 0xf1, 0x4f, 0xe3, 0xe4, 0xb3, 0xe5,
  172. 0x87, 0x05, 0x76, 0x4a, 0xf5, 0x42, 0xa9, 0x97, 0xf7, 0xaf, 0x6f, 0xda, 0x0a, 0xca, 0xd9, 0xbf,
  173. 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0xd5, 0x9f, 0x8c, 0x4d, 0x03, 0x00, 0x00,
  174. }