-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust test cases to support automated test
Signed-off-by: bill fort <fxbao@hotmail.com>
- Loading branch information
1 parent
78ad146
commit 075926a
Showing
15 changed files
with
169 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
name: Go | ||
|
||
on: | ||
[push] | ||
[push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package tests | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
"github.com/txthinking/brook" | ||
) | ||
|
||
func dnsQuery() { | ||
for i := 1; i <= rounds; i++ { | ||
err := brook.Socks5Test(proxyAddr, "", "", "http3.ooo", "137.184.237.95", "8.8.8.8:53") | ||
if err != nil { | ||
fmt.Printf("TestDNSProxy try %v err: %v\n", i, err) | ||
time.Sleep(time.Duration(i) * time.Second) | ||
break | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package tests | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
"time" | ||
) | ||
|
||
// go test -v -run=TestProxy | ||
func TestProxy(t *testing.T) { | ||
tuna, udp, tun := true, true, false | ||
go func() { | ||
err := startNconnect("client.json", tuna, udp, tun, nil) | ||
if err != nil { | ||
fmt.Printf("start nconnect client err: %v\n", err) | ||
return | ||
} | ||
}() | ||
time.Sleep(15 * time.Second) | ||
|
||
dnsQuery() | ||
StartWebClient() | ||
StartTCPClient() | ||
StartUDPClient() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.