Use ooni/probe-engine 0.12.0+patches (#133)
* nettests/groups.go: remove redundant struct names * go.mod go.sum: update deps except probe-engine * Update to ooni/probe-engine@e768161f91 The API has changed. Methods that used to change bits of the session have been removed. Now the session is more immutable than before. As such, we need to completely fill the config before using it. * Set IncludeCountry to always true Co-authored-by: Arturo Filastò <arturo@filasto.net>
This commit is contained in:
@@ -17,17 +17,23 @@ func init() {
|
||||
return err
|
||||
}
|
||||
|
||||
err = ctx.MaybeLocationLookup()
|
||||
sess, err := ctx.NewSession()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer sess.Close()
|
||||
|
||||
err = sess.MaybeLookupLocation()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.WithFields(log.Fields{
|
||||
"type": "table",
|
||||
"asn": ctx.Session.ProbeASNString(),
|
||||
"network_name": ctx.Session.ProbeNetworkName(),
|
||||
"country_code": ctx.Session.ProbeCC(),
|
||||
"ip": ctx.Session.ProbeIP(),
|
||||
"asn": sess.ProbeASNString(),
|
||||
"network_name": sess.ProbeNetworkName(),
|
||||
"country_code": sess.ProbeCC(),
|
||||
"ip": sess.ProbeIP(),
|
||||
}).Info("Looked up your location")
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user