mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-21 14:29:33 +08:00
feat: handle local conn with gvisor (#665)
* feat: handle local conn with gvisor * feat: remove udp route map * feat: optimize code * feat: length * feat: works * feat: should works * feat: optimize code * feat: optimize code * feat: gudp not set remark * feat: ut * feat: set to default value 0 * feat: send reset to gvisor tcp forward request if error * feat: not need to create firewall rule on windows * feat: typo
This commit is contained in:
@@ -859,19 +859,19 @@ func Init(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
go startupHttpServer(t, "9080", local)
|
||||
go startupHttpServer(t, "8080", local8080)
|
||||
go startupHttpServer(t, "localhost:9080", local)
|
||||
go startupHttpServer(t, "localhost:8080", local8080)
|
||||
}
|
||||
|
||||
func startupHttpServer(t *testing.T, port, str string) {
|
||||
func startupHttpServer(t *testing.T, addr, str string) {
|
||||
var health = func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write([]byte(str))
|
||||
}
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", health)
|
||||
mux.HandleFunc("/health", health)
|
||||
t.Logf("Start listening http port %s ...", port)
|
||||
err := http.ListenAndServe(":"+port, mux)
|
||||
t.Logf("Start listening http addr %s ...", addr)
|
||||
err := http.ListenAndServe(addr, mux)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user