config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. package shadowsocks
  2. import (
  3. fmt "fmt"
  4. proto "github.com/golang/protobuf/proto"
  5. math "math"
  6. net "v2ray.com/core/common/net"
  7. protocol "v2ray.com/core/common/protocol"
  8. )
  9. // Reference imports to suppress errors if they are not otherwise used.
  10. var _ = proto.Marshal
  11. var _ = fmt.Errorf
  12. var _ = math.Inf
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the proto package it is being compiled against.
  15. // A compilation error at this line likely means your copy of the
  16. // proto package needs to be updated.
  17. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  18. type CipherType int32
  19. const (
  20. CipherType_UNKNOWN CipherType = 0
  21. CipherType_AES_128_CFB CipherType = 1
  22. CipherType_AES_256_CFB CipherType = 2
  23. CipherType_CHACHA20 CipherType = 3
  24. CipherType_CHACHA20_IETF CipherType = 4
  25. CipherType_AES_128_GCM CipherType = 5
  26. CipherType_AES_256_GCM CipherType = 6
  27. CipherType_CHACHA20_POLY1305 CipherType = 7
  28. CipherType_NONE CipherType = 8
  29. )
  30. var CipherType_name = map[int32]string{
  31. 0: "UNKNOWN",
  32. 1: "AES_128_CFB",
  33. 2: "AES_256_CFB",
  34. 3: "CHACHA20",
  35. 4: "CHACHA20_IETF",
  36. 5: "AES_128_GCM",
  37. 6: "AES_256_GCM",
  38. 7: "CHACHA20_POLY1305",
  39. 8: "NONE",
  40. }
  41. var CipherType_value = map[string]int32{
  42. "UNKNOWN": 0,
  43. "AES_128_CFB": 1,
  44. "AES_256_CFB": 2,
  45. "CHACHA20": 3,
  46. "CHACHA20_IETF": 4,
  47. "AES_128_GCM": 5,
  48. "AES_256_GCM": 6,
  49. "CHACHA20_POLY1305": 7,
  50. "NONE": 8,
  51. }
  52. func (x CipherType) String() string {
  53. return proto.EnumName(CipherType_name, int32(x))
  54. }
  55. func (CipherType) EnumDescriptor() ([]byte, []int) {
  56. return fileDescriptor_8d089a30c2106007, []int{0}
  57. }
  58. type Account_OneTimeAuth int32
  59. const (
  60. Account_Auto Account_OneTimeAuth = 0
  61. Account_Disabled Account_OneTimeAuth = 1
  62. Account_Enabled Account_OneTimeAuth = 2
  63. )
  64. var Account_OneTimeAuth_name = map[int32]string{
  65. 0: "Auto",
  66. 1: "Disabled",
  67. 2: "Enabled",
  68. }
  69. var Account_OneTimeAuth_value = map[string]int32{
  70. "Auto": 0,
  71. "Disabled": 1,
  72. "Enabled": 2,
  73. }
  74. func (x Account_OneTimeAuth) String() string {
  75. return proto.EnumName(Account_OneTimeAuth_name, int32(x))
  76. }
  77. func (Account_OneTimeAuth) EnumDescriptor() ([]byte, []int) {
  78. return fileDescriptor_8d089a30c2106007, []int{0, 0}
  79. }
  80. type Account struct {
  81. Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
  82. CipherType CipherType `protobuf:"varint,2,opt,name=cipher_type,json=cipherType,proto3,enum=v2ray.core.proxy.shadowsocks.CipherType" json:"cipher_type,omitempty"`
  83. Ota Account_OneTimeAuth `protobuf:"varint,3,opt,name=ota,proto3,enum=v2ray.core.proxy.shadowsocks.Account_OneTimeAuth" json:"ota,omitempty"`
  84. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  85. XXX_unrecognized []byte `json:"-"`
  86. XXX_sizecache int32 `json:"-"`
  87. }
  88. func (m *Account) Reset() { *m = Account{} }
  89. func (m *Account) String() string { return proto.CompactTextString(m) }
  90. func (*Account) ProtoMessage() {}
  91. func (*Account) Descriptor() ([]byte, []int) {
  92. return fileDescriptor_8d089a30c2106007, []int{0}
  93. }
  94. func (m *Account) XXX_Unmarshal(b []byte) error {
  95. return xxx_messageInfo_Account.Unmarshal(m, b)
  96. }
  97. func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  98. return xxx_messageInfo_Account.Marshal(b, m, deterministic)
  99. }
  100. func (m *Account) XXX_Merge(src proto.Message) {
  101. xxx_messageInfo_Account.Merge(m, src)
  102. }
  103. func (m *Account) XXX_Size() int {
  104. return xxx_messageInfo_Account.Size(m)
  105. }
  106. func (m *Account) XXX_DiscardUnknown() {
  107. xxx_messageInfo_Account.DiscardUnknown(m)
  108. }
  109. var xxx_messageInfo_Account proto.InternalMessageInfo
  110. func (m *Account) GetPassword() string {
  111. if m != nil {
  112. return m.Password
  113. }
  114. return ""
  115. }
  116. func (m *Account) GetCipherType() CipherType {
  117. if m != nil {
  118. return m.CipherType
  119. }
  120. return CipherType_UNKNOWN
  121. }
  122. func (m *Account) GetOta() Account_OneTimeAuth {
  123. if m != nil {
  124. return m.Ota
  125. }
  126. return Account_Auto
  127. }
  128. type ServerConfig struct {
  129. // UdpEnabled specified whether or not to enable UDP for Shadowsocks.
  130. // Deprecated. Use 'network' field.
  131. UdpEnabled bool `protobuf:"varint,1,opt,name=udp_enabled,json=udpEnabled,proto3" json:"udp_enabled,omitempty"` // Deprecated: Do not use.
  132. User *protocol.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
  133. Network []net.Network `protobuf:"varint,3,rep,packed,name=network,proto3,enum=v2ray.core.common.net.Network" json:"network,omitempty"`
  134. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  135. XXX_unrecognized []byte `json:"-"`
  136. XXX_sizecache int32 `json:"-"`
  137. }
  138. func (m *ServerConfig) Reset() { *m = ServerConfig{} }
  139. func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
  140. func (*ServerConfig) ProtoMessage() {}
  141. func (*ServerConfig) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_8d089a30c2106007, []int{1}
  143. }
  144. func (m *ServerConfig) XXX_Unmarshal(b []byte) error {
  145. return xxx_messageInfo_ServerConfig.Unmarshal(m, b)
  146. }
  147. func (m *ServerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. return xxx_messageInfo_ServerConfig.Marshal(b, m, deterministic)
  149. }
  150. func (m *ServerConfig) XXX_Merge(src proto.Message) {
  151. xxx_messageInfo_ServerConfig.Merge(m, src)
  152. }
  153. func (m *ServerConfig) XXX_Size() int {
  154. return xxx_messageInfo_ServerConfig.Size(m)
  155. }
  156. func (m *ServerConfig) XXX_DiscardUnknown() {
  157. xxx_messageInfo_ServerConfig.DiscardUnknown(m)
  158. }
  159. var xxx_messageInfo_ServerConfig proto.InternalMessageInfo
  160. // Deprecated: Do not use.
  161. func (m *ServerConfig) GetUdpEnabled() bool {
  162. if m != nil {
  163. return m.UdpEnabled
  164. }
  165. return false
  166. }
  167. func (m *ServerConfig) GetUser() *protocol.User {
  168. if m != nil {
  169. return m.User
  170. }
  171. return nil
  172. }
  173. func (m *ServerConfig) GetNetwork() []net.Network {
  174. if m != nil {
  175. return m.Network
  176. }
  177. return nil
  178. }
  179. type ClientConfig struct {
  180. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  181. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  182. XXX_unrecognized []byte `json:"-"`
  183. XXX_sizecache int32 `json:"-"`
  184. }
  185. func (m *ClientConfig) Reset() { *m = ClientConfig{} }
  186. func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
  187. func (*ClientConfig) ProtoMessage() {}
  188. func (*ClientConfig) Descriptor() ([]byte, []int) {
  189. return fileDescriptor_8d089a30c2106007, []int{2}
  190. }
  191. func (m *ClientConfig) XXX_Unmarshal(b []byte) error {
  192. return xxx_messageInfo_ClientConfig.Unmarshal(m, b)
  193. }
  194. func (m *ClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  195. return xxx_messageInfo_ClientConfig.Marshal(b, m, deterministic)
  196. }
  197. func (m *ClientConfig) XXX_Merge(src proto.Message) {
  198. xxx_messageInfo_ClientConfig.Merge(m, src)
  199. }
  200. func (m *ClientConfig) XXX_Size() int {
  201. return xxx_messageInfo_ClientConfig.Size(m)
  202. }
  203. func (m *ClientConfig) XXX_DiscardUnknown() {
  204. xxx_messageInfo_ClientConfig.DiscardUnknown(m)
  205. }
  206. var xxx_messageInfo_ClientConfig proto.InternalMessageInfo
  207. func (m *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  208. if m != nil {
  209. return m.Server
  210. }
  211. return nil
  212. }
  213. func init() {
  214. proto.RegisterType((*Account)(nil), "v2ray.core.proxy.shadowsocks.Account")
  215. proto.RegisterType((*ServerConfig)(nil), "v2ray.core.proxy.shadowsocks.ServerConfig")
  216. proto.RegisterType((*ClientConfig)(nil), "v2ray.core.proxy.shadowsocks.ClientConfig")
  217. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.CipherType", CipherType_name, CipherType_value)
  218. proto.RegisterEnum("v2ray.core.proxy.shadowsocks.Account_OneTimeAuth", Account_OneTimeAuth_name, Account_OneTimeAuth_value)
  219. }
  220. func init() {
  221. proto.RegisterFile("v2ray.com/core/proxy/shadowsocks/config.proto", fileDescriptor_8d089a30c2106007)
  222. }
  223. var fileDescriptor_8d089a30c2106007 = []byte{
  224. // 522 bytes of a gzipped FileDescriptorProto
  225. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6e, 0xd3, 0x4e,
  226. 0x10, 0xc6, 0xbb, 0x71, 0xff, 0x4d, 0xfe, 0xe3, 0x50, 0xdc, 0x95, 0x90, 0xac, 0xa8, 0x42, 0x56,
  227. 0x38, 0x10, 0x2a, 0xb1, 0x4e, 0x5c, 0x8a, 0x7a, 0x75, 0x4c, 0x4a, 0x2b, 0xc0, 0x89, 0x9c, 0x14,
  228. 0x04, 0x17, 0xcb, 0x5d, 0x2f, 0xc4, 0x6a, 0xe2, 0xb5, 0xd6, 0x76, 0x43, 0x9e, 0x86, 0x03, 0x37,
  229. 0xde, 0x8c, 0xb7, 0x40, 0x5e, 0x3b, 0xa9, 0x85, 0xaa, 0x70, 0x88, 0x94, 0x99, 0xfd, 0x7d, 0x9f,
  230. 0x66, 0xbe, 0x31, 0xbc, 0xbc, 0xb3, 0x44, 0xb0, 0x26, 0x94, 0x2f, 0x4d, 0xca, 0x05, 0x33, 0x13,
  231. 0xc1, 0xbf, 0xaf, 0xcd, 0x74, 0x1e, 0x84, 0x7c, 0x95, 0x72, 0x7a, 0x9b, 0x9a, 0x94, 0xc7, 0x5f,
  232. 0xa3, 0x6f, 0x24, 0x11, 0x3c, 0xe3, 0xf8, 0x78, 0x83, 0x0b, 0x46, 0x24, 0x4a, 0x6a, 0x68, 0xe7,
  233. 0xf9, 0x5f, 0x66, 0x94, 0x2f, 0x97, 0x3c, 0x36, 0x63, 0x96, 0x15, 0xbf, 0x15, 0x17, 0xb7, 0xa5,
  234. 0x4d, 0xe7, 0xc5, 0xc3, 0xa0, 0x7c, 0xa4, 0x7c, 0x61, 0xe6, 0x29, 0x13, 0x15, 0xda, 0xff, 0x07,
  235. 0x9a, 0x32, 0x71, 0xc7, 0x84, 0x9f, 0x26, 0x8c, 0x96, 0x8a, 0xee, 0x6f, 0x04, 0x4d, 0x9b, 0x52,
  236. 0x9e, 0xc7, 0x19, 0xee, 0x40, 0x2b, 0x09, 0xd2, 0x74, 0xc5, 0x45, 0xa8, 0x23, 0x03, 0xf5, 0xfe,
  237. 0xf7, 0xb6, 0x35, 0xbe, 0x02, 0x95, 0x46, 0xc9, 0x9c, 0x09, 0x3f, 0x5b, 0x27, 0x4c, 0x6f, 0x18,
  238. 0xa8, 0x77, 0x68, 0xf5, 0xc8, 0xae, 0x0d, 0x89, 0x23, 0x05, 0xb3, 0x75, 0xc2, 0x3c, 0xa0, 0xdb,
  239. 0xff, 0xd8, 0x01, 0x85, 0x67, 0x81, 0xae, 0x48, 0x8b, 0xc1, 0x6e, 0x8b, 0x6a, 0x34, 0x32, 0x8e,
  240. 0xd9, 0x2c, 0x5a, 0x32, 0x3b, 0xcf, 0xe6, 0x5e, 0xa1, 0xee, 0x5a, 0xa0, 0xd6, 0x7a, 0xb8, 0x05,
  241. 0xfb, 0x76, 0x9e, 0x71, 0x6d, 0x0f, 0xb7, 0xa1, 0xf5, 0x26, 0x4a, 0x83, 0x9b, 0x05, 0x0b, 0x35,
  242. 0x84, 0x55, 0x68, 0x8e, 0xe2, 0xb2, 0x68, 0x74, 0x7f, 0x22, 0x68, 0x4f, 0x65, 0x02, 0x8e, 0x3c,
  243. 0x13, 0x7e, 0x06, 0x6a, 0x1e, 0x26, 0x3e, 0x2b, 0x09, 0xb9, 0x73, 0x6b, 0xd8, 0xd0, 0x91, 0x07,
  244. 0x79, 0x98, 0x54, 0x3a, 0xfc, 0x0a, 0xf6, 0x8b, 0x84, 0xe5, 0xca, 0xaa, 0x65, 0xd4, 0xe7, 0x2d,
  245. 0xe3, 0x25, 0x9b, 0x78, 0xc9, 0x75, 0xca, 0x84, 0x27, 0x69, 0x7c, 0x0e, 0xcd, 0xea, 0x8a, 0xba,
  246. 0x62, 0x28, 0xbd, 0x43, 0xeb, 0xe9, 0x03, 0xc2, 0x98, 0x65, 0xc4, 0x2d, 0x29, 0x6f, 0x83, 0x77,
  247. 0x3d, 0x68, 0x3b, 0x8b, 0x88, 0xc5, 0x59, 0x35, 0xe4, 0x10, 0x0e, 0xca, 0xb3, 0xe9, 0xc8, 0x50,
  248. 0x7a, 0xaa, 0x75, 0xb2, 0x6b, 0x82, 0x72, 0xbd, 0x51, 0x1c, 0x26, 0x3c, 0x8a, 0x33, 0xaf, 0x52,
  249. 0x9e, 0xfc, 0x40, 0x00, 0xf7, 0xd7, 0x28, 0x52, 0xb9, 0x76, 0xdf, 0xb9, 0xe3, 0x4f, 0xae, 0xb6,
  250. 0x87, 0x1f, 0x83, 0x6a, 0x8f, 0xa6, 0xfe, 0xc0, 0x3a, 0xf7, 0x9d, 0x8b, 0xa1, 0x86, 0x36, 0x0d,
  251. 0xeb, 0xec, 0xb5, 0x6c, 0x34, 0x8a, 0x48, 0x9d, 0x4b, 0xdb, 0xb9, 0xb4, 0xad, 0xbe, 0xa6, 0xe0,
  252. 0x23, 0x78, 0xb4, 0xa9, 0xfc, 0xab, 0xd1, 0xec, 0x42, 0xdb, 0xaf, 0x5b, 0xbc, 0x75, 0x3e, 0x68,
  253. 0xff, 0xd5, 0x2d, 0x8a, 0xc6, 0x01, 0x7e, 0x02, 0x47, 0x5b, 0xd1, 0x64, 0xfc, 0xfe, 0xf3, 0xe0,
  254. 0xb4, 0x7f, 0xa6, 0x35, 0x8b, 0xb3, 0xb9, 0x63, 0x77, 0xa4, 0xb5, 0x86, 0x13, 0x30, 0x28, 0x5f,
  255. 0xee, 0xfc, 0x18, 0x26, 0xe8, 0x8b, 0x5a, 0x2b, 0x7f, 0x35, 0x8e, 0x3f, 0x5a, 0x5e, 0xb0, 0x26,
  256. 0x4e, 0x41, 0x4f, 0x24, 0x3d, 0xbd, 0x7f, 0xbe, 0x39, 0x90, 0xa1, 0x9c, 0xfe, 0x09, 0x00, 0x00,
  257. 0xff, 0xff, 0xdc, 0x7e, 0x6b, 0x61, 0xb5, 0x03, 0x00, 0x00,
  258. }