config.pb.go 10.0 KB

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