mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-16 14:53:12 +00:00
Remove prefix 'V' in struct names
This commit is contained in:
1 parent
cc3fdb6ef4
commit
51670b223d
27 files changed
+201
-201
No files matched your search
+2
-2
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user