config.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.35.1
  4. // protoc v5.28.2
  5. // source: proxy/socks/config.proto
  6. package socks
  7. import (
  8. net "github.com/xtls/xray-core/common/net"
  9. protocol "github.com/xtls/xray-core/common/protocol"
  10. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  11. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12. reflect "reflect"
  13. sync "sync"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. // AuthType is the authentication type of Socks proxy.
  22. type AuthType int32
  23. const (
  24. // NO_AUTH is for anonymous authentication.
  25. AuthType_NO_AUTH AuthType = 0
  26. // PASSWORD is for username/password authentication.
  27. AuthType_PASSWORD AuthType = 1
  28. )
  29. // Enum value maps for AuthType.
  30. var (
  31. AuthType_name = map[int32]string{
  32. 0: "NO_AUTH",
  33. 1: "PASSWORD",
  34. }
  35. AuthType_value = map[string]int32{
  36. "NO_AUTH": 0,
  37. "PASSWORD": 1,
  38. }
  39. )
  40. func (x AuthType) Enum() *AuthType {
  41. p := new(AuthType)
  42. *p = x
  43. return p
  44. }
  45. func (x AuthType) String() string {
  46. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  47. }
  48. func (AuthType) Descriptor() protoreflect.EnumDescriptor {
  49. return file_proxy_socks_config_proto_enumTypes[0].Descriptor()
  50. }
  51. func (AuthType) Type() protoreflect.EnumType {
  52. return &file_proxy_socks_config_proto_enumTypes[0]
  53. }
  54. func (x AuthType) Number() protoreflect.EnumNumber {
  55. return protoreflect.EnumNumber(x)
  56. }
  57. // Deprecated: Use AuthType.Descriptor instead.
  58. func (AuthType) EnumDescriptor() ([]byte, []int) {
  59. return file_proxy_socks_config_proto_rawDescGZIP(), []int{0}
  60. }
  61. // Account represents a Socks account.
  62. type Account struct {
  63. state protoimpl.MessageState
  64. sizeCache protoimpl.SizeCache
  65. unknownFields protoimpl.UnknownFields
  66. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  67. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  68. }
  69. func (x *Account) Reset() {
  70. *x = Account{}
  71. mi := &file_proxy_socks_config_proto_msgTypes[0]
  72. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  73. ms.StoreMessageInfo(mi)
  74. }
  75. func (x *Account) String() string {
  76. return protoimpl.X.MessageStringOf(x)
  77. }
  78. func (*Account) ProtoMessage() {}
  79. func (x *Account) ProtoReflect() protoreflect.Message {
  80. mi := &file_proxy_socks_config_proto_msgTypes[0]
  81. if x != nil {
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. if ms.LoadMessageInfo() == nil {
  84. ms.StoreMessageInfo(mi)
  85. }
  86. return ms
  87. }
  88. return mi.MessageOf(x)
  89. }
  90. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  91. func (*Account) Descriptor() ([]byte, []int) {
  92. return file_proxy_socks_config_proto_rawDescGZIP(), []int{0}
  93. }
  94. func (x *Account) GetUsername() string {
  95. if x != nil {
  96. return x.Username
  97. }
  98. return ""
  99. }
  100. func (x *Account) GetPassword() string {
  101. if x != nil {
  102. return x.Password
  103. }
  104. return ""
  105. }
  106. // ServerConfig is the protobuf config for Socks server.
  107. type ServerConfig struct {
  108. state protoimpl.MessageState
  109. sizeCache protoimpl.SizeCache
  110. unknownFields protoimpl.UnknownFields
  111. AuthType AuthType `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=xray.proxy.socks.AuthType" json:"auth_type,omitempty"`
  112. 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"`
  113. Address *net.IPOrDomain `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
  114. UdpEnabled bool `protobuf:"varint,4,opt,name=udp_enabled,json=udpEnabled,proto3" json:"udp_enabled,omitempty"`
  115. UserLevel uint32 `protobuf:"varint,6,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
  116. }
  117. func (x *ServerConfig) Reset() {
  118. *x = ServerConfig{}
  119. mi := &file_proxy_socks_config_proto_msgTypes[1]
  120. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  121. ms.StoreMessageInfo(mi)
  122. }
  123. func (x *ServerConfig) String() string {
  124. return protoimpl.X.MessageStringOf(x)
  125. }
  126. func (*ServerConfig) ProtoMessage() {}
  127. func (x *ServerConfig) ProtoReflect() protoreflect.Message {
  128. mi := &file_proxy_socks_config_proto_msgTypes[1]
  129. if x != nil {
  130. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  131. if ms.LoadMessageInfo() == nil {
  132. ms.StoreMessageInfo(mi)
  133. }
  134. return ms
  135. }
  136. return mi.MessageOf(x)
  137. }
  138. // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
  139. func (*ServerConfig) Descriptor() ([]byte, []int) {
  140. return file_proxy_socks_config_proto_rawDescGZIP(), []int{1}
  141. }
  142. func (x *ServerConfig) GetAuthType() AuthType {
  143. if x != nil {
  144. return x.AuthType
  145. }
  146. return AuthType_NO_AUTH
  147. }
  148. func (x *ServerConfig) GetAccounts() map[string]string {
  149. if x != nil {
  150. return x.Accounts
  151. }
  152. return nil
  153. }
  154. func (x *ServerConfig) GetAddress() *net.IPOrDomain {
  155. if x != nil {
  156. return x.Address
  157. }
  158. return nil
  159. }
  160. func (x *ServerConfig) GetUdpEnabled() bool {
  161. if x != nil {
  162. return x.UdpEnabled
  163. }
  164. return false
  165. }
  166. func (x *ServerConfig) GetUserLevel() uint32 {
  167. if x != nil {
  168. return x.UserLevel
  169. }
  170. return 0
  171. }
  172. // ClientConfig is the protobuf config for Socks client.
  173. type ClientConfig struct {
  174. state protoimpl.MessageState
  175. sizeCache protoimpl.SizeCache
  176. unknownFields protoimpl.UnknownFields
  177. // Sever is a list of Socks server addresses.
  178. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  179. }
  180. func (x *ClientConfig) Reset() {
  181. *x = ClientConfig{}
  182. mi := &file_proxy_socks_config_proto_msgTypes[2]
  183. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  184. ms.StoreMessageInfo(mi)
  185. }
  186. func (x *ClientConfig) String() string {
  187. return protoimpl.X.MessageStringOf(x)
  188. }
  189. func (*ClientConfig) ProtoMessage() {}
  190. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  191. mi := &file_proxy_socks_config_proto_msgTypes[2]
  192. if x != nil {
  193. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  194. if ms.LoadMessageInfo() == nil {
  195. ms.StoreMessageInfo(mi)
  196. }
  197. return ms
  198. }
  199. return mi.MessageOf(x)
  200. }
  201. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  202. func (*ClientConfig) Descriptor() ([]byte, []int) {
  203. return file_proxy_socks_config_proto_rawDescGZIP(), []int{2}
  204. }
  205. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  206. if x != nil {
  207. return x.Server
  208. }
  209. return nil
  210. }
  211. var File_proxy_socks_config_proto protoreflect.FileDescriptor
  212. var file_proxy_socks_config_proto_rawDesc = []byte{
  213. 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x6f,
  214. 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x78, 0x72, 0x61, 0x79,
  215. 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x18, 0x63, 0x6f,
  216. 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
  217. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70,
  218. 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73,
  219. 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63,
  220. 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
  221. 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
  222. 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01,
  223. 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xc5, 0x02, 0x0a,
  224. 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a,
  225. 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
  226. 0x32, 0x1a, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f,
  227. 0x63, 0x6b, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x75,
  228. 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
  229. 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
  230. 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76,
  231. 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
  232. 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
  233. 0x12, 0x35, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
  234. 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
  235. 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07,
  236. 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x64, 0x70, 0x5f, 0x65,
  237. 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x64,
  238. 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72,
  239. 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73,
  240. 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75,
  241. 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
  242. 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
  243. 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  244. 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4c, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f,
  245. 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01,
  246. 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
  247. 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76,
  248. 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76,
  249. 0x65, 0x72, 0x2a, 0x25, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b,
  250. 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50,
  251. 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x42, 0x52, 0x0a, 0x14, 0x63, 0x6f, 0x6d,
  252. 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x63, 0x6b,
  253. 0x73, 0x50, 0x01, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
  254. 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70,
  255. 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, 0x10, 0x58, 0x72, 0x61,
  256. 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70,
  257. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  258. }
  259. var (
  260. file_proxy_socks_config_proto_rawDescOnce sync.Once
  261. file_proxy_socks_config_proto_rawDescData = file_proxy_socks_config_proto_rawDesc
  262. )
  263. func file_proxy_socks_config_proto_rawDescGZIP() []byte {
  264. file_proxy_socks_config_proto_rawDescOnce.Do(func() {
  265. file_proxy_socks_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_socks_config_proto_rawDescData)
  266. })
  267. return file_proxy_socks_config_proto_rawDescData
  268. }
  269. var file_proxy_socks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  270. var file_proxy_socks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  271. var file_proxy_socks_config_proto_goTypes = []any{
  272. (AuthType)(0), // 0: xray.proxy.socks.AuthType
  273. (*Account)(nil), // 1: xray.proxy.socks.Account
  274. (*ServerConfig)(nil), // 2: xray.proxy.socks.ServerConfig
  275. (*ClientConfig)(nil), // 3: xray.proxy.socks.ClientConfig
  276. nil, // 4: xray.proxy.socks.ServerConfig.AccountsEntry
  277. (*net.IPOrDomain)(nil), // 5: xray.common.net.IPOrDomain
  278. (*protocol.ServerEndpoint)(nil), // 6: xray.common.protocol.ServerEndpoint
  279. }
  280. var file_proxy_socks_config_proto_depIdxs = []int32{
  281. 0, // 0: xray.proxy.socks.ServerConfig.auth_type:type_name -> xray.proxy.socks.AuthType
  282. 4, // 1: xray.proxy.socks.ServerConfig.accounts:type_name -> xray.proxy.socks.ServerConfig.AccountsEntry
  283. 5, // 2: xray.proxy.socks.ServerConfig.address:type_name -> xray.common.net.IPOrDomain
  284. 6, // 3: xray.proxy.socks.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  285. 4, // [4:4] is the sub-list for method output_type
  286. 4, // [4:4] is the sub-list for method input_type
  287. 4, // [4:4] is the sub-list for extension type_name
  288. 4, // [4:4] is the sub-list for extension extendee
  289. 0, // [0:4] is the sub-list for field type_name
  290. }
  291. func init() { file_proxy_socks_config_proto_init() }
  292. func file_proxy_socks_config_proto_init() {
  293. if File_proxy_socks_config_proto != nil {
  294. return
  295. }
  296. type x struct{}
  297. out := protoimpl.TypeBuilder{
  298. File: protoimpl.DescBuilder{
  299. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  300. RawDescriptor: file_proxy_socks_config_proto_rawDesc,
  301. NumEnums: 1,
  302. NumMessages: 4,
  303. NumExtensions: 0,
  304. NumServices: 0,
  305. },
  306. GoTypes: file_proxy_socks_config_proto_goTypes,
  307. DependencyIndexes: file_proxy_socks_config_proto_depIdxs,
  308. EnumInfos: file_proxy_socks_config_proto_enumTypes,
  309. MessageInfos: file_proxy_socks_config_proto_msgTypes,
  310. }.Build()
  311. File_proxy_socks_config_proto = out.File
  312. file_proxy_socks_config_proto_rawDesc = nil
  313. file_proxy_socks_config_proto_goTypes = nil
  314. file_proxy_socks_config_proto_depIdxs = nil
  315. }