Repository navigation
Open links Ctrl-clicked in Herdr in the browser window that clicked them - #70
Merged
Merged
Conversation
Herdr opens a Ctrl-clicked link from the client that saw the click, by running xdg-open or open from its PATH. A browser window's client runs on the workstation, so the link opened on the workstation's desktop, out of sight of the phone or laptop that clicked it. On Linux and macOS each window's Herdr client now starts with a PATH that finds stand-ins for those two commands first. A stand-in hands a lone web link and the window's stream to the host connector over a private socket, the connector sends it to the relay as open_link, and the relay passes it, http and https only, to that window, which opens it in a new tab. Anything else, a window that has gone or a connector that does not answer runs the real command. The connector only does this when the relay's host_ready announces open_link, so an older relay keeps links opening on the workstation as before.
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.
Herdr opens a Ctrl-clicked link from the client that saw the click by running
xdg-open/openfrom its PATH. A browser window's client runs on the workstation, so links opened on the workstation's desktop.links.sock, 0600).open_linkmessage: host → relay (http/https only, ≤ 8,192 chars) → that window only, which opens it withnoopener,noreferrer.host_readyannounces theopen_linkcapability; anything else falls back to the real command.Verified end to end against a real Herdr 0.9.4 client (Ctrl-click → connector). 812 lines, slightly over the guideline, mostly tests.