This commit is contained in:
gospider
2025-08-18 10:44:39 +08:00
parent c3ed6ea481
commit e49de7b900
3 changed files with 7 additions and 6 deletions

2
go.mod
View File

@@ -8,7 +8,7 @@ require (
github.com/gospider007/bar v0.0.0-20250815030902-4f5b5d6312cf
github.com/gospider007/bs4 v0.0.0-20250815030800-a352d3ad57ee
github.com/gospider007/gson v0.0.0-20250815030832-fa016f03a353
github.com/gospider007/gtls v0.0.0-20250815030824-aeefe4aaf3c3
github.com/gospider007/gtls v0.0.0-20250818014236-059b98baa05b
github.com/gospider007/http1 v0.0.0-20250817122009-0b953c2c8efa
github.com/gospider007/http2 v0.0.0-20250817122534-76043412544d
github.com/gospider007/http3 v0.0.0-20250817123336-07d66db6dbb3

4
go.sum
View File

@@ -112,8 +112,8 @@ github.com/gospider007/bs4 v0.0.0-20250815030800-a352d3ad57ee h1:XKhfmuJ/lGYMN0n
github.com/gospider007/bs4 v0.0.0-20250815030800-a352d3ad57ee/go.mod h1:AU9FRb74CELvy5vhGAP/4GDw5SgGxxIj7SI5X0AoPe0=
github.com/gospider007/gson v0.0.0-20250815030832-fa016f03a353 h1:jrqXuLs1QzMZcl8mMoBLTaag6JaLY1eh/toCyDWC8GY=
github.com/gospider007/gson v0.0.0-20250815030832-fa016f03a353/go.mod h1:nxA7Mekk0TdS1W+ycauVr8vW25mMXf9rxCGcGHNE28w=
github.com/gospider007/gtls v0.0.0-20250815030824-aeefe4aaf3c3 h1:Kj2awlddsNnqbmQFVowbdkYo7SOaQR5N+oKldRDzb1s=
github.com/gospider007/gtls v0.0.0-20250815030824-aeefe4aaf3c3/go.mod h1:Np1+9Lmsm3g1LtDl3C8OOsMXfHRdOwyd7olW8YJMGLo=
github.com/gospider007/gtls v0.0.0-20250818014236-059b98baa05b h1:toPRBSz4GIJXJSKOhGwewVdCMAEY8UpyDnON55seWy8=
github.com/gospider007/gtls v0.0.0-20250818014236-059b98baa05b/go.mod h1:Np1+9Lmsm3g1LtDl3C8OOsMXfHRdOwyd7olW8YJMGLo=
github.com/gospider007/http1 v0.0.0-20250817122009-0b953c2c8efa h1:SJPg55yHMzcrprjvBA2YBMYCmIRauhFtQGL6QVTManM=
github.com/gospider007/http1 v0.0.0-20250817122009-0b953c2c8efa/go.mod h1:2KmewDOljCqfLfbSiIzuohAHvivZwj9pSd25pGEVvfE=
github.com/gospider007/http2 v0.0.0-20250817122534-76043412544d h1:PShVXqSaKS0mOpkvYEyrSDRtUQokcBMDinKvLVs5w4M=

View File

@@ -87,9 +87,10 @@ func server() {
server := http3.Server{
Addr: "0.0.0.0:8080",
Handler: mux,
TLSConfig: gtls.GetCertConfigForClient(&tls.Config{
NextProtos: []string{"http3-echo-example"},
}),
TLSConfig: &tls.Config{
GetCertificate: gtls.GetCertificate,
NextProtos: []string{"http3-echo-example"},
},
}
fmt.Println("Server is listening...")
fmt.Println(server.ListenAndServe())