diff --git a/geoiplookup/iplookup/akamai/akamai.go b/geoiplookup/iplookup/akamai/akamai.go deleted file mode 100644 index f44d5fce..00000000 --- a/geoiplookup/iplookup/akamai/akamai.go +++ /dev/null @@ -1,37 +0,0 @@ -// Package akamai lookups the IP using akamai. -package akamai - -import ( - "context" - "io/ioutil" - "net/http" - - "github.com/ooni/probe-engine/log" - "github.com/ooni/probe-engine/model" -) - -type response struct { - IP string `json:"ip"` -} - -// Do performs the IP lookup. -func Do( - ctx context.Context, - httpClient *http.Client, - logger log.Logger, - userAgent string, -) (string, error) { - req, err := http.NewRequest("GET", "https://a248.e.akamai.net/", nil) - if err != nil { - return model.DefaultProbeIP, err - } - req.Host = "whatismyip.akamai.com" // domain fronted request - req.Header.Set("User-Agent", userAgent) - resp, err := httpClient.Do(req.WithContext(ctx)) - if err != nil { - return model.DefaultProbeIP, err - } - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - return string(body), err -} diff --git a/geoiplookup/iplookup/iplookup.go b/geoiplookup/iplookup/iplookup.go index 65711af4..4f5f503c 100644 --- a/geoiplookup/iplookup/iplookup.go +++ b/geoiplookup/iplookup/iplookup.go @@ -11,7 +11,6 @@ import ( "sync" "time" - "github.com/ooni/probe-engine/geoiplookup/iplookup/akamai" "github.com/ooni/probe-engine/geoiplookup/iplookup/avast" "github.com/ooni/probe-engine/geoiplookup/iplookup/ubuntu" "github.com/ooni/probe-engine/log" @@ -31,10 +30,6 @@ type method struct { var ( methods = []method{ - { - name: "akamai", - fn: akamai.Do, - }, { name: "avast", fn: avast.Do,