Browse Source

Move point to shell

V2Ray 10 years ago
parent
commit
07582c5b60

+ 1 - 1
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 (

+ 1 - 1
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 {

+ 1 - 1
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 {

+ 1 - 1
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 (

+ 2 - 2
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"

+ 2 - 2
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"

+ 2 - 2
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"
 )
 

+ 2 - 2
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"
 )
 

+ 2 - 2
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"

+ 0 - 0
app/point/config/config.go → shell/point/config/config.go


+ 0 - 0
app/point/config/errors.go → shell/point/config/errors.go


+ 0 - 0
app/point/config/json/connection.go → shell/point/config/json/connection.go


+ 0 - 0
app/point/config/json/inbound_detour.go → shell/point/config/json/inbound_detour.go


+ 1 - 1
app/point/config/json/json.go → 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.

+ 1 - 1
app/point/config/json/json_test.go → 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"
 )

+ 0 - 0
app/point/config/json/log.go → shell/point/config/json/log.go


+ 1 - 1
app/point/config/json/outbound_detour.go → 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 {

+ 1 - 1
app/point/config/testing/mocks/config.go → 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 {

+ 1 - 1
app/point/inbound_detour.go → 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 {

+ 1 - 1
app/point/point.go → 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"
 )
 

+ 2 - 2
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 (