Add network type to destination to be ready for UDP connection

This commit is contained in:
V2Ray
2015-09-20 16:03:12 +02:00
parent 5d5102de4c
commit b319704282
14 changed files with 94 additions and 34 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ func (handler *InboundConnectionHandler) Listen(port uint16) error {
return nil
}
func (handler *InboundConnectionHandler) Communicate(dest v2net.Address) error {
func (handler *InboundConnectionHandler) Communicate(dest *v2net.Destination) error {
ray := handler.Server.NewInboundConnectionAccepted(dest)
input := ray.InboundInput()
+2 -2
View File
@@ -10,7 +10,7 @@ import (
type OutboundConnectionHandler struct {
Data2Send *bytes.Buffer
Data2Return []byte
Destination v2net.Address
Destination *v2net.Destination
}
func (handler *OutboundConnectionHandler) Start(ray core.OutboundRay) error {
@@ -32,7 +32,7 @@ func (handler *OutboundConnectionHandler) Start(ray core.OutboundRay) error {
return nil
}
func (handler *OutboundConnectionHandler) Create(point *core.Point, config []byte, dest v2net.Address) (core.OutboundConnectionHandler, error) {
func (handler *OutboundConnectionHandler) Create(point *core.Point, config []byte, dest *v2net.Destination) (core.OutboundConnectionHandler, error) {
handler.Destination = dest
return handler, nil
}