mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141 lines
5.8 KiB
141 lines
5.8 KiB
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"`
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// 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 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((*Config)(nil), "v2ray.core.app.policy.Config")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("v2ray.com/core/app/policy/config.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 349 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x4a, 0xeb, 0x40,
|
|
0x14, 0x86, 0x49, 0x7a, 0x9b, 0x72, 0x4f, 0x6f, 0xaf, 0x32, 0x58, 0x88, 0x05, 0xa5, 0x14, 0x94,
|
|
0xae, 0x26, 0x90, 0x6e, 0x44, 0xb1, 0x62, 0x45, 0x41, 0x10, 0x2c, 0x51, 0x14, 0xdc, 0x94, 0x71,
|
|
0x32, 0xda, 0xd0, 0xe9, 0x9c, 0x21, 0xa6, 0x95, 0xbc, 0x86, 0x6f, 0xe0, 0xd6, 0x87, 0xf2, 0x59,
|
|
0x24, 0x99, 0x84, 0x6c, 0x5a, 0xe9, 0x6e, 0x72, 0xf8, 0xfe, 0x8f, 0x43, 0xfe, 0x03, 0x87, 0x4b,
|
|
0x3f, 0x66, 0x29, 0xe5, 0x38, 0xf7, 0x38, 0xc6, 0xc2, 0x63, 0x5a, 0x7b, 0x1a, 0x65, 0xc4, 0x53,
|
|
0x8f, 0xa3, 0x7a, 0x89, 0x5e, 0xa9, 0x8e, 0x31, 0x41, 0xd2, 0x2e, 0xb9, 0x58, 0x50, 0xa6, 0x35,
|
|
0x35, 0x4c, 0x6f, 0x1f, 0x9c, 0x3b, 0xc1, 0x51, 0x85, 0x64, 0x07, 0xea, 0x4b, 0x26, 0x17, 0xc2,
|
|
0xb5, 0xba, 0x56, 0xbf, 0x15, 0x98, 0x8f, 0xde, 0xb7, 0x0d, 0xce, 0x38, 0x47, 0xc9, 0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