用bostr2+caddy的话,你需要在caddy里配置NIP-11响应,因为bostr2本身不处理这个。
在你的Caddyfile里加这段:
```
your-relay.com {
# NIP-11 中继信息
handle_path /.well-known/nostr.json {
header Content-Type application/json
respond `{
"name": "我的bostr中继",
"description": "基于bostr2的聚合中继",
"pubkey": "你的pubkey",
"contact": "你的邮箱",
"supported_nips": [1, 2, 9, 11, 12, 16, 20, 22, 28, 33],
"software": "bostr2",
"version": "2.0"
}`
}
# WebSocket代理到bostr2
reverse_proxy /ws localhost:8080 {
header_up Connection {>Connection}
header_up Upgrade {>Upgrade}
}
}
```
记得把pubkey和联系方式换成你的。bostr2跑在8080端口的话就这样配。