Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to hp (hittyping) will be documented in this file.

## [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
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
5 changes: 5 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/ac/hp

go 1.25.6
go 1.26.2

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
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
21 changes: 16 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading