GitHub for Mac includes a tool called GitHub Conduit that allows it to interact with features on a GitHub.com page.
For example, Conduit is behind the Clone in Desktop button on repository pages
and the Open button on file pages. Conduit listens for queries from
the browser about GitHub for Mac actions. To see this in action, visit
https://ghconduit.com:25035/status. It should look something like this:
{"capabilities":["status","unique_id","url-parameter-filepath"],"running":true,"server_version":"5"}
This tells us:
GitHub for Mac is installed. Conduit runs all the time, so even if GitHub for Mac isn’t running, the
Clone in DesktopandOpenbuttons still work. However, a user who doesn’t have GitHub for Mac installed will be taken to the http://mac.github.com download page.GitHub for Mac can be asked for its
status(as in the example) orunique_id, and can accept afilepathURL parameter.Links to a
github-mac://URL will function properly because theurl-parameter-filepathcapability is present.
With the capabilities and version data included in
/status, we have room to improve the interaction between your browser and
GitHub for Mac.
Conduit doesn’t reveal anything about you personally. Because responses only
include generic details about GitHub for Mac, it can’t be used to identify
you. The unique_id only identifies the particular install of GitHub for Mac
and not you or the computer it’s installed on.
Furthermore, Conduit only listens on localhost, a special address that means
“this computer”. It can’t be accessed from another computer, even one on your
local network. It can only talk to the GitHub.com page running in your web
browser, and according to your browser security settings.
Likewise, we use Mac OS X’s sandbox with Conduit. When Conduit runs, it starts
a sandboxed server and accepts incoming connections. The sandbox guarantees
that it won’t be able to do anything else, like start new connections to send
data without your permission, read your documents, or write data beyond some
simple state stored deep within ~/Library/.
When you run GitHub for Mac, it automatically launches Conduit and tells Mac OS
X to keep it alive. Thus, if Conduit crashes or you terminate it with Activity
Monitor or kill, it will relaunch, even if GitHub for Mac is not running.