1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-03-20 21:25:20 -04:00

support using specific address

This commit is contained in:
v2ray
2016-06-04 00:38:22 +02:00
parent 6c31ff91e6
commit a4d76dc394
48 changed files with 412 additions and 301 deletions

View File

@@ -10,21 +10,19 @@ import (
)
type InboundConnectionHandler struct {
port v2net.Port
address v2net.Address
ListeningPort v2net.Port
ListeningAddress v2net.Address
PacketDispatcher dispatcher.PacketDispatcher
ConnInput io.Reader
ConnOutput io.Writer
}
func (this *InboundConnectionHandler) Listen(address v2net.Address, port v2net.Port) error {
this.port = port
this.address = address
func (this *InboundConnectionHandler) Start() error {
return nil
}
func (this *InboundConnectionHandler) Port() v2net.Port {
return this.port
return this.ListeningPort
}
func (this *InboundConnectionHandler) Close() {

View File

@@ -50,6 +50,6 @@ func (this *OutboundConnectionHandler) Dispatch(destination v2net.Destination, p
return nil
}
func (this *OutboundConnectionHandler) Create(space app.Space, config interface{}) (proxy.OutboundHandler, error) {
func (this *OutboundConnectionHandler) Create(space app.Space, config interface{}, sendThrough v2net.Address) (proxy.OutboundHandler, error) {
return this, nil
}