1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 17:25:27 -05:00

move common/log to app/log

This commit is contained in:
Darien Raymond
2017-02-01 21:35:40 +01:00
parent 57fc444b3c
commit f046f334cd
59 changed files with 290 additions and 154 deletions

View File

@@ -10,7 +10,7 @@ import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/signal"
"v2ray.com/core/proxy"

View File

@@ -12,7 +12,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/dice"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/retry"
"v2ray.com/core/common/signal"

View File

@@ -17,7 +17,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/common/signal"
"v2ray.com/core/proxy"

View File

@@ -10,7 +10,7 @@ import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/retry"

View File

@@ -12,7 +12,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/signal"

View File

@@ -8,7 +8,7 @@ import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/retry"

View File

@@ -12,7 +12,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/signal"

View File

@@ -2,7 +2,7 @@ package vmess
import (
"v2ray.com/core/common/dice"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/uuid"
)
@@ -42,3 +42,12 @@ func (v *Account) AsAccount() (protocol.Account, error) {
Security: v.SecuritySettings.AsSecurity(),
}, nil
}
func (v *Account) GetMultiplexingSettings() *Multiplexing {
if v.Mux == nil {
return &Multiplexing{
Enabled: false,
}
}
return v.Mux
}

View File

@@ -16,6 +16,22 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Multiplexing struct {
Enabled bool `protobuf:"varint,1,opt,name=enabled" json:"enabled,omitempty"`
}
func (m *Multiplexing) Reset() { *m = Multiplexing{} }
func (m *Multiplexing) String() string { return proto.CompactTextString(m) }
func (*Multiplexing) ProtoMessage() {}
func (*Multiplexing) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Multiplexing) GetEnabled() bool {
if m != nil {
return m.Enabled
}
return false
}
type Account struct {
// ID of the account, in the form of an UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
@@ -23,12 +39,13 @@ type Account struct {
AlterId uint32 `protobuf:"varint,2,opt,name=alter_id,json=alterId" json:"alter_id,omitempty"`
// Security settings. Only applies to client side.
SecuritySettings *v2ray_core_common_protocol.SecurityConfig `protobuf:"bytes,3,opt,name=security_settings,json=securitySettings" json:"security_settings,omitempty"`
Mux *Multiplexing `protobuf:"bytes,4,opt,name=mux" json:"mux,omitempty"`
}
func (m *Account) Reset() { *m = Account{} }
func (m *Account) String() string { return proto.CompactTextString(m) }
func (*Account) ProtoMessage() {}
func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Account) GetId() string {
if m != nil {
@@ -51,28 +68,39 @@ func (m *Account) GetSecuritySettings() *v2ray_core_common_protocol.SecurityConf
return nil
}
func (m *Account) GetMux() *Multiplexing {
if m != nil {
return m.Mux
}
return nil
}
func init() {
proto.RegisterType((*Multiplexing)(nil), "v2ray.core.proxy.vmess.Multiplexing")
proto.RegisterType((*Account)(nil), "v2ray.core.proxy.vmess.Account")
}
func init() { proto.RegisterFile("v2ray.com/core/proxy/vmess/account.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 250 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x8f, 0x4f, 0x4b, 0xc3, 0x30,
0x18, 0xc6, 0x49, 0x45, 0xa7, 0xf1, 0x0f, 0xda, 0xc3, 0xa8, 0x3b, 0x15, 0x4f, 0x45, 0xe4, 0x0d,
0xd4, 0x4f, 0xe0, 0x76, 0xd2, 0xd3, 0xe8, 0x60, 0x82, 0x97, 0x11, 0x93, 0x38, 0x03, 0x4b, 0xdf,
0xf1, 0x26, 0x1b, 0xf6, 0x43, 0xf8, 0x45, 0xfc, 0x94, 0xd2, 0xb4, 0x05, 0x91, 0x1d, 0x93, 0xfc,
0x9e, 0xdf, 0xf3, 0x84, 0x17, 0xfb, 0x92, 0x64, 0x03, 0x0a, 0x9d, 0x50, 0x48, 0x46, 0x6c, 0x09,
0xbf, 0x1a, 0xb1, 0x77, 0xc6, 0x7b, 0x21, 0x95, 0xc2, 0x5d, 0x1d, 0x60, 0x4b, 0x18, 0x30, 0x1d,
0x0f, 0x24, 0x19, 0x88, 0x14, 0x44, 0x6a, 0xf2, 0xf0, 0xcf, 0xa0, 0xd0, 0x39, 0xac, 0x45, 0x0c,
0x29, 0xdc, 0x88, 0x4f, 0x23, 0xb5, 0x21, 0xdf, 0x59, 0xee, 0xbe, 0x19, 0x1f, 0x3d, 0x75, 0xde,
0xf4, 0x8a, 0x27, 0x56, 0x67, 0x2c, 0x67, 0xc5, 0x59, 0x95, 0x58, 0x9d, 0xde, 0xf2, 0x53, 0xb9,
0x09, 0x86, 0x56, 0x56, 0x67, 0x49, 0xce, 0x8a, 0xcb, 0x6a, 0x14, 0xcf, 0xcf, 0x3a, 0x7d, 0xe5,
0x37, 0xde, 0xa8, 0x1d, 0xd9, 0xd0, 0xac, 0xbc, 0x09, 0xc1, 0xd6, 0x6b, 0x9f, 0x1d, 0xe5, 0xac,
0x38, 0x2f, 0xef, 0xe1, 0xcf, 0xb0, 0xae, 0x1c, 0x86, 0x72, 0x58, 0xf4, 0xa1, 0x19, 0xd6, 0x1f,
0x76, 0x5d, 0x5d, 0x0f, 0x92, 0x45, 0xef, 0x98, 0xbe, 0xf0, 0x89, 0x42, 0x07, 0x87, 0xff, 0x36,
0xbd, 0xe8, 0xa7, 0xce, 0x5b, 0xdf, 0xdb, 0x71, 0xbc, 0xfc, 0x49, 0xc6, 0xcb, 0xb2, 0x92, 0x0d,
0xcc, 0x5a, 0x7a, 0x1e, 0xe9, 0x65, 0xfb, 0xf0, 0x7e, 0x12, 0x6b, 0x1f, 0x7f, 0x03, 0x00, 0x00,
0xff, 0xff, 0x5d, 0x45, 0x43, 0x16, 0x54, 0x01, 0x00, 0x00,
// 295 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0xf3, 0x30,
0x1c, 0xc6, 0x69, 0xf7, 0xbe, 0x6e, 0xc6, 0x29, 0x9a, 0xc3, 0xa8, 0x3b, 0x95, 0xe1, 0xa1, 0x88,
0x24, 0x50, 0xc1, 0xbb, 0xdb, 0x49, 0x41, 0x18, 0x19, 0x4c, 0xf0, 0x32, 0xb2, 0x34, 0xd6, 0x40,
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dd, 0xa0, 0xdf, 0x5f, 0x03,
0x1d, 0x8f, 0x23, 0x6d, 0x60, 0xf9, 0x0c, 0xe6, 0x4c, 0xcb, 0x3f, 0xf8, 0xe5, 0xb4, 0x9f, 0xb8,
0x6e, 0x3d, 0xde, 0xfe, 0xfb, 0x8f, 0x9f, 0xe1, 0x6c, 0x9b, 0x12, 0xda, 0xa0, 0x55, 0x4b, 0xaf,
0x3d, 0xbd, 0x6d, 0x7f, 0xec, 0x4f, 0xbc, 0xee, 0xfd, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x90,
0xcb, 0xba, 0xdd, 0xb6, 0x01, 0x00, 0x00,
}

View File

@@ -8,6 +8,10 @@ option java_outer_classname = "AccountProto";
import "v2ray.com/core/common/protocol/headers.proto";
message Multiplexing {
bool enabled = 1;
}
message Account {
// ID of the account, in the form of an UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
string id = 1;
@@ -15,4 +19,6 @@ message Account {
uint32 alter_id = 2;
// Security settings. Only applies to client side.
v2ray.core.common.protocol.SecurityConfig security_settings = 3;
Multiplexing mux = 4;
}

View File

@@ -14,7 +14,7 @@ import (
"v2ray.com/core/common/crypto"
"v2ray.com/core/common/dice"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"

View File

@@ -12,7 +12,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/crypto"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"

View File

@@ -15,7 +15,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"

View File

@@ -10,7 +10,7 @@ import (
"v2ray.com/core/common/buf"
"v2ray.com/core/common/bufio"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/app/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/retry"