mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-05-11 21:06:34 +00:00

This is a cherry-pick of 157f5d1412
followed by build/CI changes so that amd64/linux FIPS compliance is
provided by new/separate binaries/artifacts/packages.
The reasoning being that FIPS compliance places excessive requirements
in the encryption algorithms used for regular users that do not care
about that. This can cause cloudflared to reject HTTPS origins that
would otherwise be accepted without FIPS checks.
This way, by having separate binaries, existing ones remain as they
were, and only FIPS-needy users will opt-in to the new FIPS binaries.
20 lines
498 B
Go
20 lines
498 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package token
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
func getBrowserCmd(url string) *exec.Cmd {
|
|
cmd := exec.Command("cmd")
|
|
// CmdLine is only defined when compiling for windows.
|
|
// Empty string is the cmd proc "Title". Needs to be included because the start command will interpret the first
|
|
// quoted string as that field and we want to quote the URL.
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{CmdLine: fmt.Sprintf(`/c start "" "%s"`, url)}
|
|
return cmd
|
|
}
|