diff --git a/README.md b/README.md index e38fd7e..855babc 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ between IPv4 and IPv6 lookup. * Fast * Supports IPv6 * Supports HTTPS -* Supports common command-line clients (e.g. `curl`, `httpie`, `wget` and `fetch`) +* Supports common command-line clients (e.g. `curl`, `httpie`, `ht`, `wget` and `fetch`) * JSON output * ASN, country and city lookup using the MaxMind GeoIP database * Port testing diff --git a/http/http.go b/http/http.go index b5d275d..2b23cf4 100644 --- a/http/http.go +++ b/http/http.go @@ -317,7 +317,7 @@ func NotFoundHandler(w http.ResponseWriter, r *http.Request) *appError { func cliMatcher(r *http.Request) bool { ua := useragent.Parse(r.UserAgent()) switch ua.Product { - case "curl", "HTTPie", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik": + case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik": return true } return false diff --git a/http/http_test.go b/http/http_test.go index 00e58a4..61c1d72 100644 --- a/http/http_test.go +++ b/http/http_test.go @@ -214,6 +214,7 @@ func TestCLIMatcher(t *testing.T) { {"Wget", true}, {"fetch libfetch/2.0", true}, {"HTTPie/0.9.3", true}, + {"httpie-go/0.6.0", true}, {"Go 1.1 package http", true}, {"Go-http-client/1.1", true}, {"Go-http-client/2.0", true}, diff --git a/index.html b/index.html index 7e56352..89a22f8 100644 --- a/index.html +++ b/index.html @@ -82,7 +82,7 @@

What is my IP address?

{{ .IP }}

Multiple command line HTTP clients are supported, - including curl, httpie, GNU + including curl, httpie, httpie-go, GNU Wget, fetch, and bat.

All endpoints (except /port) can return information about a custom IP address specified via ?ip= query parameter.

@@ -97,6 +97,9 @@ $ curl {{ .Host }} $ http -b {{ .Host }} {{ .IP }} +$ ht -b {{ .Host }} +{{ .IP }} + $ wget -qO- {{ .Host }} {{ .IP }}