mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-25 21:36:13 -04:00
unified import path
This commit is contained in:
parent
6a878432dc
commit
07a86f549b
@ -3,11 +3,13 @@ language: go
|
|||||||
go:
|
go:
|
||||||
- 1.7
|
- 1.7
|
||||||
|
|
||||||
|
go_import_path: v2ray.com/core
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 5
|
depth: 5
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -tags json github.com/v2ray/v2ray-core/...
|
- go test -tags json v2ray.com/core/...
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- ./testing/coverage/coverall
|
- ./testing/coverage/coverall
|
||||||
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
@ -6,7 +6,7 @@
|
|||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"taskName": "build",
|
"taskName": "build",
|
||||||
"args": ["-tags", "json", "github.com/v2ray/v2ray-core/..."],
|
"args": ["-tags", "json", "v2ray.com/core/..."],
|
||||||
"isBuildCommand": true,
|
"isBuildCommand": true,
|
||||||
"problemMatcher": {
|
"problemMatcher": {
|
||||||
"owner": "go",
|
"owner": "go",
|
||||||
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"taskName": "test",
|
"taskName": "test",
|
||||||
"args": ["-tags", "json", "github.com/v2ray/v2ray-core/..."],
|
"args": ["-tags", "json", "v2ray.com/core/..."],
|
||||||
"isBuildCommand": false
|
"isBuildCommand": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
[2]: https://travis-ci.org/v2ray/v2ray-core "Travis-CI Build Status"
|
[2]: https://travis-ci.org/v2ray/v2ray-core "Travis-CI Build Status"
|
||||||
[3]: https://codecov.io/github/v2ray/v2ray-core/coverage.svg?branch=master "Coverage badge"
|
[3]: https://codecov.io/github/v2ray/v2ray-core/coverage.svg?branch=master "Coverage badge"
|
||||||
[4]: https://codecov.io/github/v2ray/v2ray-core?branch=master "Codecov Status"
|
[4]: https://codecov.io/github/v2ray/v2ray-core?branch=master "Codecov Status"
|
||||||
[5]: https://goreportcard.com/badge/github.com/v2ray/v2ray-core "Go Report badge"
|
[5]: https://goreportcard.com/badge/v2ray.com/core "Go Report badge"
|
||||||
[6]: https://goreportcard.com/report/github.com/v2ray/v2ray-core "Go Report"
|
[6]: https://goreportcard.com/report/v2ray.com/core "Go Report"
|
||||||
[7]: https://godoc.org/github.com/v2ray/v2ray-core?status.svg "GoDoc badge"
|
[7]: https://godoc.org/v2ray.com/core?status.svg "GoDoc badge"
|
||||||
[8]: https://godoc.org/github.com/v2ray/v2ray-core "GoDoc"
|
[8]: https://godoc.org/v2ray.com/core "GoDoc"
|
||||||
[9]: https://codebeat.co/badges/f2354ca8-3e24-463d-a2e3-159af73b2477 "Codebeat badge"
|
[9]: https://codebeat.co/badges/f2354ca8-3e24-463d-a2e3-159af73b2477 "Codebeat badge"
|
||||||
[10]: https://codebeat.co/projects/github-com-v2ray-v2ray-core "Codebeat"
|
[10]: https://codebeat.co/projects/github-com-v2ray-v2ray-core "Codebeat"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package dispatcher
|
package dispatcher
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package impl
|
package impl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/proxyman"
|
"v2ray.com/core/app/proxyman"
|
||||||
"github.com/v2ray/v2ray-core/app/router"
|
"v2ray.com/core/app/router"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DefaultDispatcher struct {
|
type DefaultDispatcher struct {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package testing
|
package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestPacketDispatcher struct {
|
type TestPacketDispatcher struct {
|
||||||
|
@ -3,7 +3,7 @@ package dns
|
|||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/dns"
|
. "v2ray.com/core/app/dns"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfigParsing(t *testing.T) {
|
func TestConfigParsing(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package dns
|
|||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,13 +5,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
"github.com/v2ray/v2ray-core/common/dice"
|
"v2ray.com/core/common/dice"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet/udp"
|
"v2ray.com/core/transport/internet/udp"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
@ -4,16 +4,16 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
dispatchers "github.com/v2ray/v2ray-core/app/dispatcher/impl"
|
dispatchers "v2ray.com/core/app/dispatcher/impl"
|
||||||
. "github.com/v2ray/v2ray-core/app/dns"
|
. "v2ray.com/core/app/dns"
|
||||||
"github.com/v2ray/v2ray-core/app/proxyman"
|
"v2ray.com/core/app/proxyman"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/proxy/freedom"
|
"v2ray.com/core/proxy/freedom"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDnsAdd(t *testing.T) {
|
func TestDnsAdd(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package proxyman
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConfigObjectCreator func([]byte) (interface{}, error)
|
type ConfigObjectCreator func([]byte) (interface{}, error)
|
||||||
|
@ -5,7 +5,7 @@ package router
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -65,7 +65,7 @@ func main() {
|
|||||||
|
|
||||||
fmt.Fprintln(file, "package rules")
|
fmt.Fprintln(file, "package rules")
|
||||||
fmt.Fprintln(file, "import (")
|
fmt.Fprintln(file, "import (")
|
||||||
fmt.Fprintln(file, "v2net \"github.com/v2ray/v2ray-core/common/net\"")
|
fmt.Fprintln(file, "v2net \"v2ray.com/core/common/net\"")
|
||||||
fmt.Fprintln(file, ")")
|
fmt.Fprintln(file, ")")
|
||||||
|
|
||||||
fmt.Fprintln(file, "var (")
|
fmt.Fprintln(file, "var (")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,7 +5,7 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseChinaIPRule(data []byte) (*Rule, error) {
|
func parseChinaIPRule(data []byte) (*Rule, error) {
|
||||||
|
@ -5,8 +5,8 @@ package rules_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestChinaIPJson(t *testing.T) {
|
func TestChinaIPJson(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeDestination(ip string) v2net.Destination {
|
func makeDestination(ip string) v2net.Destination {
|
||||||
|
@ -4,7 +4,7 @@ package rules
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseChinaSitesRule(data []byte) (*Rule, error) {
|
func parseChinaSitesRule(data []byte) (*Rule, error) {
|
||||||
|
@ -5,8 +5,8 @@ package rules_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestChinaSitesJson(t *testing.T) {
|
func TestChinaSitesJson(t *testing.T) {
|
||||||
|
@ -3,9 +3,9 @@ package rules_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeDomainDestination(domain string) v2net.Destination {
|
func makeDomainDestination(domain string) v2net.Destination {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Condition interface {
|
type Condition interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package rules
|
package rules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Rule struct {
|
type Rule struct {
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
router "github.com/v2ray/v2ray-core/app/router"
|
router "v2ray.com/core/app/router"
|
||||||
"github.com/v2ray/v2ray-core/common/collect"
|
"v2ray.com/core/common/collect"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JsonRule struct {
|
type JsonRule struct {
|
||||||
|
@ -5,9 +5,9 @@ package rules_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDomainRule(t *testing.T) {
|
func TestDomainRule(t *testing.T) {
|
||||||
|
@ -3,11 +3,11 @@ package rules
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dns"
|
"v2ray.com/core/app/dns"
|
||||||
"github.com/v2ray/v2ray-core/app/router"
|
"v2ray.com/core/app/router"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,15 +3,15 @@ package rules_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
dispatchers "github.com/v2ray/v2ray-core/app/dispatcher/impl"
|
dispatchers "v2ray.com/core/app/dispatcher/impl"
|
||||||
"github.com/v2ray/v2ray-core/app/dns"
|
"v2ray.com/core/app/dns"
|
||||||
"github.com/v2ray/v2ray-core/app/proxyman"
|
"v2ray.com/core/app/proxyman"
|
||||||
"github.com/v2ray/v2ray-core/app/router"
|
"v2ray.com/core/app/router"
|
||||||
. "github.com/v2ray/v2ray-core/app/router/rules"
|
. "v2ray.com/core/app/router/rules"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimpleRouter(t *testing.T) {
|
func TestSimpleRouter(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package app
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/serial"
|
"v2ray.com/core/common/serial"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,8 +3,8 @@ package alloc_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/alloc"
|
. "v2ray.com/core/common/alloc"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBufferClear(t *testing.T) {
|
func TestBufferClear(t *testing.T) {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/collect"
|
. "v2ray.com/core/common/collect"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStringListUnmarshalError(t *testing.T) {
|
func TestStringListUnmarshalError(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"crypto/cipher"
|
"crypto/cipher"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/crypto"
|
. "v2ray.com/core/common/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const benchSize = 1024 * 1024
|
const benchSize = 1024 * 1024
|
||||||
|
@ -3,7 +3,7 @@ package crypto
|
|||||||
import (
|
import (
|
||||||
"crypto/cipher"
|
"crypto/cipher"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/crypto/internal"
|
"v2ray.com/core/common/crypto/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV.
|
// NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV.
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/crypto"
|
. "v2ray.com/core/common/crypto"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func mustDecodeHex(s string) []byte {
|
func mustDecodeHex(s string) []byte {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"crypto/cipher"
|
"crypto/cipher"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CryptionReader struct {
|
type CryptionReader struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BufferedReader struct {
|
type BufferedReader struct {
|
||||||
|
@ -3,9 +3,9 @@ package io_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
. "github.com/v2ray/v2ray-core/common/io"
|
. "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBufferedReader(t *testing.T) {
|
func TestBufferedReader(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BufferedWriter struct {
|
type BufferedWriter struct {
|
||||||
|
@ -3,9 +3,9 @@ package io_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
. "github.com/v2ray/v2ray-core/common/io"
|
. "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBufferedWriter(t *testing.T) {
|
func TestBufferedWriter(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChainWriter struct {
|
type ChainWriter struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChanReader struct {
|
type ChanReader struct {
|
||||||
|
@ -3,8 +3,8 @@ package io
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reader extends io.Reader with alloc.Buffer.
|
// Reader extends io.Reader with alloc.Buffer.
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
. "github.com/v2ray/v2ray-core/common/io"
|
. "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAdaptiveReader(t *testing.T) {
|
func TestAdaptiveReader(t *testing.T) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io
|
package io
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Pipe(reader Reader, writer Writer) error {
|
func Pipe(reader Reader, writer Writer) error {
|
||||||
|
@ -3,8 +3,8 @@ package io
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Writer extends io.Writer with alloc.Buffer.
|
// Writer extends io.Writer with alloc.Buffer.
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
. "github.com/v2ray/v2ray-core/common/io"
|
. "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAdaptiveWriter(t *testing.T) {
|
func TestAdaptiveWriter(t *testing.T) {
|
||||||
|
@ -5,8 +5,8 @@ package loader
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JSONConfigLoader struct {
|
type JSONConfigLoader struct {
|
||||||
|
@ -2,7 +2,7 @@ package loader
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package log
|
package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/log/internal"
|
"v2ray.com/core/common/log/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AccessStatus is the status of an access request from clients.
|
// AccessStatus is the status of an access request from clients.
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
"github.com/v2ray/v2ray-core/common/serial"
|
"v2ray.com/core/common/serial"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InterfaceToString(value interface{}) string {
|
func InterfaceToString(value interface{}) string {
|
||||||
|
@ -3,8 +3,8 @@ package internal_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/log/internal"
|
. "v2ray.com/core/common/log/internal"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccessLog(t *testing.T) {
|
func TestAccessLog(t *testing.T) {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/platform"
|
"v2ray.com/core/common/platform"
|
||||||
"github.com/v2ray/v2ray-core/common/signal"
|
"v2ray.com/core/common/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LogWriter interface {
|
type LogWriter interface {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package log
|
package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/log/internal"
|
"v2ray.com/core/common/log/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LogLevel int
|
type LogLevel int
|
||||||
|
@ -3,8 +3,8 @@ package net
|
|||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
"github.com/v2ray/v2ray-core/common/predicate"
|
"v2ray.com/core/common/predicate"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIPParsing(t *testing.T) {
|
func TestIPParsing(t *testing.T) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIPv4Address(t *testing.T) {
|
func TestIPv4Address(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package net_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTCPDestination(t *testing.T) {
|
func TestTCPDestination(t *testing.T) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseCIDR(str string) *net.IPNet {
|
func parseCIDR(str string) *net.IPNet {
|
||||||
|
@ -3,7 +3,7 @@ package net
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/collect"
|
"v2ray.com/core/common/collect"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,7 +5,7 @@ package net
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/collect"
|
"v2ray.com/core/common/collect"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *NetworkList) UnmarshalJSON(data []byte) error {
|
func (this *NetworkList) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestArrayNetworkList(t *testing.T) {
|
func TestArrayNetworkList(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/serial"
|
"v2ray.com/core/common/serial"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseIntPort(data []byte) (Port, error) {
|
func parseIntPort(data []byte) (Port, error) {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIntPort(t *testing.T) {
|
func TestIntPort(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package net_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPortRangeContains(t *testing.T) {
|
func TestPortRangeContains(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package net_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/net"
|
. "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTimeOutSettings(t *testing.T) {
|
func TestTimeOutSettings(t *testing.T) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package protocol
|
package protocol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/common/uuid"
|
"v2ray.com/core/common/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RequestCommand byte
|
type RequestCommand byte
|
||||||
|
@ -3,8 +3,8 @@ package protocol_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRequestOptionSet(t *testing.T) {
|
func TestRequestOptionSet(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"hash"
|
"hash"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/uuid"
|
"v2ray.com/core/common/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,10 +3,10 @@ package protocol_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/predicate"
|
"v2ray.com/core/common/predicate"
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/common/uuid"
|
"v2ray.com/core/common/uuid"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCmdKey(t *testing.T) {
|
func TestCmdKey(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestServerList(t *testing.T) {
|
func TestServerList(t *testing.T) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/dice"
|
"v2ray.com/core/common/dice"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ValidationStrategy interface {
|
type ValidationStrategy interface {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestAccount struct {
|
type TestAccount struct {
|
||||||
|
@ -3,8 +3,8 @@ package protocol
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/dice"
|
"v2ray.com/core/common/dice"
|
||||||
"github.com/v2ray/v2ray-core/common/serial"
|
"v2ray.com/core/common/serial"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Timestamp int64
|
type Timestamp int64
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateRandomInt64InRange(t *testing.T) {
|
func TestGenerateRandomInt64InRange(t *testing.T) {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/protocol"
|
. "v2ray.com/core/common/protocol"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUserParsing(t *testing.T) {
|
func TestUserParsing(t *testing.T) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package protocol
|
package protocol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common"
|
"v2ray.com/core/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserValidator interface {
|
type UserValidator interface {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/retry"
|
. "v2ray.com/core/common/retry"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,8 +3,8 @@ package uuid_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/common/uuid"
|
. "v2ray.com/core/common/uuid"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseBytes(t *testing.T) {
|
func TestParseBytes(t *testing.T) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/protocol"
|
"v2ray.com/core/common/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Authenciation struct {
|
type Authenciation struct {
|
||||||
|
2
core.go
2
core.go
@ -4,7 +4,7 @@ package core
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/platform"
|
"v2ray.com/core/common/platform"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package blackhole
|
package blackhole
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BlackHole is an outbound connection that sliently swallow the entire payload.
|
// BlackHole is an outbound connection that sliently swallow the entire payload.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package blackhole
|
package blackhole
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
v2io "github.com/v2ray/v2ray-core/common/io"
|
v2io "v2ray.com/core/common/io"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/loader"
|
"v2ray.com/core/common/loader"
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/v2ray/v2ray-core/proxy/blackhole"
|
. "v2ray.com/core/proxy/blackhole"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHTTPResponseJSON(t *testing.T) {
|
func TestHTTPResponseJSON(t *testing.T) {
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
v2io "github.com/v2ray/v2ray-core/common/io"
|
v2io "v2ray.com/core/common/io"
|
||||||
. "github.com/v2ray/v2ray-core/proxy/blackhole"
|
. "v2ray.com/core/proxy/blackhole"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHTTPResponse(t *testing.T) {
|
func TestHTTPResponse(t *testing.T) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package dokodemo
|
package dokodemo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -3,16 +3,16 @@ package dokodemo
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
v2io "github.com/v2ray/v2ray-core/common/io"
|
v2io "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet/udp"
|
"v2ray.com/core/transport/internet/udp"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DokodemoDoor struct {
|
type DokodemoDoor struct {
|
||||||
|
@ -4,19 +4,19 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dispatcher"
|
"v2ray.com/core/app/dispatcher"
|
||||||
dispatchers "github.com/v2ray/v2ray-core/app/dispatcher/impl"
|
dispatchers "v2ray.com/core/app/dispatcher/impl"
|
||||||
"github.com/v2ray/v2ray-core/app/proxyman"
|
"v2ray.com/core/app/proxyman"
|
||||||
"github.com/v2ray/v2ray-core/common/dice"
|
"v2ray.com/core/common/dice"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
. "github.com/v2ray/v2ray-core/proxy/dokodemo"
|
. "v2ray.com/core/proxy/dokodemo"
|
||||||
"github.com/v2ray/v2ray-core/proxy/freedom"
|
"v2ray.com/core/proxy/freedom"
|
||||||
"github.com/v2ray/v2ray-core/testing/assert"
|
"v2ray.com/core/testing/assert"
|
||||||
"github.com/v2ray/v2ray-core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"github.com/v2ray/v2ray-core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDokodemoTCP(t *testing.T) {
|
func TestDokodemoTCP(t *testing.T) {
|
||||||
|
@ -5,9 +5,9 @@ package dokodemo
|
|||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
)
|
)
|
||||||
|
|
||||||
const SO_ORIGINAL_DST = 80
|
const SO_ORIGINAL_DST = 80
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
package dokodemo
|
package dokodemo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetOriginalDestination(conn internet.Connection) v2net.Destination {
|
func GetOriginalDestination(conn internet.Connection) v2net.Destination {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -3,19 +3,19 @@ package freedom
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core/app"
|
"v2ray.com/core/app"
|
||||||
"github.com/v2ray/v2ray-core/app/dns"
|
"v2ray.com/core/app/dns"
|
||||||
"github.com/v2ray/v2ray-core/common/alloc"
|
"v2ray.com/core/common/alloc"
|
||||||
"github.com/v2ray/v2ray-core/common/dice"
|
"v2ray.com/core/common/dice"
|
||||||
v2io "github.com/v2ray/v2ray-core/common/io"
|
v2io "v2ray.com/core/common/io"
|
||||||
"github.com/v2ray/v2ray-core/common/log"
|
"v2ray.com/core/common/log"
|
||||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
v2net "v2ray.com/core/common/net"
|
||||||
"github.com/v2ray/v2ray-core/common/retry"
|
"v2ray.com/core/common/retry"
|
||||||
"github.com/v2ray/v2ray-core/proxy"
|
"v2ray.com/core/proxy"
|
||||||
"github.com/v2ray/v2ray-core/proxy/registry"
|
"v2ray.com/core/proxy/registry"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
"github.com/v2ray/v2ray-core/transport/internet/tcp"
|
"v2ray.com/core/transport/internet/tcp"
|
||||||
"github.com/v2ray/v2ray-core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FreedomConnection struct {
|
type FreedomConnection struct {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user