The knotserver can now use alternative PLCs for DID resolution by setting the env var KNOT_SERVER_PLC_URL. The default identity directory was copied out of the at proto lib and updated to take in a target url for the PLC being used to do this.
guard/guard.go
This file has not been changed.
idresolver/resolver.go
This file has not been changed.
knotserver/config/config.go
This file has not been changed.
knotserver/ingester.go
This file has not been changed.
knotserver/internal.go
This file has not been changed.
knotserver/router.go
This file has not been changed.
History
2 rounds
5 comments
1 commit
expand
collapse
The knotserver can now use alternative PLCs for DID resolution
by setting the env var KNOT_SERVER_PLC_URL. The default identity
directory was copied out of the at proto lib and updated to take
in a target url for the PLC being used to do this.
Signed-off-by: Shail Patel <shailpatel67@gmail.com>
expand 4 comments
@oppi.li I've been working on same feature but for appview side, I'll open a new PR merging both with your review applied.
closing in flavor of #683
Yeah exactly, I pulled the defaultDirectory out of the library https://github.com/bluesky-social/indigo/blob/main/atproto/identity/directory.go#L65 and added the url parameter.
Thanks for the other PR @boltless.me!
1 commit
expand
collapse
The knotserver can now use alternative PLCs for DID resolution
by setting the env var KNOT_SERVER_PLC_URL. The default identity
directory was copied out of the at proto lib and updated to take
in a target url for the PLC being used to do this.
expand 1 comment
The original issue was related to DID resolution with ipv6 only https://tangled.org/@tangled.org/core/issues/268,
I setup my knot with the env KNOT_SERVER_PLC_URL=https://plc.wtf and got a little farther but looks like the PDS also doesn't support IPV6 ;-;
Oct 18 04:43:30 debian-2gb-ash-1 knot[34274]: 2025/10/18 04:43:30 DEBU knot/server/serviceauth: valid signature ActorDid=did:plc:fjoxhdnj2kep6llsvhtxqrk3
Oct 18 04:43:30 debian-2gb-ash-1 knot[34274]: 2025/10/18 04:43:30 DEBU knot: performing request subsystem=RobustHTTPClient method=GET url="https://russula.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?collection=sh.tangled.repo&repo=did%3Aplc%3Afjoxhdnj2kep6llsvhtxqrk3&rkey=3m3gxyvkylt22"
Oct 18 04:43:34 debian-2gb-ash-1 knot[34274]: 2025/10/18 04:43:34 WARN knot: request failed subsystem=RobustHTTPClient error="Get \"https://russula.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?collection=sh.tangled.repo&repo=did%3Aplc%3Afjoxhdnj2kep6llsvhtxqrk3&rkey=3m3gxyvkylt22\": context canceled" method=GET url="https://russula.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?collection=sh.tangled.repo&repo=did%3Aplc%3Afjoxhdnj2kep6llsvhtxqrk3&rkey=3m3gxyvkylt22"
Oct 18 04:43:34 debian-2gb-ash-1 knot[34274]: 2025/10/18 04:43:34 ERRO knot/server/xrpc: failed handler=NewRepo kind=Generic error="request failed: Get \"https://russula.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?collection=sh.tangled.repo&repo=did%3Aplc%3Afjoxhdnj2kep6llsvhtxqrk3&rkey=3m3gxyvkylt22\": GET https://russula.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?collection=sh.tangled.repo&repo=did%3Aplc%3Afjoxhdnj2kep6llsvhtxqrk3&rkey=3m3gxyvkylt22 giving up after 1 attempt(s): context canceled"
shail@debian13:~/tangled/core$ dig russula.us-west.host.bsky.network AAAA @8.8.8.8
; <<>> DiG 9.20.11-4-Debian <<>> russula.us-west.host.bsky.network AAAA @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12857
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;russula.us-west.host.bsky.network. IN AAAA
;; AUTHORITY SECTION:
bsky.network. 42 IN SOA ns-61.awsdns-07.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 7200
;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Sat Oct 18 01:24:50 EDT 2025
;; MSG SIZE rcvd: 142
thanks for the PR! if i am understanding correctly:
the issue here is that users of the redis based resolver will be unable to overload their PLC URL (it uses idresolver.BaseDirectory internally). i would suggest that: