fed-server
a server that can send signed federation requests using mautrix.
please do not expect any support or quality from this! i'm learning Go while creating it,
so if a server explodes during use, i am not responsible.
also before anyone make fed jokes, this has everything to do with US federal agents. i'm a fed and i'm in your walls.
setup
- create or copy federation keys in the Synapse format (
ed25519 <key id> <base64 key>)
- create
config.json:
{
"name": "server software name",
"version": "server software version",
"server_name": "example.com",
"key": "ed25519 <key id> <base64 key>",
"listen_address": "127.0.0.1:8888"
}
i recommend using a fresh (sub)domain for server_name, and not a real server.
- build
go build cmd/fed-server and copy the binary somewhere suitable.
- run
fed-server! config.json must be in the working directory, or it will not start.
- reverse proxy only
/_matrix/key/v2/server and optionally /_matrix/federation/v1/version.
WARNING: take care on this step, there is no authentication. if any other endpoints are exposed, anyone will be able to send federation requests in the server's name!
usage
POST /send/{txnID} - send federation transactions. this accepts the same JSON body as /_matrix/federation/v1/send, and
uses the destination property to determine which server to send to. txnID is any transaction ID, such as a timestamp.
<any method> /request/{server}/{path} - send any kind of request to server. path is prepended with /_matrix/federation but i'll
probably fix/change that quite soon.
POST /sign - returns the JSON body, but signed by the server's federation keys.
known problems
- conduit & its forks may not like some of the events this has signed, at least from my experience trying to join rooms