Is running the primary on one port and secondaries (read replicas) on another an option? If so, traffic sent to that port should always end up with primary?
# litestream.primary.yml
addr: ":7770"
dbs:
- path: /to/dB
# litestream.replica.yml
addr: ":7771"
dbs:
- path: /to/db
upstream:
url: http://$PRIMARY_HOSTNAME:7770