Fork/Clone this repo:
git clone https://github.com/willin/fediverse-alias.git
- Change Domain Routes
- Change Database ID
Edit wrangler.toml
:
name = "fediverse-alias"
compatibility_date = "2023-01-01"
# change these to your own domain
routes = [
{ pattern = "log.lu/.well-known/webfinger*", zone_name = "log.lu" },
{ pattern = "js.cool/.well-known/webfinger*", zone_name = "js.cool" },
{ pattern = "v0.chat/.well-known/webfinger*", zone_name = "v0.chat" },
{ pattern = "xn--wkua.xn--6qq986b3xl/.well-known/webfinger*", zone_name = "xn--wkua.xn--6qq986b3xl" },
{ pattern = "sh.gg/.well-known/webfinger*", zone_name = "sh.gg" },
{ pattern = "css.fund/.well-known/webfinger*", zone_name = "css.fund" },
{ pattern = "kaiyuan.fund/.well-known/webfinger*", zone_name = "kaiyuan.fund" },
{ pattern = "v0.md/.well-known/webfinger*", zone_name = "v0.md" },
{ pattern = "willin.org/.well-known/webfinger*", zone_name = "willin.org" },
{ pattern = "willin.wang/.well-known/webfinger*", zone_name = "willin.wang" }
]
[[d1_databases]]
binding = "DB"
database_name = "dns"
# change database_id into yours
database_id = "20204091-f55f-430d-a100-2292d8ea305a"
- Init seed data
Edit migrations/0011_seeds.sql
:
-- Here is an example
INSERT INTO aliases(`alias`,`account`,`owner`) VALUES('i@v0.md','willin@log.lu','');
INSERT INTO aliases(`alias`,`account`,`owner`) VALUES('i@sh.gg','willin@log.lu','');
INSERT INTO aliases(`alias`,`account`,`owner`) VALUES('i@js.cool','willin@log.lu','');
npm run deploy
npm run migration
如果您对本项目感兴趣,可以通过以下方式支持我:
Donation ways:
- Github: https://github.com/sponsors/willin
- Paypal: https://paypal.me/willinwang
- Alipay or Wechat Pay: QRCode
Apache-2.0