Three pre-existing issues prevented the Check workflow from passing:
1. Linux: ICMP tests fail because ping_group_range on GitHub Actions
runners defaults to "1 0" (unprivileged ICMP disabled). Add sysctl
step to allow unprivileged ICMP sockets.
2. macOS: go test -json emits linker warnings (LC_DYSYMTAB) as
"Action":"build-output" JSON lines. gotestfmt v2.5.0 predates this
action type (Go 1.21+) and panics in parseLine
(gotesttools/gotestfmt#64). Filter build-output lines before piping
to gotestfmt.
3. Windows: GO_TEST_LOG_OUTPUT pointed to /tmp/gotest.log which does
not resolve through the MSYS2-to-native-Go boundary. Use relative
path instead.
These failures were masked by fail-fast: Linux failed first (ICMP),
cancelling macOS and Windows before they reached gotestfmt.
- Move packages the provide generic functionality (such as config) from `cmd` subtree to top level.
- Remove all dependencies on `cmd` subtree from top level packages.
- Consolidate all code dealing with token generation and transfer to a single cohesive package.
Also changed the socks test code so that it binds to localhost, so that
we don't get popups saying "would you like to allow socks.test to use
the network"