|
|
|
package policy
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
type Second struct {
|
|
|
|
Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Second) Reset() { *m = Second{} }
|
|
|
|
func (m *Second) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Second) ProtoMessage() {}
|
|
|
|
func (*Second) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
|
|
|
|
func (m *Second) GetValue() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
type Policy struct {
|
|
|
|
Timeout *Policy_Timeout `protobuf:"bytes,1,opt,name=timeout" json:"timeout,omitempty"`
|
|
|
|
Stats *Policy_Stats `protobuf:"bytes,2,opt,name=stats" json:"stats,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy) Reset() { *m = Policy{} }
|
|
|
|
func (m *Policy) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Policy) ProtoMessage() {}
|
|
|
|
func (*Policy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
|
|
|
|
func (m *Policy) GetTimeout() *Policy_Timeout {
|
|
|
|
if m != nil {
|
|
|
|
return m.Timeout
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy) GetStats() *Policy_Stats {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stats
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Timeout is a message for timeout settings in various stages, in seconds.
|
|
|
|
type Policy_Timeout struct {
|
|
|
|
Handshake *Second `protobuf:"bytes,1,opt,name=handshake" json:"handshake,omitempty"`
|
|
|
|
ConnectionIdle *Second `protobuf:"bytes,2,opt,name=connection_idle,json=connectionIdle" json:"connection_idle,omitempty"`
|
|
|
|
UplinkOnly *Second `protobuf:"bytes,3,opt,name=uplink_only,json=uplinkOnly" json:"uplink_only,omitempty"`
|
|
|
|
DownlinkOnly *Second `protobuf:"bytes,4,opt,name=downlink_only,json=downlinkOnly" json:"downlink_only,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Timeout) Reset() { *m = Policy_Timeout{} }
|
|
|
|
func (m *Policy_Timeout) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Policy_Timeout) ProtoMessage() {}
|
|
|
|
func (*Policy_Timeout) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
|
|
|
|
|
|
|
|
func (m *Policy_Timeout) GetHandshake() *Second {
|
|
|
|
if m != nil {
|
|
|
|
return m.Handshake
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Timeout) GetConnectionIdle() *Second {
|
|
|
|
if m != nil {
|
|
|
|
return m.ConnectionIdle
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Timeout) GetUplinkOnly() *Second {
|
|
|
|
if m != nil {
|
|
|
|
return m.UplinkOnly
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Timeout) GetDownlinkOnly() *Second {
|
|
|
|
if m != nil {
|
|
|
|
return m.DownlinkOnly
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Policy_Stats struct {
|
|
|
|
UserUplink bool `protobuf:"varint,1,opt,name=user_uplink,json=userUplink" json:"user_uplink,omitempty"`
|
|
|
|
UserDownlink bool `protobuf:"varint,2,opt,name=user_downlink,json=userDownlink" json:"user_downlink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Stats) Reset() { *m = Policy_Stats{} }
|
|
|
|
func (m *Policy_Stats) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Policy_Stats) ProtoMessage() {}
|
|
|
|
func (*Policy_Stats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} }
|
|
|
|
|
|
|
|
func (m *Policy_Stats) GetUserUplink() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UserUplink
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Policy_Stats) GetUserDownlink() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.UserDownlink
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
Level map[uint32]*Policy `protobuf:"bytes,1,rep,name=level" json:"level,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
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{2} }
|
|
|
|
|
|
|
|
func (m *Config) GetLevel() map[uint32]*Policy {
|
|
|
|
if m != nil {
|
|
|
|
return m.Level
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Second)(nil), "v2ray.core.app.policy.Second")
|
|
|
|
proto.RegisterType((*Policy)(nil), "v2ray.core.app.policy.Policy")
|
|
|
|
proto.RegisterType((*Policy_Timeout)(nil), "v2ray.core.app.policy.Policy.Timeout")
|
|
|
|
proto.RegisterType((*Policy_Stats)(nil), "v2ray.core.app.policy.Policy.Stats")
|
|
|
|
proto.RegisterType((*Config)(nil), "v2ray.core.app.policy.Config")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("v2ray.com/core/app/policy/config.proto", fileDescriptor0) }
|
|
|
|
|
|
|
|
var fileDescriptor0 = []byte{
|
|
|
|
// 410 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x5d, 0xab, 0xd3, 0x30,
|
|
|
|
0x18, 0xc7, 0x69, 0x6b, 0x7b, 0x8e, 0x4f, 0xcf, 0x54, 0x82, 0x07, 0xea, 0x40, 0x3d, 0x6c, 0x28,
|
|
|
|
0xbb, 0x4a, 0xa1, 0xbb, 0xf1, 0x05, 0x27, 0xce, 0x17, 0x10, 0x14, 0x47, 0xe6, 0x0b, 0x78, 0x33,
|
|
|
|
0x62, 0x1a, 0x5d, 0x59, 0x96, 0x84, 0xbe, 0x4c, 0xfa, 0x35, 0xfc, 0x06, 0xde, 0xfa, 0xc9, 0xfc,
|
|
|
|
0x18, 0xd2, 0xa4, 0xa5, 0x37, 0xdb, 0xdc, 0x5d, 0xfa, 0xf0, 0xfb, 0xff, 0x78, 0x12, 0xfe, 0x85,
|
|
|
|
0x87, 0xbb, 0x24, 0xa7, 0x35, 0x66, 0x6a, 0x1b, 0x33, 0x95, 0xf3, 0x98, 0x6a, 0x1d, 0x6b, 0x25,
|
|
|
|
0x32, 0x56, 0xc7, 0x4c, 0xc9, 0xef, 0xd9, 0x0f, 0xac, 0x73, 0x55, 0x2a, 0x74, 0xd9, 0x71, 0x39,
|
|
|
|
0xc7, 0x54, 0x6b, 0x6c, 0x99, 0xd1, 0x3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