-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparse.go
executable file
·34 lines (30 loc) · 969 Bytes
/
parse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"crypto/tls"
//"strings"
//"fmt"
"github.com/lucas-clemente/quic-go"
)
func parseCfg(multi bool, serverName string, insecureSkipVerify bool, sch string, red bool, iprio bool) (*tls.Config, *quic.Config) {
// var gquicvm = map[string]quic.VersionNumber{
// "39": quic.VersionGQUIC39,
// "43": quic.VersionGQUIC43,
// "44": quic.VersionGQUIC44,
// }
// versions := []quic.VersionNumber{}
// if version != "" {
// vs := strings.Split(version, ",")
// for _, v := range vs {
// if vv, ok := gquicvm[v]; ok {
// versions = append(versions, vv)
// }
// }
// }
//fmt.Print("sch:%s",sch)
return &tls.Config{
ServerName: serverName,
InsecureSkipVerify: insecureSkipVerify,
SessionTicketsDisabled: true}, &quic.Config{CreatePaths: multi, SchedulerName: sch, GenerateRedundancy: red, IPriority: iprio}
// NextProtos: []string{"39", "43", "44"},
//}, &quic.Config{Versions: versions}
}