README.rst
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 06 Feb 2018 11:08:36 -0800
changeset 35976 48a3a9283f09
parent 34579 1b59287a1cfa
child 46756 c5912e35d06d
permissions -rw-r--r--
sshpeer: initial definition and implementation of new SSH protocol The existing SSH protocol has several design flaws. Future commits will elaborate on these flaws as new features are introduced to combat these flaws. For now, hopefully you can take me for my word that a ground up rewrite of the SSH protocol is needed. This commit lays the foundation for a new SSH protocol by defining a mechanism to upgrade the SSH transport channel away from the default (version 1) protocol to something modern (which we'll call "version 2" for now). This upgrade process is detailed in the internals documentation for the wire protocol. The gist of it is the client sends a request line preceding the "hello" command/line which basically says "I'm requesting an upgrade: here's what I support." If the server recognizes that line, it processes the upgrade request and the transport channel is switched to use the new version of the protocol. If not, it sends an empty response, which is how all Mercurial SSH servers from the beginning of time reacted to unknown commands. The upgrade request is effectively ignored and the client continues to use the existing version of the protocol as if nothing happened. The new version of the SSH protocol is completely identical to version 1 aside from the upgrade dance and the bytes that follow. The immediate bytes that follow the protocol switch are defined to be a length framed "capabilities: " line containing the remote's advertised capabilities. In reality, this looks very similar to what the "hello" response would look like. But it will evolve quickly. The methodology by which the protocol will evolve is important. I'm not going to introduce the new protocol all at once. That would likely lead to endless bike shedding and forward progress would stall. Instead, I intend to tricle out new features and diversions from the existing protocol in small, incremental changes. To support the gradual evolution of the protocol, the on-the-wire advertised protocol name contains an "exp" to denote "experimental" and a 4 digit field to capture the sub-version of the protocol. Whenever we make a BC change to the wire protocol, we can increment this version and lock out all older clients because it will appear as a completely different protocol version. This means we can incur as many breaking changes as we want. We don't have to commit to supporting any one feature or idea for a long period of time. We can even evolve the handshake mechanism, because that is defined as being an implementation detail of the negotiated protocol version! Hopefully this lowers the barrier to accepting changes to the protocol and for experimenting with "radical" ideas during its development. In core, sshpeer received most of the attention. We haven't even implemented the server bits for the new protocol in core yet. Instead, we add very primitive support to our test server, mainly just to exercise the added code paths in sshpeer. Differential Revision: https://phab.mercurial-scm.org/D2061 # no-check-commit because of required foo_bar naming
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12857
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     1
Mercurial
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     2
=========
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     3
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     4
Mercurial is a fast, easy to use, distributed revision control tool
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     5
for software developers.
a9f91c844a3b README: add small introduction
Martin Geisler <mg@lazybytes.net>
parents: 12856
diff changeset
     6
33618
76b171209151 README: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26421
diff changeset
     7
Basic install::
0
9117c6561b0b Add back links from file revisions to changeset revisions
mpm@selenic.com
parents:
diff changeset
     8
3935
1158d7018052 Move README info to wiki
Matt Mackall <mpm@selenic.com>
parents: 3847
diff changeset
     9
 $ make            # see install targets
1158d7018052 Move README info to wiki
Matt Mackall <mpm@selenic.com>
parents: 3847
diff changeset
    10
 $ make install    # do a system-wide install
1158d7018052 Move README info to wiki
Matt Mackall <mpm@selenic.com>
parents: 3847
diff changeset
    11
 $ hg debuginstall # sanity-check setup
1158d7018052 Move README info to wiki
Matt Mackall <mpm@selenic.com>
parents: 3847
diff changeset
    12
 $ hg              # see help
205
d255d99a7cbd README: integrate some changes from Kevin Smith
mpm@selenic.com
parents: 204
diff changeset
    13
33618
76b171209151 README: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26421
diff changeset
    14
Running without installing::
16217
df5ecb813426 readme: mention how to run in-place
Ross Lagerwall <rosslagerwall@gmail.com>
parents: 12857
diff changeset
    15
df5ecb813426 readme: mention how to run in-place
Ross Lagerwall <rosslagerwall@gmail.com>
parents: 12857
diff changeset
    16
 $ make local      # build for inplace usage
df5ecb813426 readme: mention how to run in-place
Ross Lagerwall <rosslagerwall@gmail.com>
parents: 12857
diff changeset
    17
 $ ./hg --version  # should show the latest version
df5ecb813426 readme: mention how to run in-place
Ross Lagerwall <rosslagerwall@gmail.com>
parents: 12857
diff changeset
    18
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 16217
diff changeset
    19
See https://mercurial-scm.org/ for detailed installation
3935
1158d7018052 Move README info to wiki
Matt Mackall <mpm@selenic.com>
parents: 3847
diff changeset
    20
instructions, platform-specific notes, and Mercurial user information.