rename proxy/internal to proxy/registry

This commit is contained in:
v2ray committed 2016-08-17 23:30:15 +02:00
1 parent d9884b4010
commit 89a876a6d4
27 files changed
+65 -80

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ import (
"github.com/v2ray/v2ray-core/common/log"
"github.com/v2ray/v2ray-core/common/retry"
"github.com/v2ray/v2ray-core/proxy"
proxyrepo "github.com/v2ray/v2ray-core/proxy/repo"
proxyregistry "github.com/v2ray/v2ray-core/proxy/registry"
)
// Handler for inbound detour connections.
@@ -25,7 +25,7 @@ func NewInboundDetourHandlerAlways(space app.Space, config *InboundDetourConfig)
handler.ich = make([]proxy.InboundHandler, 0, ports.To-ports.From+1)
for i := ports.From; i <= ports.To; i++ {
ichConfig := config.Settings
ich, err := proxyrepo.CreateInboundHandler(config.Protocol, space, ichConfig, &proxy.InboundHandlerMeta{
ich, err := proxyregistry.CreateInboundHandler(config.Protocol, space, ichConfig, &proxy.InboundHandlerMeta{
Address: config.ListenOn,
Port: i,
Tag: config.Tag,
+3 -3
View File
@@ -10,7 +10,7 @@ import (
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/common/retry"
"github.com/v2ray/v2ray-core/proxy"
proxyrepo "github.com/v2ray/v2ray-core/proxy/repo"
proxyregistry "github.com/v2ray/v2ray-core/proxy/registry"
)
type InboundDetourHandlerDynamic struct {
@@ -32,7 +32,7 @@ func NewInboundDetourHandlerDynamic(space app.Space, config *InboundDetourConfig
handler.ichs = make([]proxy.InboundHandler, config.Allocation.Concurrency)
// To test configuration
ich, err := proxyrepo.CreateInboundHandler(config.Protocol, space, config.Settings, &proxy.InboundHandlerMeta{
ich, err := proxyregistry.CreateInboundHandler(config.Protocol, space, config.Settings, &proxy.InboundHandlerMeta{
Address: config.ListenOn,
Port: 0,
Tag: config.Tag,
@@ -103,7 +103,7 @@ func (this *InboundDetourHandlerDynamic) refresh() error {
for idx := range newIchs {
err := retry.Timed(5, 100).On(func() error {
port := this.pickUnusedPort()
ich, err := proxyrepo.CreateInboundHandler(config.Protocol, this.space, config.Settings, &proxy.InboundHandlerMeta{
ich, err := proxyregistry.CreateInboundHandler(config.Protocol, this.space, config.Settings, &proxy.InboundHandlerMeta{
Address: config.ListenOn, Port: port, Tag: config.Tag, StreamSettings: config.StreamSettings})
if err != nil {
delete(this.portsInUse, port)
+4 -4
View File
@@ -15,7 +15,7 @@ import (
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/common/retry"
"github.com/v2ray/v2ray-core/proxy"
proxyrepo "github.com/v2ray/v2ray-core/proxy/repo"
proxyregistry "github.com/v2ray/v2ray-core/proxy/registry"
)
// Point shell of V2Ray.
@@ -91,7 +91,7 @@ func NewPoint(pConfig *Config) (*Point, error) {
vpoint.space.BindApp(dispatcher.APP_ID, dispatchers.NewDefaultDispatcher(vpoint.space))
ichConfig := pConfig.InboundConfig.Settings
ich, err := proxyrepo.CreateInboundHandler(
ich, err := proxyregistry.CreateInboundHandler(
pConfig.InboundConfig.Protocol, vpoint.space, ichConfig, &proxy.InboundHandlerMeta{
Tag: "system.inbound",
Address: pConfig.InboundConfig.ListenOn,
@@ -106,7 +106,7 @@ func NewPoint(pConfig *Config) (*Point, error) {
vpoint.ich = ich
ochConfig := pConfig.OutboundConfig.Settings
och, err := proxyrepo.CreateOutboundHandler(
och, err := proxyregistry.CreateOutboundHandler(
pConfig.OutboundConfig.Protocol, vpoint.space, ochConfig, &proxy.OutboundHandlerMeta{
Tag: "system.outbound",
Address: pConfig.OutboundConfig.SendThrough,
@@ -156,7 +156,7 @@ func NewPoint(pConfig *Config) (*Point, error) {
if len(outboundDetours) > 0 {
vpoint.odh = make(map[string]proxy.OutboundHandler)
for _, detourConfig := range outboundDetours {
detourHandler, err := proxyrepo.CreateOutboundHandler(
detourHandler, err := proxyregistry.CreateOutboundHandler(
detourConfig.Protocol, vpoint.space, detourConfig.Settings, &proxy.OutboundHandlerMeta{
Tag: detourConfig.Tag,
Address: detourConfig.SendThrough,