diff --git a/app/router/router.go b/app/router/router.go index 306021a62..137eaa91e 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -3,8 +3,8 @@ package router import ( "errors" - "github.com/v2ray/v2ray-core/app/point/config" v2net "github.com/v2ray/v2ray-core/common/net" + "github.com/v2ray/v2ray-core/shell/point/config" ) var ( diff --git a/app/router/rules/config/json/rules.go b/app/router/rules/config/json/rules.go index e0e704b65..3f936a765 100644 --- a/app/router/rules/config/json/rules.go +++ b/app/router/rules/config/json/rules.go @@ -1,8 +1,8 @@ package json import ( - "github.com/v2ray/v2ray-core/app/point/config" v2net "github.com/v2ray/v2ray-core/common/net" + "github.com/v2ray/v2ray-core/shell/point/config" ) type Rule struct { diff --git a/app/router/rules/config/rules.go b/app/router/rules/config/rules.go index 435f4fdf8..3ecb34b22 100644 --- a/app/router/rules/config/rules.go +++ b/app/router/rules/config/rules.go @@ -1,8 +1,8 @@ package config import ( - "github.com/v2ray/v2ray-core/app/point/config" v2net "github.com/v2ray/v2ray-core/common/net" + "github.com/v2ray/v2ray-core/shell/point/config" ) type Rule interface { diff --git a/app/router/rules/router.go b/app/router/rules/router.go index 5d372b601..432b24050 100644 --- a/app/router/rules/router.go +++ b/app/router/rules/router.go @@ -3,11 +3,11 @@ package rules import ( "errors" - pointconfig "github.com/v2ray/v2ray-core/app/point/config" "github.com/v2ray/v2ray-core/app/router" "github.com/v2ray/v2ray-core/app/router/rules/config" "github.com/v2ray/v2ray-core/app/router/rules/config/json" v2net "github.com/v2ray/v2ray-core/common/net" + pointconfig "github.com/v2ray/v2ray-core/shell/point/config" ) var ( diff --git a/proxy/dokodemo/dokodemo_test.go b/proxy/dokodemo/dokodemo_test.go index f01e71d32..bd570325c 100644 --- a/proxy/dokodemo/dokodemo_test.go +++ b/proxy/dokodemo/dokodemo_test.go @@ -4,12 +4,12 @@ import ( "net" "testing" - "github.com/v2ray/v2ray-core/app/point" - "github.com/v2ray/v2ray-core/app/point/config/testing/mocks" v2netjson "github.com/v2ray/v2ray-core/common/net/json" v2nettesting "github.com/v2ray/v2ray-core/common/net/testing" "github.com/v2ray/v2ray-core/proxy/dokodemo/config/json" _ "github.com/v2ray/v2ray-core/proxy/freedom" + "github.com/v2ray/v2ray-core/shell/point" + "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" "github.com/v2ray/v2ray-core/testing/servers/tcp" "github.com/v2ray/v2ray-core/testing/servers/udp" "github.com/v2ray/v2ray-core/testing/unit" diff --git a/proxy/freedom/freedom_test.go b/proxy/freedom/freedom_test.go index 58179895a..1c73e7afd 100644 --- a/proxy/freedom/freedom_test.go +++ b/proxy/freedom/freedom_test.go @@ -9,8 +9,6 @@ import ( "golang.org/x/net/proxy" - "github.com/v2ray/v2ray-core/app/point" - "github.com/v2ray/v2ray-core/app/point/config/testing/mocks" "github.com/v2ray/v2ray-core/common/alloc" v2net "github.com/v2ray/v2ray-core/common/net" v2nettesting "github.com/v2ray/v2ray-core/common/net/testing" @@ -18,6 +16,8 @@ import ( _ "github.com/v2ray/v2ray-core/proxy/socks" "github.com/v2ray/v2ray-core/proxy/socks/config/json" proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point" + "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" "github.com/v2ray/v2ray-core/testing/servers/tcp" "github.com/v2ray/v2ray-core/testing/servers/udp" "github.com/v2ray/v2ray-core/testing/unit" diff --git a/proxy/socks/socks_test.go b/proxy/socks/socks_test.go index af68f69c8..73ecc6e48 100644 --- a/proxy/socks/socks_test.go +++ b/proxy/socks/socks_test.go @@ -9,12 +9,12 @@ import ( "golang.org/x/net/proxy" - "github.com/v2ray/v2ray-core/app/point" - "github.com/v2ray/v2ray-core/app/point/config/testing/mocks" v2nettesting "github.com/v2ray/v2ray-core/common/net/testing" "github.com/v2ray/v2ray-core/proxy/common/connhandler" "github.com/v2ray/v2ray-core/proxy/socks/config/json" proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks" + "github.com/v2ray/v2ray-core/shell/point" + "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" "github.com/v2ray/v2ray-core/testing/unit" ) diff --git a/proxy/vmess/vmess_test.go b/proxy/vmess/vmess_test.go index cd7da02e8..271e88e39 100644 --- a/proxy/vmess/vmess_test.go +++ b/proxy/vmess/vmess_test.go @@ -4,14 +4,14 @@ import ( "bytes" "testing" - "github.com/v2ray/v2ray-core/app/point" - "github.com/v2ray/v2ray-core/app/point/config/testing/mocks" v2net "github.com/v2ray/v2ray-core/common/net" v2nettesting "github.com/v2ray/v2ray-core/common/net/testing" "github.com/v2ray/v2ray-core/proxy/common/connhandler" proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks" "github.com/v2ray/v2ray-core/proxy/vmess/config" "github.com/v2ray/v2ray-core/proxy/vmess/config/json" + "github.com/v2ray/v2ray-core/shell/point" + "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" "github.com/v2ray/v2ray-core/testing/unit" ) diff --git a/release/server/main.go b/release/server/main.go index 14d003c07..5a61b1bd3 100644 --- a/release/server/main.go +++ b/release/server/main.go @@ -7,12 +7,12 @@ import ( "path/filepath" "github.com/v2ray/v2ray-core" - "github.com/v2ray/v2ray-core/app/point" - jsonconf "github.com/v2ray/v2ray-core/app/point/config/json" _ "github.com/v2ray/v2ray-core/app/router/config/json" _ "github.com/v2ray/v2ray-core/app/router/rules" _ "github.com/v2ray/v2ray-core/app/router/rules/config/json" "github.com/v2ray/v2ray-core/common/log" + "github.com/v2ray/v2ray-core/shell/point" + jsonconf "github.com/v2ray/v2ray-core/shell/point/config/json" // The following are neccesary as they register handlers in their init functions. _ "github.com/v2ray/v2ray-core/proxy/blackhole" diff --git a/app/point/config/config.go b/shell/point/config/config.go similarity index 100% rename from app/point/config/config.go rename to shell/point/config/config.go diff --git a/app/point/config/errors.go b/shell/point/config/errors.go similarity index 100% rename from app/point/config/errors.go rename to shell/point/config/errors.go diff --git a/app/point/config/json/connection.go b/shell/point/config/json/connection.go similarity index 100% rename from app/point/config/json/connection.go rename to shell/point/config/json/connection.go diff --git a/app/point/config/json/inbound_detour.go b/shell/point/config/json/inbound_detour.go similarity index 100% rename from app/point/config/json/inbound_detour.go rename to shell/point/config/json/inbound_detour.go diff --git a/app/point/config/json/json.go b/shell/point/config/json/json.go similarity index 98% rename from app/point/config/json/json.go rename to shell/point/config/json/json.go index 554161f86..ba6dfd0e7 100644 --- a/app/point/config/json/json.go +++ b/shell/point/config/json/json.go @@ -5,11 +5,11 @@ import ( "io/ioutil" "os" - "github.com/v2ray/v2ray-core/app/point/config" routerconfig "github.com/v2ray/v2ray-core/app/router/config" routerconfigjson "github.com/v2ray/v2ray-core/app/router/config/json" "github.com/v2ray/v2ray-core/common/log" proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config" + "github.com/v2ray/v2ray-core/shell/point/config" ) // Config is the config for Point server. diff --git a/app/point/config/json/json_test.go b/shell/point/config/json/json_test.go similarity index 97% rename from app/point/config/json/json_test.go rename to shell/point/config/json/json_test.go index b7daa2d7c..e1d830583 100644 --- a/app/point/config/json/json_test.go +++ b/shell/point/config/json/json_test.go @@ -4,11 +4,11 @@ import ( "path/filepath" "testing" - "github.com/v2ray/v2ray-core/app/point/config/json" _ "github.com/v2ray/v2ray-core/proxy/dokodemo/config/json" _ "github.com/v2ray/v2ray-core/proxy/freedom/config/json" _ "github.com/v2ray/v2ray-core/proxy/socks/config/json" _ "github.com/v2ray/v2ray-core/proxy/vmess/config/json" + "github.com/v2ray/v2ray-core/shell/point/config/json" "github.com/v2ray/v2ray-core/testing/unit" ) diff --git a/app/point/config/json/log.go b/shell/point/config/json/log.go similarity index 100% rename from app/point/config/json/log.go rename to shell/point/config/json/log.go diff --git a/app/point/config/json/outbound_detour.go b/shell/point/config/json/outbound_detour.go similarity index 92% rename from app/point/config/json/outbound_detour.go rename to shell/point/config/json/outbound_detour.go index 8ffc20e9e..189978ab7 100644 --- a/app/point/config/json/outbound_detour.go +++ b/shell/point/config/json/outbound_detour.go @@ -3,8 +3,8 @@ package json import ( "encoding/json" - "github.com/v2ray/v2ray-core/app/point/config" proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config" + "github.com/v2ray/v2ray-core/shell/point/config" ) type OutboundDetourConfig struct { diff --git a/app/point/config/testing/mocks/config.go b/shell/point/config/testing/mocks/config.go similarity index 97% rename from app/point/config/testing/mocks/config.go rename to shell/point/config/testing/mocks/config.go index 33e2d5841..d1ae533a5 100644 --- a/app/point/config/testing/mocks/config.go +++ b/shell/point/config/testing/mocks/config.go @@ -1,9 +1,9 @@ package mocks import ( - "github.com/v2ray/v2ray-core/app/point/config" routerconfig "github.com/v2ray/v2ray-core/app/router/config" v2net "github.com/v2ray/v2ray-core/common/net" + "github.com/v2ray/v2ray-core/shell/point/config" ) type ConnectionConfig struct { diff --git a/app/point/inbound_detour.go b/shell/point/inbound_detour.go similarity index 96% rename from app/point/inbound_detour.go rename to shell/point/inbound_detour.go index 54d35a9b7..5639618a2 100644 --- a/app/point/inbound_detour.go +++ b/shell/point/inbound_detour.go @@ -1,10 +1,10 @@ package point import ( - "github.com/v2ray/v2ray-core/app/point/config" "github.com/v2ray/v2ray-core/common/log" "github.com/v2ray/v2ray-core/common/retry" "github.com/v2ray/v2ray-core/proxy/common/connhandler" + "github.com/v2ray/v2ray-core/shell/point/config" ) type InboundConnectionHandlerWithPort struct { diff --git a/app/point/point.go b/shell/point/point.go similarity index 98% rename from app/point/point.go rename to shell/point/point.go index 6d7301311..95879fa14 100644 --- a/app/point/point.go +++ b/shell/point/point.go @@ -1,12 +1,12 @@ package point import ( - "github.com/v2ray/v2ray-core/app/point/config" "github.com/v2ray/v2ray-core/app/router" "github.com/v2ray/v2ray-core/common/log" v2net "github.com/v2ray/v2ray-core/common/net" "github.com/v2ray/v2ray-core/common/retry" "github.com/v2ray/v2ray-core/proxy/common/connhandler" + "github.com/v2ray/v2ray-core/shell/point/config" "github.com/v2ray/v2ray-core/transport/ray" ) diff --git a/testing/scenarios/socks5_helper.go b/testing/scenarios/socks5_helper.go index 357e133ec..4e99117f9 100644 --- a/testing/scenarios/socks5_helper.go +++ b/testing/scenarios/socks5_helper.go @@ -3,8 +3,6 @@ package scenarios import ( "net" - "github.com/v2ray/v2ray-core/app/point" - "github.com/v2ray/v2ray-core/app/point/config/testing/mocks" v2net "github.com/v2ray/v2ray-core/common/net" v2nettesting "github.com/v2ray/v2ray-core/common/net/testing" _ "github.com/v2ray/v2ray-core/proxy/freedom" @@ -13,6 +11,8 @@ import ( _ "github.com/v2ray/v2ray-core/proxy/vmess" "github.com/v2ray/v2ray-core/proxy/vmess/config" vmessjson "github.com/v2ray/v2ray-core/proxy/vmess/config/json" + "github.com/v2ray/v2ray-core/shell/point" + "github.com/v2ray/v2ray-core/shell/point/config/testing/mocks" ) const (