config.pb.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. package socks
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import net "v2ray.com/core/common/net"
  6. import protocol "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 AuthType int32
  17. const (
  18. AuthType_NO_AUTH AuthType = 0
  19. AuthType_PASSWORD AuthType = 1
  20. )
  21. var AuthType_name = map[int32]string{
  22. 0: "NO_AUTH",
  23. 1: "PASSWORD",
  24. }
  25. var AuthType_value = map[string]int32{
  26. "NO_AUTH": 0,
  27. "PASSWORD": 1,
  28. }
  29. func (x AuthType) String() string {
  30. return proto.EnumName(AuthType_name, int32(x))
  31. }
  32. func (AuthType) EnumDescriptor() ([]byte, []int) {
  33. return fileDescriptor_config_45beb3f2ac36b2a3, []int{0}
  34. }
  35. type Account struct {
  36. Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  37. Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
  38. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  39. XXX_unrecognized []byte `json:"-"`
  40. XXX_sizecache int32 `json:"-"`
  41. }
  42. func (m *Account) Reset() { *m = Account{} }
  43. func (m *Account) String() string { return proto.CompactTextString(m) }
  44. func (*Account) ProtoMessage() {}
  45. func (*Account) Descriptor() ([]byte, []int) {
  46. return fileDescriptor_config_45beb3f2ac36b2a3, []int{0}
  47. }
  48. func (m *Account) XXX_Unmarshal(b []byte) error {
  49. return xxx_messageInfo_Account.Unmarshal(m, b)
  50. }
  51. func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  52. return xxx_messageInfo_Account.Marshal(b, m, deterministic)
  53. }
  54. func (dst *Account) XXX_Merge(src proto.Message) {
  55. xxx_messageInfo_Account.Merge(dst, src)
  56. }
  57. func (m *Account) XXX_Size() int {
  58. return xxx_messageInfo_Account.Size(m)
  59. }
  60. func (m *Account) XXX_DiscardUnknown() {
  61. xxx_messageInfo_Account.DiscardUnknown(m)
  62. }
  63. var xxx_messageInfo_Account proto.InternalMessageInfo
  64. func (m *Account) GetUsername() string {
  65. if m != nil {
  66. return m.Username
  67. }
  68. return ""
  69. }
  70. func (m *Account) GetPassword() string {
  71. if m != nil {
  72. return m.Password
  73. }
  74. return ""
  75. }
  76. type ServerConfig struct {
  77. AuthType AuthType `protobuf:"varint,1,opt,name=auth_type,json=authType,enum=v2ray.core.proxy.socks.AuthType" json:"auth_type,omitempty"`
  78. Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  79. Address *net.IPOrDomain `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"`
  80. UdpEnabled bool `protobuf:"varint,4,opt,name=udp_enabled,json=udpEnabled" json:"udp_enabled,omitempty"`
  81. Timeout uint32 `protobuf:"varint,5,opt,name=timeout" json:"timeout,omitempty"` // Deprecated: Do not use.
  82. UserLevel uint32 `protobuf:"varint,6,opt,name=user_level,json=userLevel" json:"user_level,omitempty"`
  83. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  84. XXX_unrecognized []byte `json:"-"`
  85. XXX_sizecache int32 `json:"-"`
  86. }
  87. func (m *ServerConfig) Reset() { *m = ServerConfig{} }
  88. func (m *ServerConfig) String() string { return proto.CompactTextString(m) }
  89. func (*ServerConfig) ProtoMessage() {}
  90. func (*ServerConfig) Descriptor() ([]byte, []int) {
  91. return fileDescriptor_config_45beb3f2ac36b2a3, []int{1}
  92. }
  93. func (m *ServerConfig) XXX_Unmarshal(b []byte) error {
  94. return xxx_messageInfo_ServerConfig.Unmarshal(m, b)
  95. }
  96. func (m *ServerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  97. return xxx_messageInfo_ServerConfig.Marshal(b, m, deterministic)
  98. }
  99. func (dst *ServerConfig) XXX_Merge(src proto.Message) {
  100. xxx_messageInfo_ServerConfig.Merge(dst, src)
  101. }
  102. func (m *ServerConfig) XXX_Size() int {
  103. return xxx_messageInfo_ServerConfig.Size(m)
  104. }
  105. func (m *ServerConfig) XXX_DiscardUnknown() {
  106. xxx_messageInfo_ServerConfig.DiscardUnknown(m)
  107. }
  108. var xxx_messageInfo_ServerConfig proto.InternalMessageInfo
  109. func (m *ServerConfig) GetAuthType() AuthType {
  110. if m != nil {
  111. return m.AuthType
  112. }
  113. return AuthType_NO_AUTH
  114. }
  115. func (m *ServerConfig) GetAccounts() map[string]string {
  116. if m != nil {
  117. return m.Accounts
  118. }
  119. return nil
  120. }
  121. func (m *ServerConfig) GetAddress() *net.IPOrDomain {
  122. if m != nil {
  123. return m.Address
  124. }
  125. return nil
  126. }
  127. func (m *ServerConfig) GetUdpEnabled() bool {
  128. if m != nil {
  129. return m.UdpEnabled
  130. }
  131. return false
  132. }
  133. // Deprecated: Do not use.
  134. func (m *ServerConfig) GetTimeout() uint32 {
  135. if m != nil {
  136. return m.Timeout
  137. }
  138. return 0
  139. }
  140. func (m *ServerConfig) GetUserLevel() uint32 {
  141. if m != nil {
  142. return m.UserLevel
  143. }
  144. return 0
  145. }
  146. type ClientConfig struct {
  147. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server" json:"server,omitempty"`
  148. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  149. XXX_unrecognized []byte `json:"-"`
  150. XXX_sizecache int32 `json:"-"`
  151. }
  152. func (m *ClientConfig) Reset() { *m = ClientConfig{} }
  153. func (m *ClientConfig) String() string { return proto.CompactTextString(m) }
  154. func (*ClientConfig) ProtoMessage() {}
  155. func (*ClientConfig) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_config_45beb3f2ac36b2a3, []int{2}
  157. }
  158. func (m *ClientConfig) XXX_Unmarshal(b []byte) error {
  159. return xxx_messageInfo_ClientConfig.Unmarshal(m, b)
  160. }
  161. func (m *ClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. return xxx_messageInfo_ClientConfig.Marshal(b, m, deterministic)
  163. }
  164. func (dst *ClientConfig) XXX_Merge(src proto.Message) {
  165. xxx_messageInfo_ClientConfig.Merge(dst, src)
  166. }
  167. func (m *ClientConfig) XXX_Size() int {
  168. return xxx_messageInfo_ClientConfig.Size(m)
  169. }
  170. func (m *ClientConfig) XXX_DiscardUnknown() {
  171. xxx_messageInfo_ClientConfig.DiscardUnknown(m)
  172. }
  173. var xxx_messageInfo_ClientConfig proto.InternalMessageInfo
  174. func (m *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  175. if m != nil {
  176. return m.Server
  177. }
  178. return nil
  179. }
  180. func init() {
  181. proto.RegisterType((*Account)(nil), "v2ray.core.proxy.socks.Account")
  182. proto.RegisterType((*ServerConfig)(nil), "v2ray.core.proxy.socks.ServerConfig")
  183. proto.RegisterMapType((map[string]string)(nil), "v2ray.core.proxy.socks.ServerConfig.AccountsEntry")
  184. proto.RegisterType((*ClientConfig)(nil), "v2ray.core.proxy.socks.ClientConfig")
  185. proto.RegisterEnum("v2ray.core.proxy.socks.AuthType", AuthType_name, AuthType_value)
  186. }
  187. func init() {
  188. proto.RegisterFile("v2ray.com/core/proxy/socks/config.proto", fileDescriptor_config_45beb3f2ac36b2a3)
  189. }
  190. var fileDescriptor_config_45beb3f2ac36b2a3 = []byte{
  191. // 470 bytes of a gzipped FileDescriptorProto
  192. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0x5d, 0x8b, 0xd3, 0x40,
  193. 0x14, 0x75, 0xb2, 0xb6, 0x4d, 0x6f, 0xbb, 0x52, 0x06, 0x59, 0x42, 0x51, 0x8c, 0x05, 0xb1, 0xec,
  194. 0xc3, 0x44, 0xe2, 0x8b, 0xb8, 0x28, 0xb4, 0xdd, 0x82, 0x82, 0x6c, 0xcb, 0x74, 0x55, 0xf0, 0x25,
  195. 0xcc, 0x4e, 0x46, 0x37, 0x6c, 0x32, 0x13, 0x66, 0x26, 0xd5, 0xfc, 0x25, 0xff, 0x9f, 0xef, 0x92,
  196. 0xaf, 0x65, 0x95, 0xee, 0xdb, 0xfd, 0x38, 0xf7, 0xcc, 0x3d, 0xe7, 0x0e, 0xbc, 0xdc, 0x87, 0x9a,
  197. 0x95, 0x84, 0xab, 0x2c, 0xe0, 0x4a, 0x8b, 0x20, 0xd7, 0xea, 0x57, 0x19, 0x18, 0xc5, 0x6f, 0x4c,
  198. 0xc0, 0x95, 0xfc, 0x9e, 0xfc, 0x20, 0xb9, 0x56, 0x56, 0xe1, 0x93, 0x0e, 0xa8, 0x05, 0xa9, 0x41,
  199. 0xa4, 0x06, 0x4d, 0xff, 0x27, 0xe0, 0x2a, 0xcb, 0x94, 0x0c, 0xa4, 0xb0, 0x01, 0x8b, 0x63, 0x2d,
  200. 0x8c, 0x69, 0x08, 0xa6, 0xaf, 0x0e, 0x03, 0xeb, 0x26, 0x57, 0x69, 0x60, 0x84, 0xde, 0x0b, 0x1d,
  201. 0x99, 0x5c, 0xf0, 0x66, 0x62, 0xb6, 0x80, 0xc1, 0x82, 0x73, 0x55, 0x48, 0x8b, 0xa7, 0xe0, 0x16,
  202. 0x46, 0x68, 0xc9, 0x32, 0xe1, 0x21, 0x1f, 0xcd, 0x87, 0xf4, 0x36, 0xaf, 0x7a, 0x39, 0x33, 0xe6,
  203. 0xa7, 0xd2, 0xb1, 0xe7, 0x34, 0xbd, 0x2e, 0x9f, 0xfd, 0x71, 0x60, 0xbc, 0xab, 0x89, 0x57, 0xb5,
  204. 0x18, 0xfc, 0x0e, 0x86, 0xac, 0xb0, 0xd7, 0x91, 0x2d, 0xf3, 0x86, 0xe9, 0x51, 0xe8, 0x93, 0xc3,
  205. 0xd2, 0xc8, 0xa2, 0xb0, 0xd7, 0x97, 0x65, 0x2e, 0xa8, 0xcb, 0xda, 0x08, 0x5f, 0x80, 0xcb, 0x9a,
  206. 0x95, 0x8c, 0xe7, 0xf8, 0x47, 0xf3, 0x51, 0x18, 0xde, 0x37, 0x7d, 0xf7, 0x59, 0xd2, 0xea, 0x30,
  207. 0x6b, 0x69, 0x75, 0x49, 0x6f, 0x39, 0xf0, 0x19, 0x0c, 0x5a, 0x97, 0xbc, 0x23, 0x1f, 0xcd, 0x47,
  208. 0xe1, 0xf3, 0xbb, 0x74, 0x8d, 0x45, 0x44, 0x0a, 0x4b, 0x3e, 0x6e, 0x37, 0xfa, 0x5c, 0x65, 0x2c,
  209. 0x91, 0xb4, 0x9b, 0xc0, 0xcf, 0x60, 0x54, 0xc4, 0x79, 0x24, 0x24, 0xbb, 0x4a, 0x45, 0xec, 0x3d,
  210. 0xf4, 0xd1, 0xdc, 0xa5, 0x50, 0xc4, 0xf9, 0xba, 0xa9, 0xe0, 0x27, 0x30, 0xb0, 0x49, 0x26, 0x54,
  211. 0x61, 0xbd, 0x9e, 0x8f, 0xe6, 0xc7, 0x4b, 0xc7, 0x43, 0xb4, 0x2b, 0xe1, 0xa7, 0x00, 0x95, 0x87,
  212. 0x51, 0x2a, 0xf6, 0x22, 0xf5, 0xfa, 0x15, 0x80, 0x0e, 0xab, 0xca, 0xa7, 0xaa, 0x30, 0x3d, 0x83,
  213. 0xe3, 0x7f, 0xb6, 0xc6, 0x13, 0x38, 0xba, 0x11, 0x65, 0x6b, 0x7f, 0x15, 0xe2, 0xc7, 0xd0, 0xdb,
  214. 0xb3, 0xb4, 0x10, 0xad, 0xed, 0x4d, 0xf2, 0xd6, 0x79, 0x83, 0x66, 0x14, 0xc6, 0xab, 0x34, 0x11,
  215. 0xd2, 0xb6, 0xb6, 0x2f, 0xa1, 0xdf, 0xdc, 0xd7, 0x43, 0xb5, 0x6b, 0xa7, 0x07, 0x64, 0x76, 0x3f,
  216. 0xa1, 0x75, 0x6e, 0x2d, 0xe3, 0x5c, 0x25, 0xd2, 0xd2, 0x76, 0xf2, 0xf4, 0x05, 0xb8, 0xdd, 0x45,
  217. 0xf0, 0x08, 0x06, 0x17, 0x9b, 0x68, 0xf1, 0xf9, 0xf2, 0xc3, 0xe4, 0x01, 0x1e, 0x83, 0xbb, 0x5d,
  218. 0xec, 0x76, 0x5f, 0x37, 0xf4, 0x7c, 0x82, 0x96, 0xef, 0x61, 0xca, 0x55, 0x76, 0xcf, 0x55, 0xb6,
  219. 0xe8, 0x5b, 0xaf, 0x0e, 0x7e, 0x3b, 0x27, 0x5f, 0x42, 0xca, 0x4a, 0xb2, 0xaa, 0x10, 0xdb, 0x1a,
  220. 0xb1, 0xab, 0x1a, 0x57, 0xfd, 0x7a, 0x8f, 0xd7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x23, 0xac,
  221. 0x72, 0x71, 0x1a, 0x03, 0x00, 0x00,
  222. }