Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix some typos in 'under the hood' doc #324

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 14 additions & 3 deletions packages/sshnoports/UnderTheHood.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ In brief
- The client (`sshnp`) creates a unique guid for the session
- and sends a request notification to the `sshrvd` for a port1/port2 pair
for this sessionId
- and receives a response notification (rv_host, rv_port_1, rv_port_2)
- The sshrvd
- finds a pair of available ports
- opens server sockets for both of them
- **Note**: rvd will allow just a single client socket to connect to each
server socket
- and will bridge them together once the rvd has received the
sessionId on both sockets
- sends response to the client
- The client
- receives the response notification from sshrvd (rv_host, rv_port_1,
rv_port_2)
- and sends a request notification to the `sshnpd` including the sessionId
and the rv_host:rv_port_1
- The daemon (`sshnpd`)
Expand All @@ -31,7 +41,8 @@ In brief
- The client
- binds a local server socket
- and opens a socket to the rv_host:rv_port_2
- and bridges them together
- and writes the sessionId on it
- and bridges the sockets together
- The client displays a message to the user that they may now
`ssh -p $local_port $username@localhost`, and exits

Expand Down Expand Up @@ -103,7 +114,7 @@ sequenceDiagram
C->>R: (Spawned) Open socket $npc_to_rv to host:port_2
C->>R: (Spawned) write "$sessionId\n" to $npc_to_rv socket
C->>C: (Spawned) Create server socket $npc_local listening on $local_port
C->>C: (Spawned) Join $npd_to_rv and $npd_to_sshd <br> i/o streams, and vice versa
C->>C: (Spawned) Join $npc_local and $npc_to_rv <br> i/o streams, and vice versa
C->>C: If spawned successfully, Write to stdout: "ssh -p $local_port $username@localhost"
```

Expand Down