chore: merge probe-engine into probe-cli (#201)
This is how I did it: 1. `git clone https://github.com/ooni/probe-engine internal/engine` 2. ``` (cd internal/engine && git describe --tags) v0.23.0 ``` 3. `nvim go.mod` (merging `go.mod` with `internal/engine/go.mod` 4. `rm -rf internal/.git internal/engine/go.{mod,sum}` 5. `git add internal/engine` 6. `find . -type f -name \*.go -exec sed -i 's@/ooni/probe-engine@/ooni/probe-cli/v3/internal/engine@g' {} \;` 7. `go build ./...` (passes) 8. `go test -race ./...` (temporary failure on RiseupVPN) 9. `go mod tidy` 10. this commit message Once this piece of work is done, we can build a new version of `ooniprobe` that is using `internal/engine` directly. We need to do more work to ensure all the other functionality in `probe-engine` (e.g. making mobile packages) are still WAI. Part of https://github.com/ooni/probe/issues/1335
This commit is contained in:
parent
b1ce300c8d
commit
d57c78bc71
535 changed files with 66182 additions and 23 deletions
42
internal/engine/resources/assets.go
Normal file
42
internal/engine/resources/assets.go
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package resources
|
||||
|
||||
const (
|
||||
// Version contains the assets version.
|
||||
Version = 20210129095811
|
||||
|
||||
// ASNDatabaseName is the ASN-DB file name
|
||||
ASNDatabaseName = "asn.mmdb"
|
||||
|
||||
// CountryDatabaseName is country-DB file name
|
||||
CountryDatabaseName = "country.mmdb"
|
||||
|
||||
// BaseURL is the asset's repository base URL
|
||||
BaseURL = "https://github.com/"
|
||||
)
|
||||
|
||||
// ResourceInfo contains information on a resource.
|
||||
type ResourceInfo struct {
|
||||
// URLPath is the resource's URL path.
|
||||
URLPath string
|
||||
|
||||
// GzSHA256 is used to validate the downloaded file.
|
||||
GzSHA256 string
|
||||
|
||||
// SHA256 is used to check whether the assets file
|
||||
// stored locally is still up-to-date.
|
||||
SHA256 string
|
||||
}
|
||||
|
||||
// All contains info on all known assets.
|
||||
var All = map[string]ResourceInfo{
|
||||
"asn.mmdb": {
|
||||
URLPath: "/ooni/probe-assets/releases/download/20210129095811/asn.mmdb.gz",
|
||||
GzSHA256: "ef1759bf8b77128723436c4ec5a3d7f2e695fb5a959e741ba39012ced325132c",
|
||||
SHA256: "0afa5afc48ba913933f17b11213c3044499c8338cf63b8f9af2778faa5875474",
|
||||
},
|
||||
"country.mmdb": {
|
||||
URLPath: "/ooni/probe-assets/releases/download/20210129095811/country.mmdb.gz",
|
||||
GzSHA256: "5d465224ab02242a8a79652161d2768e64dd91fc1ed840ca3d0746f4cd29a914",
|
||||
SHA256: "b4aa1292d072d9b2631711e6d3ac69c1e89687b4d513d43a1c330a92b7345e4d",
|
||||
},
|
||||
}
|
||||
Loading…
Reference in a new issue