dynamic allocation of inbounds

This commit is contained in:
v2ray committed 2016-01-22 16:25:01 +01:00
1 parent f478db2b2e
commit 98d99a1fd0
6 files changed
+274 -8

No files matched your search

+7
View File
@@ -87,6 +87,13 @@ func NewPoint(pConfig *Config) (*Point, error) {
return nil, BadConfiguration
}
detourHandler = dh
case AllocationStrategyRandom:
dh, err := NewInboundDetourHandlerDynamic(vpoint.space.ForContext(detourConfig.Tag), detourConfig)
if err != nil {
log.Error("Point: Failed to create detour handler: ", err)
return nil, BadConfiguration
}
detourHandler = dh
default:
log.Error("Point: Unknown allocation strategy: ", allocConfig.Strategy)
return nil, BadConfiguration