option to allow passive connection

This commit is contained in:
v2ray
2016-08-12 23:37:21 +02:00
parent a43ee2f1c2
commit bcd27ba36f
18 changed files with 76 additions and 47 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/v2ray/v2ray-core/app/dispatcher"
v2io "github.com/v2ray/v2ray-core/common/io"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/proxy"
)
type InboundConnectionHandler struct {
@@ -30,7 +31,9 @@ func (this *InboundConnectionHandler) Close() {
}
func (this *InboundConnectionHandler) Communicate(destination v2net.Destination) error {
ray := this.PacketDispatcher.DispatchToOutbound(destination)
ray := this.PacketDispatcher.DispatchToOutbound(&proxy.InboundHandlerMeta{
AllowPassiveConnection: false,
}, destination)
input := ray.InboundInput()
output := ray.InboundOutput()