| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.36.11
- // protoc v6.33.5
- // source: proxy/socks/config.proto
- package socks
- import (
- net "github.com/xtls/xray-core/common/net"
- protocol "github.com/xtls/xray-core/common/protocol"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- // AuthType is the authentication type of Socks proxy.
- type AuthType int32
- const (
- // NO_AUTH is for anonymous authentication.
- AuthType_NO_AUTH AuthType = 0
- // PASSWORD is for username/password authentication.
- AuthType_PASSWORD AuthType = 1
- )
- // Enum value maps for AuthType.
- var (
- AuthType_name = map[int32]string{
- 0: "NO_AUTH",
- 1: "PASSWORD",
- }
- AuthType_value = map[string]int32{
- "NO_AUTH": 0,
- "PASSWORD": 1,
- }
- )
- func (x AuthType) Enum() *AuthType {
- p := new(AuthType)
- *p = x
- return p
- }
- func (x AuthType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (AuthType) Descriptor() protoreflect.EnumDescriptor {
- return file_proxy_socks_config_proto_enumTypes[0].Descriptor()
- }
- func (AuthType) Type() protoreflect.EnumType {
- return &file_proxy_socks_config_proto_enumTypes[0]
- }
- func (x AuthType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use AuthType.Descriptor instead.
- func (AuthType) EnumDescriptor() ([]byte, []int) {
- return file_proxy_socks_config_proto_rawDescGZIP(), []int{0}
- }
- // Account represents a Socks account.
- type Account struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
- Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Account) Reset() {
- *x = Account{}
- mi := &file_proxy_socks_config_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Account) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Account) ProtoMessage() {}
- func (x *Account) ProtoReflect() protoreflect.Message {
- mi := &file_proxy_socks_config_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use Account.ProtoReflect.Descriptor instead.
- func (*Account) Descriptor() ([]byte, []int) {
- return file_proxy_socks_config_proto_rawDescGZIP(), []int{0}
- }
- func (x *Account) GetUsername() string {
- if x != nil {
- return x.Username
- }
- return ""
- }
- func (x *Account) GetPassword() string {
- if x != nil {
- return x.Password
- }
- return ""
- }
- // ServerConfig is the protobuf config for Socks server.
- type ServerConfig struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- AuthType AuthType `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=xray.proxy.socks.AuthType" json:"auth_type,omitempty"`
- Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Address *net.IPOrDomain `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
- UdpEnabled bool `protobuf:"varint,4,opt,name=udp_enabled,json=udpEnabled,proto3" json:"udp_enabled,omitempty"`
- UserLevel uint32 `protobuf:"varint,6,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ServerConfig) Reset() {
- *x = ServerConfig{}
- mi := &file_proxy_socks_config_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ServerConfig) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ServerConfig) ProtoMessage() {}
- func (x *ServerConfig) ProtoReflect() protoreflect.Message {
- mi := &file_proxy_socks_config_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
- func (*ServerConfig) Descriptor() ([]byte, []int) {
- return file_proxy_socks_config_proto_rawDescGZIP(), []int{1}
- }
- func (x *ServerConfig) GetAuthType() AuthType {
- if x != nil {
- return x.AuthType
- }
- return AuthType_NO_AUTH
- }
- func (x *ServerConfig) GetAccounts() map[string]string {
- if x != nil {
- return x.Accounts
- }
- return nil
- }
- func (x *ServerConfig) GetAddress() *net.IPOrDomain {
- if x != nil {
- return x.Address
- }
- return nil
- }
- func (x *ServerConfig) GetUdpEnabled() bool {
- if x != nil {
- return x.UdpEnabled
- }
- return false
- }
- func (x *ServerConfig) GetUserLevel() uint32 {
- if x != nil {
- return x.UserLevel
- }
- return 0
- }
- // ClientConfig is the protobuf config for Socks client.
- type ClientConfig struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Sever is a list of Socks server addresses.
- Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ClientConfig) Reset() {
- *x = ClientConfig{}
- mi := &file_proxy_socks_config_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ClientConfig) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ClientConfig) ProtoMessage() {}
- func (x *ClientConfig) ProtoReflect() protoreflect.Message {
- mi := &file_proxy_socks_config_proto_msgTypes[2]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
- func (*ClientConfig) Descriptor() ([]byte, []int) {
- return file_proxy_socks_config_proto_rawDescGZIP(), []int{2}
- }
- func (x *ClientConfig) GetServer() *protocol.ServerEndpoint {
- if x != nil {
- return x.Server
- }
- return nil
- }
- var File_proxy_socks_config_proto protoreflect.FileDescriptor
- const file_proxy_socks_config_proto_rawDesc = "" +
- "\n" +
- "\x18proxy/socks/config.proto\x12\x10xray.proxy.socks\x1a\x18common/net/address.proto\x1a!common/protocol/server_spec.proto\"A\n" +
- "\aAccount\x12\x1a\n" +
- "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
- "\bpassword\x18\x02 \x01(\tR\bpassword\"\xc5\x02\n" +
- "\fServerConfig\x127\n" +
- "\tauth_type\x18\x01 \x01(\x0e2\x1a.xray.proxy.socks.AuthTypeR\bauthType\x12H\n" +
- "\baccounts\x18\x02 \x03(\v2,.xray.proxy.socks.ServerConfig.AccountsEntryR\baccounts\x125\n" +
- "\aaddress\x18\x03 \x01(\v2\x1b.xray.common.net.IPOrDomainR\aaddress\x12\x1f\n" +
- "\vudp_enabled\x18\x04 \x01(\bR\n" +
- "udpEnabled\x12\x1d\n" +
- "\n" +
- "user_level\x18\x06 \x01(\rR\tuserLevel\x1a;\n" +
- "\rAccountsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"L\n" +
- "\fClientConfig\x12<\n" +
- "\x06server\x18\x01 \x01(\v2$.xray.common.protocol.ServerEndpointR\x06server*%\n" +
- "\bAuthType\x12\v\n" +
- "\aNO_AUTH\x10\x00\x12\f\n" +
- "\bPASSWORD\x10\x01BR\n" +
- "\x14com.xray.proxy.socksP\x01Z%github.com/xtls/xray-core/proxy/socks\xaa\x02\x10Xray.Proxy.Socksb\x06proto3"
- var (
- file_proxy_socks_config_proto_rawDescOnce sync.Once
- file_proxy_socks_config_proto_rawDescData []byte
- )
- func file_proxy_socks_config_proto_rawDescGZIP() []byte {
- file_proxy_socks_config_proto_rawDescOnce.Do(func() {
- file_proxy_socks_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_socks_config_proto_rawDesc), len(file_proxy_socks_config_proto_rawDesc)))
- })
- return file_proxy_socks_config_proto_rawDescData
- }
- var file_proxy_socks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
- var file_proxy_socks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
- var file_proxy_socks_config_proto_goTypes = []any{
- (AuthType)(0), // 0: xray.proxy.socks.AuthType
- (*Account)(nil), // 1: xray.proxy.socks.Account
- (*ServerConfig)(nil), // 2: xray.proxy.socks.ServerConfig
- (*ClientConfig)(nil), // 3: xray.proxy.socks.ClientConfig
- nil, // 4: xray.proxy.socks.ServerConfig.AccountsEntry
- (*net.IPOrDomain)(nil), // 5: xray.common.net.IPOrDomain
- (*protocol.ServerEndpoint)(nil), // 6: xray.common.protocol.ServerEndpoint
- }
- var file_proxy_socks_config_proto_depIdxs = []int32{
- 0, // 0: xray.proxy.socks.ServerConfig.auth_type:type_name -> xray.proxy.socks.AuthType
- 4, // 1: xray.proxy.socks.ServerConfig.accounts:type_name -> xray.proxy.socks.ServerConfig.AccountsEntry
- 5, // 2: xray.proxy.socks.ServerConfig.address:type_name -> xray.common.net.IPOrDomain
- 6, // 3: xray.proxy.socks.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
- 4, // [4:4] is the sub-list for method output_type
- 4, // [4:4] is the sub-list for method input_type
- 4, // [4:4] is the sub-list for extension type_name
- 4, // [4:4] is the sub-list for extension extendee
- 0, // [0:4] is the sub-list for field type_name
- }
- func init() { file_proxy_socks_config_proto_init() }
- func file_proxy_socks_config_proto_init() {
- if File_proxy_socks_config_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_socks_config_proto_rawDesc), len(file_proxy_socks_config_proto_rawDesc)),
- NumEnums: 1,
- NumMessages: 4,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_proxy_socks_config_proto_goTypes,
- DependencyIndexes: file_proxy_socks_config_proto_depIdxs,
- EnumInfos: file_proxy_socks_config_proto_enumTypes,
- MessageInfos: file_proxy_socks_config_proto_msgTypes,
- }.Build()
- File_proxy_socks_config_proto = out.File
- file_proxy_socks_config_proto_goTypes = nil
- file_proxy_socks_config_proto_depIdxs = nil
- }
|