Skip to content

Feature request: flock proxy to serve a local port at a .test domain over HTTPS #73

Description

@mansoorkhan96

What

A command that maps a .test domain to a local port, like herd proxy / valet proxy:

flock proxy <name> <host:port> [--secure]
flock unproxy <name>
flock proxies

e.g. flock proxy s3 127.0.0.1:9000 --secure → https://s3.test with a Flock-issued certificate.

Why

Some local tools run on their own port and need a trusted HTTPS origin. Examples: object storage, Vite, Reverb/WebSocket servers, Mailpit, Meilisearch dashboards.

My case: my Laravel sites run on https://*.test, and browser uploads go straight to S3 with presigned PUT URLs. Safari/WebKit blocks requests from an HTTPS page to http://127.0.0.1:9000 as mixed content. So the storage endpoint itself has to be HTTPS. With Herd I use herd proxy minio http://127.0.0.1:9005 --secure. Flock has no equivalent, and the generated Caddyfile (internal/web/web.go) has no place for custom site blocks.

Possible approach

Store proxies in config next to linked sites, and render each one as a site block in the generated Caddyfile:

<name>.test {
	import flock_site
	tls {
		get_certificate flock
	}
	reverse_proxy <host:port>
}

They would show up in flock sites / the menu bar app like other sites.

Happy to send a PR if this fits the project.

Activity

  1. added
    help wanted
    on Oct 31, 2026
  2. eleftrik commented on Nov 3, 2026

    @eleftrik

    This would be highly appreciated!

  3. added a commit that references this issue on Nov 4, 2026
    ddff58c
  4. eleftrik commented on Nov 5, 2026

    @eleftrik

    Thanks @lukas-frey! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions