Files
Jaime PilloraandClaude Fable 5 e588d2163e 1.12: reliability & security pass (#609)
Reliability, security, and observability across client/server/tunnel:
keepalive ping timeouts, TCP half-close propagation, dial-before-accept,
graceful SIGTERM shutdown, UDP flow-cap sweep, pre-auth WS size cap,
SOCKS ACL enforcement + live authfile reload, exact legacy-fingerprint
match, --auth validation, session/failed-login logs, #608 panic fix,
goreleaser multi-arch Docker images, and a two-stage release pipeline
(draft + versioned images at tag time; latest promoted on publish).

Full detail: 1.12-changes.md, the PR (34 commits), and
https://jpillora.com/chisel-112-ux-review

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-18 01:10:50 +10:00

37 lines
918 B
Go

package chshare
import (
"runtime/debug"
"strings"
)
//ProtocolVersion of chisel. When backwards
//incompatible changes are made, this will
//be incremented to signify a protocol
//mismatch.
var ProtocolVersion = "chisel-v3"
//BuildVersion is set at build time via ldflags,
//and otherwise falls back to the go module version
//embedded by `go install pkg@version` (see init)
var BuildVersion = "0.0.0-src"
func init() {
if info, ok := debug.ReadBuildInfo(); ok {
BuildVersion = fallbackVersion(BuildVersion, info)
}
}
//fallbackVersion returns the go module version when the build
//version was not stamped via ldflags
func fallbackVersion(current string, info *debug.BuildInfo) string {
if current != "0.0.0-src" {
return current //stamped via ldflags
}
v := info.Main.Version
if v == "" || v == "(devel)" {
return current //source build, no module version
}
return strings.TrimPrefix(v, "v")
}