I should preface this with the fact that I don’t have the time or experience to code this myself, so if someone wants this, they’ll have to find somebody else who can.
In light of recent discussions with some of my friends (who I have yet to convince to try Syncthing, partly because it’s a bit of a pain to share files with) and a recently opened feature request in the issue tracker, I think I’ve come up with a solution that should (in theory) work for most people who want to quickly share folders.
The general idea is pretty simple, the individual who wants to share a folder with somebody runs some special command in the UI (or from the command line) that generates a special piece of text. They then send this to the person they wish to share the folder with, that person enters the text in a prompt in the UI, and Syncthing handles setting up the required connection and metadata.
In practice I envision this implemented as a string similar in size to an SSH public key which embeds information about the device ID which wants to do the sharing as well as the folder ID to be shared, together with some form of authentication token that the device that generated the string can then verify when the initial connection comes in. Ideally, this should generate a one-time use invitation, preferably with the option of a timeout.
An example might look something like: st-invite-v0 VU03UEg0Wi1KRDJQSk1ILURDTDNVTEgtTElBSVE1Qy1SSE1MSENILUdNSkdWRFAtVFBIM1pSSy1QUjRSS0E2IDNpNmxtLXVhN2ZkIHN1cGVyIHNlY3JldCBhdXRoZW50aWNhdGlvbiBzdHJpbmcK
This could then be easily sent through e-mail or other electronic means to the person you want to share the folder to, with the only further requirement on your side being that your device remain online until they connect.