unified import path

This commit is contained in:
v2ray committed 2016-08-20 20:55:45 +02:00
1 parent 6a878432dc
commit 07a86f549b
248 files changed
+759 -757

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
package router
import (
"github.com/v2ray/v2ray-core/common"
"v2ray.com/core/common"
)
type ConfigObjectCreator func([]byte) (interface{}, error)
+1 -1
View File
@@ -5,7 +5,7 @@ package router
import (
"encoding/json"
"github.com/v2ray/v2ray-core/common/log"
"v2ray.com/core/common/log"
)
func (this *Config) UnmarshalJSON(data []byte) error {
+4 -4
View File
@@ -1,10 +1,10 @@
package router
import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/common"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"v2ray.com/core/app"
"v2ray.com/core/common"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
)
const (
+2 -2
View File
@@ -13,7 +13,7 @@ import (
"strconv"
"strings"
v2net "github.com/v2ray/v2ray-core/common/net"
v2net "v2ray.com/core/common/net"
)
const (
@@ -65,7 +65,7 @@ func main() {
fmt.Fprintln(file, "package rules")
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, "var (")
+1 -1
View File
@@ -1,7 +1,7 @@
package rules
import (
v2net "github.com/v2ray/v2ray-core/common/net"
v2net "v2ray.com/core/common/net"
)
var (
+1 -1
View File
@@ -5,7 +5,7 @@ package rules
import (
"encoding/json"
"github.com/v2ray/v2ray-core/common/log"
"v2ray.com/core/common/log"
)
func parseChinaIPRule(data []byte) (*Rule, error) {
+2 -2
View File
@@ -5,8 +5,8 @@ package rules_test
import (
"testing"
. "github.com/v2ray/v2ray-core/app/router/rules"
"github.com/v2ray/v2ray-core/testing/assert"
. "v2ray.com/core/app/router/rules"
"v2ray.com/core/testing/assert"
)
func TestChinaIPJson(t *testing.T) {
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"net"
"testing"
. "github.com/v2ray/v2ray-core/app/router/rules"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/testing/assert"
. "v2ray.com/core/app/router/rules"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
)
func makeDestination(ip string) v2net.Destination {
+1 -1
View File
@@ -4,7 +4,7 @@ package rules
import (
"encoding/json"
"github.com/v2ray/v2ray-core/common/log"
"v2ray.com/core/common/log"
)
func parseChinaSitesRule(data []byte) (*Rule, error) {
+2 -2
View File
@@ -5,8 +5,8 @@ package rules_test
import (
"testing"
. "github.com/v2ray/v2ray-core/app/router/rules"
"github.com/v2ray/v2ray-core/testing/assert"
. "v2ray.com/core/app/router/rules"
"v2ray.com/core/testing/assert"
)
func TestChinaSitesJson(t *testing.T) {
+3 -3
View File
@@ -3,9 +3,9 @@ package rules_test
import (
"testing"
. "github.com/v2ray/v2ray-core/app/router/rules"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/testing/assert"
. "v2ray.com/core/app/router/rules"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
)
func makeDomainDestination(domain string) v2net.Destination {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
v2net "github.com/v2ray/v2ray-core/common/net"
v2net "v2ray.com/core/common/net"
)
type Condition interface {
+1 -1
View File
@@ -1,7 +1,7 @@
package rules
import (
v2net "github.com/v2ray/v2ray-core/common/net"
v2net "v2ray.com/core/common/net"
)
type Rule struct {
+4 -4
View File
@@ -7,10 +7,10 @@ import (
"errors"
"strings"
router "github.com/v2ray/v2ray-core/app/router"
"github.com/v2ray/v2ray-core/common/collect"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
router "v2ray.com/core/app/router"
"v2ray.com/core/common/collect"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
)
type JsonRule struct {
+3 -3
View File
@@ -5,9 +5,9 @@ package rules_test
import (
"testing"
. "github.com/v2ray/v2ray-core/app/router/rules"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/testing/assert"
. "v2ray.com/core/app/router/rules"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
)
func TestDomainRule(t *testing.T) {
+5 -5
View File
@@ -3,11 +3,11 @@ package rules
import (
"errors"
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/app/dns"
"github.com/v2ray/v2ray-core/app/router"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"v2ray.com/core/app"
"v2ray.com/core/app/dns"
"v2ray.com/core/app/router"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
)
var (
+9 -9
View File
@@ -3,15 +3,15 @@ package rules_test
import (
"testing"
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/app/dispatcher"
dispatchers "github.com/v2ray/v2ray-core/app/dispatcher/impl"
"github.com/v2ray/v2ray-core/app/dns"
"github.com/v2ray/v2ray-core/app/proxyman"
"github.com/v2ray/v2ray-core/app/router"
. "github.com/v2ray/v2ray-core/app/router/rules"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/testing/assert"
"v2ray.com/core/app"
"v2ray.com/core/app/dispatcher"
dispatchers "v2ray.com/core/app/dispatcher/impl"
"v2ray.com/core/app/dns"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/router"
. "v2ray.com/core/app/router/rules"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
)
func TestSimpleRouter(t *testing.T) {