Browse Source

add missing changes

pull/1435/head
Darien Raymond 6 years ago
parent
commit
3eac22c27d
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 8
      app/proxyman/inbound/worker.go
  2. 4
      app/proxyman/outbound/handler.go

8
app/proxyman/inbound/worker.go

@ -105,8 +105,8 @@ func (w *tcpWorker) Proxy() proxy.Inbound {
} }
func (w *tcpWorker) Start() error { func (w *tcpWorker) Start() error {
ctx := internet.ContextWithStreamSettings(context.Background(), w.stream) ctx := context.Background()
hub, err := internet.ListenTCP(ctx, w.address, w.port, func(conn internet.Connection) { hub, err := internet.ListenTCP(ctx, w.address, w.port, w.stream, func(conn internet.Connection) {
go w.callback(conn) go w.callback(conn)
}) })
if err != nil { if err != nil {
@ -342,8 +342,8 @@ func (w *udpWorker) clean() error {
func (w *udpWorker) Start() error { func (w *udpWorker) Start() error {
w.activeConn = make(map[connID]*udpConn, 16) w.activeConn = make(map[connID]*udpConn, 16)
ctx := internet.ContextWithStreamSettings(context.Background(), w.stream) ctx := context.Background()
h, err := udp.ListenUDP(ctx, w.address, w.port, udp.HubCapacity(256)) h, err := udp.ListenUDP(ctx, w.address, w.port, w.stream, udp.HubCapacity(256))
if err != nil { if err != nil {
return err return err
} }

4
app/proxyman/outbound/handler.go

@ -153,11 +153,9 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Conn
} }
outbound.Gateway = h.senderSettings.Via.AsAddress() outbound.Gateway = h.senderSettings.Via.AsAddress()
} }
ctx = internet.ContextWithStreamSettings(ctx, h.streamSettings)
} }
return internet.Dial(ctx, dest) return internet.Dial(ctx, dest, h.streamSettings)
} }
// GetOutbound implements proxy.GetOutbound. // GetOutbound implements proxy.GetOutbound.

Loading…
Cancel
Save