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

apply mux in inbound handler

This commit is contained in:
Darien Raymond
2017-04-02 14:06:20 +02:00
parent 3161c56aba
commit 1e06cf34d9
4 changed files with 28 additions and 38 deletions

View File

@@ -7,6 +7,7 @@ import (
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/proxyman/mux"
"v2ray.com/core/common/dice"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/proxy"
@@ -23,7 +24,7 @@ type DynamicInboundHandler struct {
workerMutex sync.RWMutex
worker []worker
lastRefresh time.Time
mux *mux
mux *mux.Server
}
func NewDynamicInboundHandler(ctx context.Context, tag string, receiverConfig *proxyman.ReceiverConfig, proxyConfig interface{}) (*DynamicInboundHandler, error) {
@@ -35,7 +36,7 @@ func NewDynamicInboundHandler(ctx context.Context, tag string, receiverConfig *p
proxyConfig: proxyConfig,
receiverConfig: receiverConfig,
portsInUse: make(map[v2net.Port]bool),
mux: newMux(ctx),
mux: mux.NewServer(ctx),
}
return h, nil