This commit is contained in:
RPRX 2020-12-04 09:36:16 +08:00
parent ed8d6d743c
commit 16544c18ab
627 changed files with 3247 additions and 2635 deletions

View file

@ -1,10 +1,10 @@
package dns
import (
"github.com/xtls/xray-core/v1/common/errors"
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/common/serial"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/common/errors"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/common/serial"
"github.com/xtls/xray-core/features"
)
// Client is a Xray feature for querying DNS information.

View file

@ -1,8 +1,8 @@
package localdns
import (
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/features/dns"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features/dns"
)
// Client is an implementation of dns.Client, which queries localhost for DNS.

View file

@ -1,6 +1,6 @@
package features
import "github.com/xtls/xray-core/v1/common/errors"
import "github.com/xtls/xray-core/common/errors"
type errPathObjHolder struct{}

View file

@ -1,8 +1,8 @@
package features
import "github.com/xtls/xray-core/v1/common"
import "github.com/xtls/xray-core/common"
//go:generate go run github.com/xtls/xray-core/v1/common/errors/errorgen
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
// Feature is the interface for Xray features. All features must implement this interface.
// All existing features have an implementation in app directory. These features can be replaced by third-party ones.

View file

@ -3,9 +3,9 @@ package inbound
import (
"context"
"github.com/xtls/xray-core/v1/common"
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features"
)
// Handler is the interface for handlers that process inbound connections.

View file

@ -3,9 +3,9 @@ package outbound
import (
"context"
"github.com/xtls/xray-core/v1/common"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/v1/transport"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/features"
"github.com/xtls/xray-core/transport"
)
// Handler is the interface for handlers that process outbound connections.

View file

@ -5,8 +5,8 @@ import (
"runtime"
"time"
"github.com/xtls/xray-core/v1/common/platform"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/common/platform"
"github.com/xtls/xray-core/features"
)
// Timeout contains limits for connection timeout.

View file

@ -1,7 +1,7 @@
package routing
import (
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/common/net"
)
// Context is a feature to store connection information for routing.

View file

@ -3,9 +3,9 @@ package routing
import (
"context"
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/v1/transport"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features"
"github.com/xtls/xray-core/transport"
)
// Dispatcher is a feature that dispatches inbound requests to outbound handlers based on rules.

View file

@ -1,11 +1,11 @@
package dns
//go:generate go run github.com/xtls/xray-core/v1/common/errors/errorgen
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
import (
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/features/dns"
"github.com/xtls/xray-core/v1/features/routing"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features/dns"
"github.com/xtls/xray-core/features/routing"
)
// ResolvableContext is an implementation of routing.Context, with domain resolving capability.

View file

@ -1,6 +1,6 @@
package dns
import "github.com/xtls/xray-core/v1/common/errors"
import "github.com/xtls/xray-core/common/errors"
type errPathObjHolder struct{}

View file

@ -1,8 +1,8 @@
package routing
import (
"github.com/xtls/xray-core/v1/common"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/features"
)
// Router is a feature to choose an outbound tag for the given request.

View file

@ -3,9 +3,9 @@ package session
import (
"context"
"github.com/xtls/xray-core/v1/common/net"
"github.com/xtls/xray-core/v1/common/session"
"github.com/xtls/xray-core/v1/features/routing"
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/common/session"
"github.com/xtls/xray-core/features/routing"
)
// Context is an implementation of routing.Context, which is a wrapper of context.context with session info.

View file

@ -1,6 +1,6 @@
package stats
import "github.com/xtls/xray-core/v1/common/errors"
import "github.com/xtls/xray-core/common/errors"
type errPathObjHolder struct{}

View file

@ -1,12 +1,12 @@
package stats
//go:generate go run github.com/xtls/xray-core/v1/common/errors/errorgen
//go:generate go run github.com/xtls/xray-core/common/errors/errorgen
import (
"context"
"github.com/xtls/xray-core/v1/common"
"github.com/xtls/xray-core/v1/features"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/features"
)
// Counter is the interface for stats counters.