mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
Move point to shell
This commit is contained in:
parent
cc61e88eca
commit
07582c5b60
@ -3,8 +3,8 @@ package router
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package json
|
package json
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Rule struct {
|
type Rule struct {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Rule interface {
|
type Rule interface {
|
||||||
|
@ -3,11 +3,11 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
pointconfig "github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
"github.com/v2ray/v2ray-core/app/router"
|
"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"
|
||||||
"github.com/v2ray/v2ray-core/app/router/rules/config/json"
|
"github.com/v2ray/v2ray-core/app/router/rules/config/json"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
pointconfig "github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -4,12 +4,12 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"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"
|
v2netjson "github.com/v2ray/v2ray-core/common/net/json"
|
||||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||||
"github.com/v2ray/v2ray-core/proxy/dokodemo/config/json"
|
"github.com/v2ray/v2ray-core/proxy/dokodemo/config/json"
|
||||||
_ "github.com/v2ray/v2ray-core/proxy/freedom"
|
_ "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/tcp"
|
||||||
"github.com/v2ray/v2ray-core/testing/servers/udp"
|
"github.com/v2ray/v2ray-core/testing/servers/udp"
|
||||||
"github.com/v2ray/v2ray-core/testing/unit"
|
"github.com/v2ray/v2ray-core/testing/unit"
|
||||||
|
@ -9,8 +9,6 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/net/proxy"
|
"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"
|
"github.com/v2ray/v2ray-core/common/alloc"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
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"
|
||||||
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
|
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
|
||||||
proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks"
|
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/tcp"
|
||||||
"github.com/v2ray/v2ray-core/testing/servers/udp"
|
"github.com/v2ray/v2ray-core/testing/servers/udp"
|
||||||
"github.com/v2ray/v2ray-core/testing/unit"
|
"github.com/v2ray/v2ray-core/testing/unit"
|
||||||
|
@ -9,12 +9,12 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/net/proxy"
|
"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"
|
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||||
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
||||||
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
|
"github.com/v2ray/v2ray-core/proxy/socks/config/json"
|
||||||
proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks"
|
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"
|
"github.com/v2ray/v2ray-core/testing/unit"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"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"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||||
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
||||||
proxymocks "github.com/v2ray/v2ray-core/proxy/testing/mocks"
|
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"
|
||||||
"github.com/v2ray/v2ray-core/proxy/vmess/config/json"
|
"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"
|
"github.com/v2ray/v2ray-core/testing/unit"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,12 +7,12 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core"
|
"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/config/json"
|
||||||
_ "github.com/v2ray/v2ray-core/app/router/rules"
|
_ "github.com/v2ray/v2ray-core/app/router/rules"
|
||||||
_ "github.com/v2ray/v2ray-core/app/router/rules/config/json"
|
_ "github.com/v2ray/v2ray-core/app/router/rules/config/json"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"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.
|
// The following are neccesary as they register handlers in their init functions.
|
||||||
_ "github.com/v2ray/v2ray-core/proxy/blackhole"
|
_ "github.com/v2ray/v2ray-core/proxy/blackhole"
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
routerconfig "github.com/v2ray/v2ray-core/app/router/config"
|
routerconfig "github.com/v2ray/v2ray-core/app/router/config"
|
||||||
routerconfigjson "github.com/v2ray/v2ray-core/app/router/config/json"
|
routerconfigjson "github.com/v2ray/v2ray-core/app/router/config/json"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"github.com/v2ray/v2ray-core/common/log"
|
||||||
proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
|
proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config is the config for Point server.
|
// Config is the config for Point server.
|
@ -4,11 +4,11 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"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/dokodemo/config/json"
|
||||||
_ "github.com/v2ray/v2ray-core/proxy/freedom/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/socks/config/json"
|
||||||
_ "github.com/v2ray/v2ray-core/proxy/vmess/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"
|
"github.com/v2ray/v2ray-core/testing/unit"
|
||||||
)
|
)
|
@ -3,8 +3,8 @@ package json
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
|
proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OutboundDetourConfig struct {
|
type OutboundDetourConfig struct {
|
@ -1,9 +1,9 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
routerconfig "github.com/v2ray/v2ray-core/app/router/config"
|
routerconfig "github.com/v2ray/v2ray-core/app/router/config"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConnectionConfig struct {
|
type ConnectionConfig struct {
|
@ -1,10 +1,10 @@
|
|||||||
package point
|
package point
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"github.com/v2ray/v2ray-core/common/log"
|
||||||
"github.com/v2ray/v2ray-core/common/retry"
|
"github.com/v2ray/v2ray-core/common/retry"
|
||||||
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InboundConnectionHandlerWithPort struct {
|
type InboundConnectionHandlerWithPort struct {
|
@ -1,12 +1,12 @@
|
|||||||
package point
|
package point
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app/point/config"
|
|
||||||
"github.com/v2ray/v2ray-core/app/router"
|
"github.com/v2ray/v2ray-core/app/router"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"github.com/v2ray/v2ray-core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/common/retry"
|
"github.com/v2ray/v2ray-core/common/retry"
|
||||||
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
||||||
|
"github.com/v2ray/v2ray-core/shell/point/config"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"github.com/v2ray/v2ray-core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
@ -3,8 +3,6 @@ package scenarios
|
|||||||
import (
|
import (
|
||||||
"net"
|
"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"
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||||
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
v2nettesting "github.com/v2ray/v2ray-core/common/net/testing"
|
||||||
_ "github.com/v2ray/v2ray-core/proxy/freedom"
|
_ "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"
|
||||||
"github.com/v2ray/v2ray-core/proxy/vmess/config"
|
"github.com/v2ray/v2ray-core/proxy/vmess/config"
|
||||||
vmessjson "github.com/v2ray/v2ray-core/proxy/vmess/config/json"
|
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 (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user