Fix config parsing

This commit is contained in:
Jon Staab
2025-10-01 10:44:12 -07:00
parent 9c62dff15e
commit 4fe2981419
3 changed files with 11 additions and 6 deletions
+10 -4
View File
@@ -74,17 +74,23 @@ A special `[roles.member]` heading may be used to configure policies for all rel
The below config file might be saved as `./config/my-relay.example.com` in order to route requests from `wss://my-relay.example.com` to this virtual relay. The below config file might be saved as `./config/my-relay.example.com` in order to route requests from `wss://my-relay.example.com` to this virtual relay.
```toml ```toml
[self] host = "my-relay.example.com"
name = "My relay" schema = "my_relay"
schema = 'my_relay'
secret = "ce30b1831a4551f4cb7a984033c34ab96d8cf56ff50df9d0c27d9fa5422f2278" secret = "ce30b1831a4551f4cb7a984033c34ab96d8cf56ff50df9d0c27d9fa5422f2278"
[info]
name = "My relay"
icon = "https://example.com/icon.png"
pubkey = "d9254d9898fd4728f7e2b32b87520221a50f6b8b97d935d7da2de8923988aa6d"
description = "A community relay for my friends"
[policy] [policy]
strip_signatures = false strip_signatures = false
[groups] [groups]
enabled = true enabled = true
auto_join = false auto_join = false
auto_leave = true
[management] [management]
enabled = true enabled = true
@@ -123,7 +129,7 @@ echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
su --login zooid su --login zooid
# Clone the repository and build # Clone the repository and build
git clone https://github.com/coracle-social/zooid.git ~/zooid && cd zooid git clone https://github.com/coracle-social/zooid.git ~/zooid && cd ~/zooid
CGO_ENABLED=1 go build -o bin/zooid cmd/relay/main.go CGO_ENABLED=1 go build -o bin/zooid cmd/relay/main.go
# Back to root # Back to root
-1
View File
@@ -1,6 +1,5 @@
[Unit] [Unit]
Description=zooid Description=zooid
ConditionPathExists=/home/zooid/zooid
After=network.target After=network.target
[Service] [Service]
+1 -1
View File
@@ -24,7 +24,7 @@ type Config struct {
Secret string `toml:"secret"` Secret string `toml:"secret"`
Pubkey string `toml:"pubkey"` Pubkey string `toml:"pubkey"`
Description string `toml:"description"` Description string `toml:"description"`
} `toml:"self"` } `toml:"info"`
Policy struct { Policy struct {
StripSignatures bool `toml:"strip_signatures"` StripSignatures bool `toml:"strip_signatures"`