Remove prefix 'V' in struct names

This commit is contained in:
V2Ray committed 2015-09-12 22:11:54 +02:00
1 parent cc3fdb6ef4
commit 51670b223d
27 files changed
+201 -201

No files matched your search

+2 -2
View File
@@ -19,11 +19,11 @@ var (
// SocksServer is a SOCKS 5 proxy server
type SocksServer struct {
accepting bool
vPoint *core.VPoint
vPoint *core.Point
config SocksConfig
}
func NewSocksServer(vp *core.VPoint, rawConfig []byte) *SocksServer {
func NewSocksServer(vp *core.Point, rawConfig []byte) *SocksServer {
server := new(SocksServer)
server.vPoint = vp
config, err := loadConfig(rawConfig)
+3 -3
View File
@@ -17,12 +17,12 @@ func TestSocksTcpConnect(t *testing.T) {
port := uint16(12384)
uuid := "2418d087-648d-4990-86e8-19dca1d006d3"
vid, err := core.UUIDToVID(uuid)
id, err := core.UUIDToID(uuid)
assert.Error(err).IsNil()
config := core.VConfig{
port,
[]core.VUser{core.VUser{vid}},
[]core.User{core.User{id}},
"",
[]core.VNext{}}
@@ -30,7 +30,7 @@ func TestSocksTcpConnect(t *testing.T) {
och.Data2Send = bytes.NewBuffer(make([]byte, 1024))
och.Data2Return = []byte("The data to be returned to socks server.")
vpoint, err := core.NewVPoint(&config, SocksServerFactory{}, och)
vpoint, err := core.NewPoint(&config, SocksServerFactory{}, och)
assert.Error(err).IsNil()
err = vpoint.Start()
+1 -1
View File
@@ -7,7 +7,7 @@ import (
type SocksServerFactory struct {
}
func (factory SocksServerFactory) Create(vp *core.VPoint, config []byte) (core.InboundConnectionHandler, error) {
func (factory SocksServerFactory) Create(vp *core.Point, config []byte) (core.InboundConnectionHandler, error) {
return NewSocksServer(vp, config), nil
}