Repository navigation
Conversation
onairmarc
approved these changes
Nov 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #49
Replaces #13, which closed when
developwas removed. Same commits, merged withmain; nothing else changed.This lets Flock serve its sites and
*.testDNS on further addresses of the machine, for other machines. The case it's for: a development box reached over Tailscale (or another trusted network) from a laptop, where the sites should open in the laptop's browser.{ "listen": ["100.94.14.19"] }Without
listen, nothing changes: everything stays on 127.0.0.1.What it does
listenaddresses:withBindnow expands each:portto one address per host.@remote not client_ip 127.0.0.0/8 ::1) exempts requests that arrived on alistenaddress:not vars {http.request.local.host} <addresses>.listenaddress.flock statuslists the addresses (listen 100.94.14.19 (sites and DNS, for other machines)), andapi.Statuscarries them.Security: requests arriving on a
listenaddress are served whoever sends them. The config comment says to list only addresses of trusted networks.On the other machine, the TLD is pointed at the box's DNS (macOS:
/etc/resolver/testwithnameserver 100.94.14.19andport 53535), and Flock's CA is trusted there.Not in this PR
listenis set inconfig.json, then the daemon is reloaded.Testing
withBindexpands to every host.listen, and it adapts.listenaddress.listenAddresseskeeps this machine's IPv4 addresses and reports the others.flock statuslisted the address and warned about the missing one, while local sites kept working.go test -race ./...passed on that branch.main.go build ./...,go vet ./...andgo test ./...pass on Linux, andgo vetalso passes for darwin and windows.Docs
docs/configuration.mdgets Working from another machine. It covers settinglistenand restarting, what's served there and to whom (trusted networks only, services stay on 127.0.0.1), and the warnings and the degraded state. On the other machine it covers/etc/resolver/teston macOS or the hosts file elsewhere, and trustingcerts/ca.crt. Theconfig.jsonlist mentionslisten.docs/https.mdpoints there from the CA section.listenisn't in the app yet.