Skip to content

Smokescreen v1.0.1

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Nov 15:13
· 20 commits to master since this release
b464c02

Smokescreen v1.0.1

Warning

This release changes some defaults and parts of the Go API from v0.1.0. Read the upgrade notes before you update a deployment.

v1.0.1 is the first stable release of Smokescreen. It has the changes that we merged on the v1 branch since v0.1.0. It needs Go 1.26 or later, and CI tests it on Go 1.26 and 1.27. This is also the first release that ships container images. See Downloads.

v1 and v2

v1.0.1 comes from the v1 branch, and its module path stays github.com/stripe/smokescreen. Later v1 releases will be v1.x.y and will keep the Go API compatible. We tagged v0.2.0 and v1.0.0 before this release and did not publish them. Neither has the race fixes below, so use v1.0.1.

New features go into v2 on master. v2 has the module path github.com/stripe/smokescreen/v2. It moves logging to log/slog and adds a new ACL format with its own decision engine. Some flags that are opt-in here will become the default in v2. v2 has no release tag yet, and its first tagged release will change the Go API again. If you need a stable Go API, stay on v1 for now. When you are ready to move, read Migrating to v2.

For now, v1 gets security fixes and fixes for major bugs, and we keep its dependencies current. Sometimes a security fix can't keep the old behavior. When that happens, we release it as a new minor version, for example v1.1.0, and the release notes tell you what to change. Other fixes come out as patch versions.

Breaking changes and upgrade notes

  • Prometheus listens on 127.0.0.1 by default. If a scraper on another host or outside the container reads your metrics, set --prometheus-listen-ip 0.0.0.0. The metrics listener now has server timeouts and serves only the metrics endpoint. (#365, #330)
  • The self-connection guard denies the proxy host's own addresses on every port. In v0.1.0 it checked only the listening port. To turn the guard off, set --allow-self-connections. In YAML this is allow_self_connections. Normal IP and ACL checks still apply when the guard is off. (#328, #335)
  • Startup stops if a configured CRL does not load. Revocation checks now cover intermediate CAs too. Make sure that each CRL file loads before you upgrade. (#329)
  • Startup stops if the ACL from acl_file uses an action that --disable-acl-policy-action turns off. (#332)
  • YAML is parsed with go-yaml v3. A duration written as 0 fails to load, so write 0s. (#315)
  • StatsdClient() returns statsd.ClientInterface from github.com/DataDog/datadog-go/v5. Change your import if your code calls it. The client also aggregates metrics and sends them every 2 seconds. (#319)
  • The bytes_in and bytes_out Logrus fields on connection close are uint64. They were *uint64. JSON output stays the same. (#336)

Added

  • Domain globs can have one wildcard inside a single label, for example access-analyzer.*.amazonaws.com or api*.example.com. A wildcard can't match a host that the public suffix list gives to someone else. You can turn that check off in an ACL with unsafe_allow_wildcards_across_public_suffixes: true. (#344)
  • With --most-specific-ip-rules, the most specific IP rule wins when rules overlap, and deny wins a tie. (#341)
  • --unsafe-ip-filter-bypassed-domain skips IP filters for a domain whose DNS you trust. ACL and self-connection checks still apply. (#340)
  • --prometheus-metrics-format v2 gives every metric a smokescreen_ prefix, puts units in the names and uses better histogram buckets. While you move dashboards, dual publishes the old names and the new names together. The default stays legacy. (#342)
  • --metric-tag KEY=VALUE adds a tag to every StatsD and Prometheus metric. (#350)
  • You can repeat --resolver-address. Each DNS lookup picks one of the addresses at random. (#349)
  • --proxy-protocol accepts PROXY protocol v2 as well as v1. Clients that send no PROXY header can still connect. (#316, #331)
  • Config.OnDialError calls your code when an outbound dial fails. (#362)
  • Build with -tags smokescreen_no_prometheus to leave the Prometheus client out of the binary. (#313)
  • Each release now publishes static binaries and container images with build provenance. (#333, #346, #357)

Fixed

  • Smokescreen rejects a MITM request whose URL does not parse. That request used to crash the proxy. (#347)
  • Addresses in 64:ff9b:1::/48, the RFC 8215 local-use NAT64 prefix, are denied like other IPv6 addresses that carry an IPv4 address. (#326)
  • Logs for a failed connection keep the original error message. (#338)
  • With the Logrus text formatter, connection close logs show byte counts as numbers. (#336)
  • If the stats server fails, Smokescreen logs the error and shuts down cleanly. (#358)
  • HTTP proxy requests send the client's Accept-Encoding header on unchanged. (#325)
  • net/http can finish the dial for a plain HTTP or MITM request after the request is done, for example when the client cancels. That dial no longer races with the request. It also no longer adds its fields to the request's logs or changes the logged decision_reason. CONNECT requests keep their earlier behavior. (#387, reported in #383)
  • InstrumentedConn.Error takes the connection's lock, and Idle and Stats read the activity and byte counters atomically. They no longer race with Close or with an active tunnel. Thanks to @rohith-sierra and @gabriela-cw, who reported these races in #369 and #370. (#390)

Performance and dependencies

  • Smokescreen prepares metric tags faster and with fewer allocations. (#352)
  • goproxy now caches MITM certificates with the standard library, so the HashiCorp LRU dependency is gone. (#321)
  • We updated golang.org/x/net to v0.62.0 and the Prometheus client to v1.24.1. Logrus, testify, xid and urfave/cli are also current. (#374, #323, #318, #310, #317, #327)
  • We removed versioninfo and go-cleanhttp because the standard library now does their work. (#308, #309)

Downloads

Container images for linux/amd64 and linux/arm64:

docker pull ghcr.io/stripe/smokescreen:v1.0.1

The image runs on gcr.io/distroless/static:nonroot as UID 65532 and has the same binary as the Linux tarballs. With no arguments it listens on 0.0.0.0:4750. Your arguments replace the default ones, so add --listen-ip 0.0.0.0 when you pass your own:

docker run --rm -p 4750:4750 -v "$PWD/acl.yaml:/acl.yaml:ro" \
  ghcr.io/stripe/smokescreen:v1.0.1 \
  --listen-ip 0.0.0.0 --egress-acl-file /acl.yaml

Images get a version tag only. We don't publish latest.

The release assets have static binaries for Linux and macOS on amd64 and arm64, with a SHA256SUMS file. GitHub build provenance covers the tarballs and the images. To check them:

gh attestation verify smokescreen_v1.0.1_linux_amd64.tar.gz --repo stripe/smokescreen
gh attestation verify oci://ghcr.io/stripe/smokescreen:v1.0.1 --repo stripe/smokescreen

Full changelog: v0.1.0...v1.0.1