Update AndroidLibrayLite project to Xray

This commit is contained in:
yuhan6665
2021-04-16 09:17:58 -04:00
parent 8cdc7fb3c9
commit 115008a8a4
11 changed files with 339 additions and 106 deletions
@@ -12,8 +12,10 @@ import (
"time"
"golang.org/x/sys/unix"
v2net "v2ray.com/core/common/net"
v2internet "v2ray.com/core/transport/internet"
v2net "github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features/dns"
"github.com/xtls/xray-core/features/outbound"
v2internet "github.com/xtls/xray-core/transport/internet"
)
type protectSet interface {
@@ -190,6 +192,11 @@ func (d *ProtectedDialer) getFd(network v2net.Network) (fd int, err error) {
return
}
// Init implement internet.SystemDialer
func (d *ProtectedDialer) Init(_ dns.Client, _ outbound.Manager) {
// do nothing
}
// Dial exported as the protected dial method
func (d *ProtectedDialer) Dial(ctx context.Context,
src v2net.Address, dest v2net.Destination, sockopt *v2internet.SocketConfig) (net.Conn, error) {
@@ -9,7 +9,7 @@ import (
"testing"
"time"
v2net "v2ray.com/core/common/net"
v2net "github.com/xtls/xray-core/common/net"
)
type fakeSupportSet struct{}