Skip to content

Commit

Permalink
Chore: change module name (v2fly#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier authored Feb 16, 2021
1 parent 0957442 commit f94dd11
Show file tree
Hide file tree
Showing 623 changed files with 2,532 additions and 2,404 deletions.
10 changes: 5 additions & 5 deletions app/commander/commander.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package commander

//go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

import (
"context"
Expand All @@ -11,10 +11,10 @@ import (

"google.golang.org/grpc"

"v2ray.com/core"
"v2ray.com/core/common"
"v2ray.com/core/common/signal/done"
"v2ray.com/core/features/outbound"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/signal/done"
"github.com/v2fly/v2ray-core/v4/features/outbound"
)

// Commander is a V2Ray feature that provides gRPC methods to external clients.
Expand Down
9 changes: 5 additions & 4 deletions app/commander/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/commander/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package v2ray.core.app.commander;
option csharp_namespace = "V2Ray.Core.App.Commander";
option go_package = "v2ray.com/core/app/commander";
option go_package = "github.com/v2fly/v2ray-core/v4/app/commander";
option java_package = "com.v2ray.core.app.commander";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/commander/errors.generated.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package commander

import "v2ray.com/core/common/errors"
import "github.com/v2fly/v2ray-core/v4/common/errors"

type errPathObjHolder struct{}

Expand Down
8 changes: 4 additions & 4 deletions app/commander/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"context"
"sync"

"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/signal/done"
"v2ray.com/core/transport"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/signal/done"
"github.com/v2fly/v2ray-core/v4/transport"
)

// OutboundListener is a net.Listener for listening gRPC connections.
Expand Down
3 changes: 2 additions & 1 deletion app/commander/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (

"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
"v2ray.com/core/common"

"github.com/v2fly/v2ray-core/v4/common"
)

// Service is a Commander service.
Expand Down
7 changes: 4 additions & 3 deletions app/dispatcher/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/dispatcher/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package v2ray.core.app.dispatcher;
option csharp_namespace = "V2Ray.Core.App.Dispatcher";
option go_package = "v2ray.com/core/app/dispatcher";
option go_package = "github.com/v2fly/v2ray-core/v4/app/dispatcher";
option java_package = "com.v2ray.core.app.dispatcher";
option java_multiple_files = true;

Expand Down
30 changes: 15 additions & 15 deletions app/dispatcher/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

package dispatcher

//go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

import (
"context"
"strings"
"sync"
"time"

"v2ray.com/core"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/session"
"v2ray.com/core/features/outbound"
"v2ray.com/core/features/policy"
"v2ray.com/core/features/routing"
routing_session "v2ray.com/core/features/routing/session"
"v2ray.com/core/features/stats"
"v2ray.com/core/transport"
"v2ray.com/core/transport/pipe"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/session"
"github.com/v2fly/v2ray-core/v4/features/outbound"
"github.com/v2fly/v2ray-core/v4/features/policy"
"github.com/v2fly/v2ray-core/v4/features/routing"
routing_session "github.com/v2fly/v2ray-core/v4/features/routing/session"
"github.com/v2fly/v2ray-core/v4/features/stats"
"github.com/v2fly/v2ray-core/v4/transport"
"github.com/v2fly/v2ray-core/v4/transport/pipe"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion app/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package dispatcher

//go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
2 changes: 1 addition & 1 deletion app/dispatcher/errors.generated.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dispatcher

import "v2ray.com/core/common/errors"
import "github.com/v2fly/v2ray-core/v4/common/errors"

type errPathObjHolder struct{}

Expand Down
10 changes: 5 additions & 5 deletions app/dispatcher/fakednssniffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package dispatcher
import (
"context"

"v2ray.com/core"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/session"
"v2ray.com/core/features/dns"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/session"
"github.com/v2fly/v2ray-core/v4/features/dns"
)

// newFakeDNSSniffer Create a Fake DNS metadata sniffer
Expand Down
8 changes: 4 additions & 4 deletions app/dispatcher/sniffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package dispatcher
import (
"context"

"v2ray.com/core/common"
"v2ray.com/core/common/protocol/bittorrent"
"v2ray.com/core/common/protocol/http"
"v2ray.com/core/common/protocol/tls"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/protocol/bittorrent"
"github.com/v2fly/v2ray-core/v4/common/protocol/http"
"github.com/v2fly/v2ray-core/v4/common/protocol/tls"
)

type SniffResult interface {
Expand Down
6 changes: 3 additions & 3 deletions app/dispatcher/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package dispatcher

import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/features/stats"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/features/stats"
)

type SizeStatWriter struct {
Expand Down
6 changes: 3 additions & 3 deletions app/dispatcher/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package dispatcher_test
import (
"testing"

. "v2ray.com/core/app/dispatcher"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
. "github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
)

type TestCounter int64
Expand Down
6 changes: 3 additions & 3 deletions app/dns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package dns

import (
"v2ray.com/core/common/net"
"v2ray.com/core/common/strmatcher"
"v2ray.com/core/common/uuid"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/strmatcher"
"github.com/v2fly/v2ray-core/v4/common/uuid"
)

var typeMap = map[DomainMatchingType]strmatcher.Type{
Expand Down
11 changes: 6 additions & 5 deletions app/dns/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/dns/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package v2ray.core.app.dns;
option csharp_namespace = "V2Ray.Core.App.Dns";
option go_package = "v2ray.com/core/app/dns";
option go_package = "github.com/v2fly/v2ray-core/v4/app/dns";
option java_package = "com.v2ray.core.app.dns";
option java_multiple_files = true;

Expand Down
18 changes: 9 additions & 9 deletions app/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
// Package dns is an implementation of core.DNS feature.
package dns

//go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

import (
"context"
"fmt"
"sync"

"v2ray.com/core/app/router"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/net"
"v2ray.com/core/common/session"
"v2ray.com/core/common/strmatcher"
"v2ray.com/core/features"
"v2ray.com/core/features/dns"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/session"
"github.com/v2fly/v2ray-core/v4/common/strmatcher"
"github.com/v2fly/v2ray-core/v4/features"
"github.com/v2fly/v2ray-core/v4/features/dns"
)

// DNS is a DNS rely server.
Expand Down
27 changes: 14 additions & 13 deletions app/dns/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/miekg/dns"
"v2ray.com/core"
"v2ray.com/core/app/dispatcher"
. "v2ray.com/core/app/dns"
"v2ray.com/core/app/policy"
"v2ray.com/core/app/proxyman"
_ "v2ray.com/core/app/proxyman/outbound"
"v2ray.com/core/app/router"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/serial"
feature_dns "v2ray.com/core/features/dns"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/testing/servers/udp"

core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
. "github.com/v2fly/v2ray-core/v4/app/dns"
"github.com/v2fly/v2ray-core/v4/app/policy"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
_ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/serial"
feature_dns "github.com/v2fly/v2ray-core/v4/features/dns"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
)

type staticHandler struct {
Expand Down
9 changes: 5 additions & 4 deletions app/dns/dnscommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"time"

"golang.org/x/net/dns/dnsmessage"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/net"
dns_feature "v2ray.com/core/features/dns"

"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/common/net"
dns_feature "github.com/v2fly/v2ray-core/v4/features/dns"
)

// Fqdn normalize domain make sure it ends with '.'
Expand Down
9 changes: 5 additions & 4 deletions app/dns/dnscommon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/miekg/dns"
"golang.org/x/net/dns/dnsmessage"
"v2ray.com/core/common"
"v2ray.com/core/common/net"

"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
)

func Test_parseResponse(t *testing.T) {
Expand Down Expand Up @@ -147,8 +148,8 @@ func TestFqdn(t *testing.T) {
args args
want string
}{
{"with fqdn", args{"www.v2ray.com."}, "www.v2ray.com."},
{"without fqdn", args{"www.v2ray.com"}, "www.v2ray.com."},
{"with fqdn", args{"www.v2fly.org."}, "www.v2fly.org."},
{"without fqdn", args{"www.v2fly.org"}, "www.v2fly.org."},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/dns/errors.generated.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dns

import "v2ray.com/core/common/errors"
import "github.com/v2fly/v2ray-core/v4/common/errors"

type errPathObjHolder struct{}

Expand Down
Loading

0 comments on commit f94dd11

Please sign in to comment.