From 5c2739c5b5ef0e68a99411bdc0ba9b18ecbec515 Mon Sep 17 00:00:00 2001 From: colangelo Date: Sat, 2 May 2026 10:32:29 +0200 Subject: [PATCH 1/4] chore: bump deps and version to 0.8.6 Update x/sys, x/crypto, x/net, x/text to latest patch series. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 6 ++++++ go.mod | 8 ++++---- go.sum | 16 ++++++++-------- main.go | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3c59a1..b6bc772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to hp (hittyping) will be documented in this file. +## [Unreleased] + +### Changed + +- Bump dependencies: `golang.org/x/sys` 0.38.0 → 0.43.0, `golang.org/x/crypto` 0.45.0 → 0.50.0, `golang.org/x/net` 0.47.0 → 0.53.0, `golang.org/x/text` 0.31.0 → 0.36.0 + ## [0.8.5] - 2026-03-04 ### Changed diff --git a/go.mod b/go.mod index 24a09f0..7b5c462 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,12 @@ go 1.25.6 require ( github.com/quic-go/quic-go v0.59.0 github.com/spf13/pflag v1.0.10 - golang.org/x/sys v0.38.0 + golang.org/x/sys v0.43.0 ) require ( github.com/quic-go/qpack v0.6.0 // indirect - golang.org/x/crypto v0.45.0 // indirect - golang.org/x/net v0.47.0 // indirect - golang.org/x/text v0.31.0 // indirect + golang.org/x/crypto v0.50.0 // indirect + golang.org/x/net v0.53.0 // indirect + golang.org/x/text v0.36.0 // indirect ) diff --git a/go.sum b/go.sum index 2c803fb..73eee19 100644 --- a/go.sum +++ b/go.sum @@ -12,13 +12,13 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= -golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= -golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= +golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= +golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= +golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= +golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index b24b58e..8b35fc7 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ import ( // cleanly pause rendering before the process is actually stopped. var displayMu sync.Mutex -const version = "0.8.5" +const version = "0.8.6" const ( // ANSI colors From aacfcc143dd5a34d154eda97951a53ce052c913f Mon Sep 17 00:00:00 2001 From: colangelo Date: Sat, 2 May 2026 10:34:50 +0200 Subject: [PATCH 2/4] chore: bump Go toolchain to 1.26.2 Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 1 + CLAUDE.md | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6bc772..743598f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to hp (hittyping) will be documented in this file. ### Changed +- Bump Go toolchain: 1.25.6 → 1.26.2 - Bump dependencies: `golang.org/x/sys` 0.38.0 → 0.43.0, `golang.org/x/crypto` 0.45.0 → 0.50.0, `golang.org/x/net` 0.47.0 → 0.53.0, `golang.org/x/text` 0.31.0 → 0.36.0 ## [0.8.5] - 2026-03-04 diff --git a/CLAUDE.md b/CLAUDE.md index 805daa6..deca4d4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -81,7 +81,7 @@ HTTPS_PROXY=socks5://host:port hp cloudflare.com # Via SOCKS5 proxy ## Architecture -Go application using `spf13/pflag` for POSIX-style CLI flags. Uses latest stable Go (currently 1.25). +Go application using `spf13/pflag` for POSIX-style CLI flags. Uses latest stable Go (currently 1.26). Key functions: diff --git a/go.mod b/go.mod index 7b5c462..f570ca0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ac/hp -go 1.25.6 +go 1.26.2 require ( github.com/quic-go/quic-go v0.59.0 From ef0bcd2a236d6ef2ca441f6f8f910261e4304008 Mon Sep 17 00:00:00 2001 From: colangelo Date: Mon, 4 May 2026 16:09:39 +0200 Subject: [PATCH 3/4] fix: skip local DNS lookup when proxy env is set The display-only resolution at startup called net.LookupHost and exit(1)'d on failure, which broke usage with socks5h-style proxies that delegate DNS to the proxy. Now skipped when HTTPS_PROXY/HTTP_PROXY is configured; fast-fail behavior is preserved otherwise. Co-Authored-By: Claude Opus 4.7 (1M context) --- main.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 8b35fc7..5db4b50 100644 --- a/main.go +++ b/main.go @@ -189,13 +189,13 @@ func main() { displayURL := host - // Resolve hostname to IP for display (and validate it exists) + // Resolve hostname to IP for display (and validate it exists). + // Skipped when a proxy is configured: the proxy resolves the host + // (e.g. socks5h), so the local resolver may legitimately fail. resolvedIP := "" // Strip brackets from IPv6 for parsing and display hostForLookup := strings.TrimPrefix(strings.TrimSuffix(displayURL, "]"), "[") - // Check if it's already an IP address - if ip := net.ParseIP(hostForLookup); ip == nil { - // It's a hostname, resolve it + if ip := net.ParseIP(hostForLookup); ip == nil && !proxyConfigured() { ips, err := net.LookupHost(hostForLookup) if err != nil { fmt.Fprintf(os.Stderr, "Error: cannot resolve %s: %v\n", hostForLookup, err) @@ -440,6 +440,17 @@ func measureRTT(client *http.Client, url string, protoLevel int) (time.Duration, return elapsed, nil } +// proxyConfigured reports whether any HTTP/HTTPS proxy env var is set. +// Mirrors the variables consulted by http.ProxyFromEnvironment. +func proxyConfigured() bool { + for _, k := range []string{"HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy"} { + if os.Getenv(k) != "" { + return true + } + } + return false +} + func createClient(protoLevel int, timeout time.Duration, insecure bool) *http.Client { if protoLevel == protoHTTP3 { return newHTTP3Client(timeout, insecure) From 15255b65c8469c32d7eb99c535daa546f1176139 Mon Sep 17 00:00:00 2001 From: colangelo Date: Sun, 17 May 2026 01:12:40 +0200 Subject: [PATCH 4/4] chore: prepare v0.8.6 release Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 6 +++++- ROADMAP.md | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 743598f..161caf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,17 @@ All notable changes to hp (hittyping) will be documented in this file. -## [Unreleased] +## [0.8.6] - 2026-05-17 ### Changed - Bump Go toolchain: 1.25.6 → 1.26.2 - Bump dependencies: `golang.org/x/sys` 0.38.0 → 0.43.0, `golang.org/x/crypto` 0.45.0 → 0.50.0, `golang.org/x/net` 0.47.0 → 0.53.0, `golang.org/x/text` 0.31.0 → 0.36.0 +### Fixed + +- Skip local DNS lookup when proxy environment variables are set + ## [0.8.5] - 2026-03-04 ### Changed diff --git a/ROADMAP.md b/ROADMAP.md index 02b5213..25ecc45 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -74,6 +74,11 @@ If hp evolves toward interactive features, consider migrating to [Bubble Tea](ht ## Completed +### v0.8.6 - Toolchain & Dependency Refresh + +- [x] Bump Go toolchain to 1.26.2 +- [x] Update `golang.org/x/sys`, `x/crypto`, `x/net`, `x/text` to latest patch series + ### v0.8.5 - Timeline Date Display - [x] Include date in timeline when session spans multiple calendar days