1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-25 19:45:38 -05:00

refactor dependency resolution

This commit is contained in:
Darien Raymond
2018-10-21 10:27:13 +02:00
parent d9cdfffc69
commit a5dcb0f13e
36 changed files with 356 additions and 730 deletions

View File

@@ -12,6 +12,7 @@ import (
"v2ray.com/core/common/net"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/session"
"v2ray.com/core/features/routing"
. "v2ray.com/ext/assert"
)
@@ -38,7 +39,7 @@ func TestSimpleRouter(t *testing.T) {
v, err := core.New(config)
common.Must(err)
r := v.Router()
r := v.GetFeature(routing.RouterType()).(routing.Router)
ctx := withOutbound(&session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)})
tag, err := r.PickRoute(ctx)