github.com/xmplusdev/xray-core@v1.8.10/proxy/http/config.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.33.0
     4  // 	protoc        v4.23.1
     5  // source: proxy/http/config.proto
     6  
     7  package http
     8  
     9  import (
    10  	protocol "github.com/xmplusdev/xray-core/common/protocol"
    11  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    12  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    13  	reflect "reflect"
    14  	sync "sync"
    15  )
    16  
    17  const (
    18  	// Verify that this generated code is sufficiently up-to-date.
    19  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    20  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    21  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    22  )
    23  
    24  type Account struct {
    25  	state         protoimpl.MessageState
    26  	sizeCache     protoimpl.SizeCache
    27  	unknownFields protoimpl.UnknownFields
    28  
    29  	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
    30  	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
    31  }
    32  
    33  func (x *Account) Reset() {
    34  	*x = Account{}
    35  	if protoimpl.UnsafeEnabled {
    36  		mi := &file_proxy_http_config_proto_msgTypes[0]
    37  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    38  		ms.StoreMessageInfo(mi)
    39  	}
    40  }
    41  
    42  func (x *Account) String() string {
    43  	return protoimpl.X.MessageStringOf(x)
    44  }
    45  
    46  func (*Account) ProtoMessage() {}
    47  
    48  func (x *Account) ProtoReflect() protoreflect.Message {
    49  	mi := &file_proxy_http_config_proto_msgTypes[0]
    50  	if protoimpl.UnsafeEnabled && x != nil {
    51  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    52  		if ms.LoadMessageInfo() == nil {
    53  			ms.StoreMessageInfo(mi)
    54  		}
    55  		return ms
    56  	}
    57  	return mi.MessageOf(x)
    58  }
    59  
    60  // Deprecated: Use Account.ProtoReflect.Descriptor instead.
    61  func (*Account) Descriptor() ([]byte, []int) {
    62  	return file_proxy_http_config_proto_rawDescGZIP(), []int{0}
    63  }
    64  
    65  func (x *Account) GetUsername() string {
    66  	if x != nil {
    67  		return x.Username
    68  	}
    69  	return ""
    70  }
    71  
    72  func (x *Account) GetPassword() string {
    73  	if x != nil {
    74  		return x.Password
    75  	}
    76  	return ""
    77  }
    78  
    79  // Config for HTTP proxy server.
    80  type ServerConfig struct {
    81  	state         protoimpl.MessageState
    82  	sizeCache     protoimpl.SizeCache
    83  	unknownFields protoimpl.UnknownFields
    84  
    85  	// Deprecated: Marked as deprecated in proxy/http/config.proto.
    86  	Timeout          uint32            `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
    87  	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"`
    88  	AllowTransparent bool              `protobuf:"varint,3,opt,name=allow_transparent,json=allowTransparent,proto3" json:"allow_transparent,omitempty"`
    89  	UserLevel        uint32            `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
    90  }
    91  
    92  func (x *ServerConfig) Reset() {
    93  	*x = ServerConfig{}
    94  	if protoimpl.UnsafeEnabled {
    95  		mi := &file_proxy_http_config_proto_msgTypes[1]
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		ms.StoreMessageInfo(mi)
    98  	}
    99  }
   100  
   101  func (x *ServerConfig) String() string {
   102  	return protoimpl.X.MessageStringOf(x)
   103  }
   104  
   105  func (*ServerConfig) ProtoMessage() {}
   106  
   107  func (x *ServerConfig) ProtoReflect() protoreflect.Message {
   108  	mi := &file_proxy_http_config_proto_msgTypes[1]
   109  	if protoimpl.UnsafeEnabled && x != nil {
   110  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   111  		if ms.LoadMessageInfo() == nil {
   112  			ms.StoreMessageInfo(mi)
   113  		}
   114  		return ms
   115  	}
   116  	return mi.MessageOf(x)
   117  }
   118  
   119  // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
   120  func (*ServerConfig) Descriptor() ([]byte, []int) {
   121  	return file_proxy_http_config_proto_rawDescGZIP(), []int{1}
   122  }
   123  
   124  // Deprecated: Marked as deprecated in proxy/http/config.proto.
   125  func (x *ServerConfig) GetTimeout() uint32 {
   126  	if x != nil {
   127  		return x.Timeout
   128  	}
   129  	return 0
   130  }
   131  
   132  func (x *ServerConfig) GetAccounts() map[string]string {
   133  	if x != nil {
   134  		return x.Accounts
   135  	}
   136  	return nil
   137  }
   138  
   139  func (x *ServerConfig) GetAllowTransparent() bool {
   140  	if x != nil {
   141  		return x.AllowTransparent
   142  	}
   143  	return false
   144  }
   145  
   146  func (x *ServerConfig) GetUserLevel() uint32 {
   147  	if x != nil {
   148  		return x.UserLevel
   149  	}
   150  	return 0
   151  }
   152  
   153  type Header struct {
   154  	state         protoimpl.MessageState
   155  	sizeCache     protoimpl.SizeCache
   156  	unknownFields protoimpl.UnknownFields
   157  
   158  	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
   159  	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
   160  }
   161  
   162  func (x *Header) Reset() {
   163  	*x = Header{}
   164  	if protoimpl.UnsafeEnabled {
   165  		mi := &file_proxy_http_config_proto_msgTypes[2]
   166  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   167  		ms.StoreMessageInfo(mi)
   168  	}
   169  }
   170  
   171  func (x *Header) String() string {
   172  	return protoimpl.X.MessageStringOf(x)
   173  }
   174  
   175  func (*Header) ProtoMessage() {}
   176  
   177  func (x *Header) ProtoReflect() protoreflect.Message {
   178  	mi := &file_proxy_http_config_proto_msgTypes[2]
   179  	if protoimpl.UnsafeEnabled && x != nil {
   180  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   181  		if ms.LoadMessageInfo() == nil {
   182  			ms.StoreMessageInfo(mi)
   183  		}
   184  		return ms
   185  	}
   186  	return mi.MessageOf(x)
   187  }
   188  
   189  // Deprecated: Use Header.ProtoReflect.Descriptor instead.
   190  func (*Header) Descriptor() ([]byte, []int) {
   191  	return file_proxy_http_config_proto_rawDescGZIP(), []int{2}
   192  }
   193  
   194  func (x *Header) GetKey() string {
   195  	if x != nil {
   196  		return x.Key
   197  	}
   198  	return ""
   199  }
   200  
   201  func (x *Header) GetValue() string {
   202  	if x != nil {
   203  		return x.Value
   204  	}
   205  	return ""
   206  }
   207  
   208  // ClientConfig is the protobuf config for HTTP proxy client.
   209  type ClientConfig struct {
   210  	state         protoimpl.MessageState
   211  	sizeCache     protoimpl.SizeCache
   212  	unknownFields protoimpl.UnknownFields
   213  
   214  	// Sever is a list of HTTP server addresses.
   215  	Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
   216  	Header []*Header                  `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty"`
   217  }
   218  
   219  func (x *ClientConfig) Reset() {
   220  	*x = ClientConfig{}
   221  	if protoimpl.UnsafeEnabled {
   222  		mi := &file_proxy_http_config_proto_msgTypes[3]
   223  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   224  		ms.StoreMessageInfo(mi)
   225  	}
   226  }
   227  
   228  func (x *ClientConfig) String() string {
   229  	return protoimpl.X.MessageStringOf(x)
   230  }
   231  
   232  func (*ClientConfig) ProtoMessage() {}
   233  
   234  func (x *ClientConfig) ProtoReflect() protoreflect.Message {
   235  	mi := &file_proxy_http_config_proto_msgTypes[3]
   236  	if protoimpl.UnsafeEnabled && x != nil {
   237  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   238  		if ms.LoadMessageInfo() == nil {
   239  			ms.StoreMessageInfo(mi)
   240  		}
   241  		return ms
   242  	}
   243  	return mi.MessageOf(x)
   244  }
   245  
   246  // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
   247  func (*ClientConfig) Descriptor() ([]byte, []int) {
   248  	return file_proxy_http_config_proto_rawDescGZIP(), []int{3}
   249  }
   250  
   251  func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
   252  	if x != nil {
   253  		return x.Server
   254  	}
   255  	return nil
   256  }
   257  
   258  func (x *ClientConfig) GetHeader() []*Header {
   259  	if x != nil {
   260  		return x.Header
   261  	}
   262  	return nil
   263  }
   264  
   265  var File_proxy_http_config_proto protoreflect.FileDescriptor
   266  
   267  var file_proxy_http_config_proto_rawDesc = []byte{
   268  	0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e,
   269  	0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
   270  	0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d,
   271  	0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76,
   272  	0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a,
   273  	0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
   274  	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
   275  	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
   276  	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
   277  	0x22, 0xfe, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
   278  	0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01,
   279  	0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
   280  	0x47, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
   281  	0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
   282  	0x74, 0x74, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
   283  	0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
   284  	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f,
   285  	0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
   286  	0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70,
   287  	0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65,
   288  	0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c,
   289  	0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
   290  	0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
   291  	0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
   292  	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
   293  	0x01, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b,
   294  	0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
   295  	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
   296  	0x6c, 0x75, 0x65, 0x22, 0x7d, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
   297  	0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20,
   298  	0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
   299  	0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
   300  	0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
   301  	0x72, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28,
   302  	0x0b, 0x32, 0x17, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
   303  	0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64,
   304  	0x65, 0x72, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70,
   305  	0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74,
   306  	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61,
   307  	0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74,
   308  	0x70, 0xaa, 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48,
   309  	0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   310  }
   311  
   312  var (
   313  	file_proxy_http_config_proto_rawDescOnce sync.Once
   314  	file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc
   315  )
   316  
   317  func file_proxy_http_config_proto_rawDescGZIP() []byte {
   318  	file_proxy_http_config_proto_rawDescOnce.Do(func() {
   319  		file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData)
   320  	})
   321  	return file_proxy_http_config_proto_rawDescData
   322  }
   323  
   324  var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
   325  var file_proxy_http_config_proto_goTypes = []interface{}{
   326  	(*Account)(nil),                 // 0: xray.proxy.http.Account
   327  	(*ServerConfig)(nil),            // 1: xray.proxy.http.ServerConfig
   328  	(*Header)(nil),                  // 2: xray.proxy.http.Header
   329  	(*ClientConfig)(nil),            // 3: xray.proxy.http.ClientConfig
   330  	nil,                             // 4: xray.proxy.http.ServerConfig.AccountsEntry
   331  	(*protocol.ServerEndpoint)(nil), // 5: xray.common.protocol.ServerEndpoint
   332  }
   333  var file_proxy_http_config_proto_depIdxs = []int32{
   334  	4, // 0: xray.proxy.http.ServerConfig.accounts:type_name -> xray.proxy.http.ServerConfig.AccountsEntry
   335  	5, // 1: xray.proxy.http.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
   336  	2, // 2: xray.proxy.http.ClientConfig.header:type_name -> xray.proxy.http.Header
   337  	3, // [3:3] is the sub-list for method output_type
   338  	3, // [3:3] is the sub-list for method input_type
   339  	3, // [3:3] is the sub-list for extension type_name
   340  	3, // [3:3] is the sub-list for extension extendee
   341  	0, // [0:3] is the sub-list for field type_name
   342  }
   343  
   344  func init() { file_proxy_http_config_proto_init() }
   345  func file_proxy_http_config_proto_init() {
   346  	if File_proxy_http_config_proto != nil {
   347  		return
   348  	}
   349  	if !protoimpl.UnsafeEnabled {
   350  		file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   351  			switch v := v.(*Account); i {
   352  			case 0:
   353  				return &v.state
   354  			case 1:
   355  				return &v.sizeCache
   356  			case 2:
   357  				return &v.unknownFields
   358  			default:
   359  				return nil
   360  			}
   361  		}
   362  		file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   363  			switch v := v.(*ServerConfig); i {
   364  			case 0:
   365  				return &v.state
   366  			case 1:
   367  				return &v.sizeCache
   368  			case 2:
   369  				return &v.unknownFields
   370  			default:
   371  				return nil
   372  			}
   373  		}
   374  		file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   375  			switch v := v.(*Header); i {
   376  			case 0:
   377  				return &v.state
   378  			case 1:
   379  				return &v.sizeCache
   380  			case 2:
   381  				return &v.unknownFields
   382  			default:
   383  				return nil
   384  			}
   385  		}
   386  		file_proxy_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
   387  			switch v := v.(*ClientConfig); i {
   388  			case 0:
   389  				return &v.state
   390  			case 1:
   391  				return &v.sizeCache
   392  			case 2:
   393  				return &v.unknownFields
   394  			default:
   395  				return nil
   396  			}
   397  		}
   398  	}
   399  	type x struct{}
   400  	out := protoimpl.TypeBuilder{
   401  		File: protoimpl.DescBuilder{
   402  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   403  			RawDescriptor: file_proxy_http_config_proto_rawDesc,
   404  			NumEnums:      0,
   405  			NumMessages:   5,
   406  			NumExtensions: 0,
   407  			NumServices:   0,
   408  		},
   409  		GoTypes:           file_proxy_http_config_proto_goTypes,
   410  		DependencyIndexes: file_proxy_http_config_proto_depIdxs,
   411  		MessageInfos:      file_proxy_http_config_proto_msgTypes,
   412  	}.Build()
   413  	File_proxy_http_config_proto = out.File
   414  	file_proxy_http_config_proto_rawDesc = nil
   415  	file_proxy_http_config_proto_goTypes = nil
   416  	file_proxy_http_config_proto_depIdxs = nil
   417  }