mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Improve tests
This commit is contained in:
parent
189676578a
commit
88d39f1c73
@ -32,8 +32,8 @@ const (
|
|||||||
ImageTrojan = "trojangfw/trojan:latest"
|
ImageTrojan = "trojangfw/trojan:latest"
|
||||||
ImageNaive = "pocat/naiveproxy:client"
|
ImageNaive = "pocat/naiveproxy:client"
|
||||||
ImageBoringTun = "ghcr.io/ntkme/boringtun:edge"
|
ImageBoringTun = "ghcr.io/ntkme/boringtun:edge"
|
||||||
ImageHysteria = "teddysun/hysteria:1.3.5"
|
ImageHysteria = "tobyxdd/hysteria:v1.3.5"
|
||||||
ImageHysteria2 = "teddysun/hysteria:latest"
|
ImageHysteria2 = "tobyxdd/hysteria:v2"
|
||||||
ImageNginx = "nginx:stable"
|
ImageNginx = "nginx:stable"
|
||||||
ImageShadowTLS = "ghcr.io/ihciah/shadow-tls:latest"
|
ImageShadowTLS = "ghcr.io/ihciah/shadow-tls:latest"
|
||||||
ImageShadowsocksR = "teddysun/shadowsocks-r:latest"
|
ImageShadowsocksR = "teddysun/shadowsocks-r:latest"
|
||||||
@ -378,7 +378,7 @@ func testLargeDataWithPacketConnSize(t *testing.T, port uint16, chunkSize int, p
|
|||||||
|
|
||||||
rAddr := &net.UDPAddr{IP: localIP.AsSlice(), Port: int(port)}
|
rAddr := &net.UDPAddr{IP: localIP.AsSlice(), Port: int(port)}
|
||||||
|
|
||||||
times := 2
|
times := 50
|
||||||
|
|
||||||
pingCh, pongCh, test := newLargeDataPair()
|
pingCh, pongCh, test := newLargeDataPair()
|
||||||
writeRandData := func(pc net.PacketConn, addr net.Addr) (map[int][]byte, error) {
|
writeRandData := func(pc net.PacketConn, addr net.Addr) (map[int][]byte, error) {
|
||||||
|
@ -244,5 +244,5 @@ func TestECHHysteria2(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
testSuit(t, clientPort, testPort)
|
testSuitLargeUDP(t, clientPort, testPort)
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ func TestHysteria2Inbound(t *testing.T) {
|
|||||||
startDockerContainer(t, DockerOptions{
|
startDockerContainer(t, DockerOptions{
|
||||||
Image: ImageHysteria2,
|
Image: ImageHysteria2,
|
||||||
Ports: []uint16{serverPort, clientPort},
|
Ports: []uint16{serverPort, clientPort},
|
||||||
Cmd: []string{"hysteria", "client", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
|
Cmd: []string{"client", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
|
||||||
Bind: map[string]string{
|
Bind: map[string]string{
|
||||||
"hysteria2-client.yml": "/etc/hysteria/config.yml",
|
"hysteria2-client.yml": "/etc/hysteria/config.yml",
|
||||||
caPem: "/etc/hysteria/ca.pem",
|
caPem: "/etc/hysteria/ca.pem",
|
||||||
@ -141,7 +141,7 @@ func TestHysteria2Outbound(t *testing.T) {
|
|||||||
startDockerContainer(t, DockerOptions{
|
startDockerContainer(t, DockerOptions{
|
||||||
Image: ImageHysteria2,
|
Image: ImageHysteria2,
|
||||||
Ports: []uint16{testPort},
|
Ports: []uint16{testPort},
|
||||||
Cmd: []string{"hysteria", "server", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
|
Cmd: []string{"server", "-c", "/etc/hysteria/config.yml", "--disable-update-check", "--log-level", "debug"},
|
||||||
Bind: map[string]string{
|
Bind: map[string]string{
|
||||||
"hysteria2-server.yml": "/etc/hysteria/config.yml",
|
"hysteria2-server.yml": "/etc/hysteria/config.yml",
|
||||||
certPem: "/etc/hysteria/cert.pem",
|
certPem: "/etc/hysteria/cert.pem",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user