mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 18:17:52 -05:00
129 lines
5.5 KiB
Go
129 lines
5.5 KiB
Go
package core
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import v2ray_core_app_proxyman "v2ray.com/core/app/proxyman"
|
|
import v2ray_core_common_serial "v2ray.com/core/common/serial"
|
|
import v2ray_core_transport "v2ray.com/core/transport"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// Configuration serialization format.
|
|
type ConfigFormat int32
|
|
|
|
const (
|
|
ConfigFormat_Protobuf ConfigFormat = 0
|
|
ConfigFormat_JSON ConfigFormat = 1
|
|
)
|
|
|
|
var ConfigFormat_name = map[int32]string{
|
|
0: "Protobuf",
|
|
1: "JSON",
|
|
}
|
|
var ConfigFormat_value = map[string]int32{
|
|
"Protobuf": 0,
|
|
"JSON": 1,
|
|
}
|
|
|
|
func (x ConfigFormat) String() string {
|
|
return proto.EnumName(ConfigFormat_name, int32(x))
|
|
}
|
|
func (ConfigFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
// Master config of V2Ray. V2Ray Core takes this config as input and functions accordingly.
|
|
type Config struct {
|
|
// Inbound handler configurations. Must have at least one item.
|
|
Inbound []*v2ray_core_app_proxyman.InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"`
|
|
// Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
|
|
Outbound []*v2ray_core_app_proxyman.OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"`
|
|
// App configuration. Must be one in the app directory.
|
|
App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
|
|
// Transport settings.
|
|
Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
|
|
// Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
|
|
// V2Ray will ignore such config during initialization.
|
|
Extension []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"`
|
|
}
|
|
|
|
func (m *Config) Reset() { *m = Config{} }
|
|
func (m *Config) String() string { return proto.CompactTextString(m) }
|
|
func (*Config) ProtoMessage() {}
|
|
func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *Config) GetInbound() []*v2ray_core_app_proxyman.InboundHandlerConfig {
|
|
if m != nil {
|
|
return m.Inbound
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Config) GetOutbound() []*v2ray_core_app_proxyman.OutboundHandlerConfig {
|
|
if m != nil {
|
|
return m.Outbound
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Config) GetApp() []*v2ray_core_common_serial.TypedMessage {
|
|
if m != nil {
|
|
return m.App
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Config) GetTransport() *v2ray_core_transport.Config {
|
|
if m != nil {
|
|
return m.Transport
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Config) GetExtension() []*v2ray_core_common_serial.TypedMessage {
|
|
if m != nil {
|
|
return m.Extension
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Config)(nil), "v2ray.core.Config")
|
|
proto.RegisterEnum("v2ray.core.ConfigFormat", ConfigFormat_name, ConfigFormat_value)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 336 bytes of a gzipped FileDescriptorProto
|
|
0x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