Add covert-dtls to proxy and client with flags

This commit is contained in:
theodorsm 2024-11-30 22:17:27 +01:00
parent ae5bd52821
commit 541e124194
8 changed files with 88 additions and 16 deletions

View file

@ -46,6 +46,8 @@ func main() {
verboseLogging := flag.Bool("verbose", false, "increase log verbosity")
ephemeralPortsRangeFlag := flag.String("ephemeral-ports-range", "", "Set the `range` of ports used for client connections (format:\"<min>:<max>\").\nIf omitted, the ports will be chosen automatically.")
versionFlag := flag.Bool("version", false, "display version info to stderr and quit")
dtlsRandomize := flag.Bool("dtls-randomize", false, "randomize DTLS client hello")
dtlsMimic := flag.Bool("dtls-mimic", false, "mimic DTLS client hello of Chrome and Firefox")
var ephemeralPortsRange []uint16 = []uint16{0, 0}
@ -64,6 +66,10 @@ func main() {
log.Fatal("Cannot keep local address candidates when outbound address is specified")
}
if *dtlsMimic && *dtlsRandomize {
log.Fatal("Cannot both Randomize and Mimic DTLS client hello")
}
eventLogger := event.NewSnowflakeEventDispatcher()
if *ephemeralPortsRangeFlag != "" {
@ -112,6 +118,8 @@ func main() {
AllowNonTLSRelay: *allowNonTLSRelay,
SummaryInterval: *summaryInterval,
DTLSRandomize: *dtlsRandomize,
DTLSMimic: *dtlsMimic,
}
var logOutput = io.Discard