Style: format code

This commit is contained in:
Arthur Morgan 2021-09-20 21:00:55 +08:00
parent ab927d2cca
commit ffc2f7c4e2
78 changed files with 112 additions and 39 deletions

View file

@ -14,6 +14,7 @@ import (
"time"
"github.com/golang/protobuf/proto"
"github.com/xtls/xray-core/app/dispatcher"
"github.com/xtls/xray-core/app/proxyman"
"github.com/xtls/xray-core/common"

View file

@ -1,3 +1,4 @@
//go:build coverage
// +build coverage
package scenarios

View file

@ -1,3 +1,4 @@
//go:build !coverage
// +build !coverage
package scenarios

View file

@ -5,6 +5,8 @@ import (
"testing"
"time"
xproxy "golang.org/x/net/proxy"
"github.com/xtls/xray-core/app/dns"
"github.com/xtls/xray-core/app/proxyman"
"github.com/xtls/xray-core/app/router"
@ -16,7 +18,6 @@ import (
"github.com/xtls/xray-core/proxy/freedom"
"github.com/xtls/xray-core/proxy/socks"
"github.com/xtls/xray-core/testing/servers/tcp"
xproxy "golang.org/x/net/proxy"
)
func TestResolveIP(t *testing.T) {

View file

@ -8,6 +8,8 @@ import (
"testing"
"time"
xproxy "golang.org/x/net/proxy"
"github.com/xtls/xray-core/app/dispatcher"
"github.com/xtls/xray-core/app/log"
"github.com/xtls/xray-core/app/proxyman"
@ -32,7 +34,6 @@ import (
"github.com/xtls/xray-core/testing/servers/tcp"
"github.com/xtls/xray-core/testing/servers/udp"
"github.com/xtls/xray-core/transport/internet"
xproxy "golang.org/x/net/proxy"
)
func TestPassiveConnection(t *testing.T) {

View file

@ -67,8 +67,8 @@ func TestShadowsocksChaCha20Poly1305TCP(t *testing.T) {
Listen: net.NewIPOrDomain(net.LocalHostIP),
}),
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Networks: []net.Network{net.Network_TCP},
}),
},
@ -163,8 +163,8 @@ func TestShadowsocksAES256GCMTCP(t *testing.T) {
Listen: net.NewIPOrDomain(net.LocalHostIP),
}),
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Networks: []net.Network{net.Network_TCP},
}),
},
@ -260,8 +260,8 @@ func TestShadowsocksAES128GCMUDP(t *testing.T) {
Listen: net.NewIPOrDomain(net.LocalHostIP),
}),
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Networks: []net.Network{net.Network_UDP},
}),
},
@ -356,8 +356,8 @@ func TestShadowsocksAES128GCMUDPMux(t *testing.T) {
Listen: net.NewIPOrDomain(net.LocalHostIP),
}),
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Networks: []net.Network{net.Network_UDP},
}),
},
@ -447,8 +447,8 @@ func TestShadowsocksNone(t *testing.T) {
Listen: net.NewIPOrDomain(net.LocalHostIP),
}),
ProxySettings: serial.ToTypedMessage(&dokodemo.Config{
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Address: net.NewIPOrDomain(dest.Address),
Port: uint32(dest.Port),
Networks: []net.Network{net.Network_TCP},
}),
},

View file

@ -5,6 +5,8 @@ import (
"testing"
"time"
"golang.org/x/sync/errgroup"
"github.com/xtls/xray-core/app/log"
"github.com/xtls/xray-core/app/proxyman"
"github.com/xtls/xray-core/common"
@ -23,7 +25,6 @@ import (
"github.com/xtls/xray-core/testing/servers/udp"
"github.com/xtls/xray-core/transport/internet"
"github.com/xtls/xray-core/transport/internet/kcp"
"golang.org/x/sync/errgroup"
)
func TestVMessDynamicPort(t *testing.T) {