-
Notifications
You must be signed in to change notification settings - Fork 8
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
add figures to illustrate ssh forwardings #41
base: master
Are you sure you want to change the base?
Conversation
@@ -59,46 +59,50 @@ SSH 配置 TCP 端口转发的格式为 `[bind_address:]port:host:hostport`,SS | |||
|
|||
本地端口转发(**L**ocal port forwarding) | |||
|
|||
![](E:\erchius\Git\storage\igem\Linux201-docs\docs\images\ssh\local-forward.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
: 在本地上监听一个端口,将收到的数据转发到远程主机的指定端口。即**将远程主机上某个服务的端口转发到本地**,使本地的其他程序可以通过 SSH 访问到远程的服务。例如将远程主机的 80 端口转发到本地的 8080: | ||
|
||
```shell | ||
ssh -L 8080:localhost:80 example | ||
``` | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不建议添加多余的 whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文本建议包裹在 \textrm 里面,而命令包裹在 \texttt 里。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中英、中文与阿拉伯数字之间需要有空格。
Also if you don't mind, check out https://mermaid.js.org/, a LaTeX PNG probably wouldn't fit here (dark mode, text selection, etc.) |
原来有mermaid插件,感谢提示 |
我觉得这篇 blog 里的图画得更好,考虑直接引用? |
确实,但又回到了那个问题
Though not LaTeX, it still disallow text selection and wont fit in dark mode |
Dark mode and Text selection isn't a must per say. 我最开始在想既然你用 LaTeX 画了那么不如导出一个 SVG 然后 embed 进来,这样会好一点,然后我觉得 Mermaid 完全能做这件事情…… 那个 blog 的图画的不错,我个人觉得会比这边 PR 里的图更直观一点,但是 copyright 的问题还是要注意一下。 然后稍等我来研究下 Mermaid 的问题 |
其实也可以直接插两张图片,这个主题是有 image auto switch 的支持的 https://squidfunk.github.io/mkdocs-material/reference/images/?h=dark#light-and-dark-mode |
flowchart LR
subgraph A[本地]
direction TB
local[程序或用户]
localhost[主机]
local --> localhost
end
subgraph B[远程]
direction TB
remote[主机]
remoteService[服务]
remote --> remoteService
end
localhost --> remote
local --> remoteService
ok 所以 Mermaid 应该是没戏了,文档里写了 Limitation
考虑画两张图吧,dark mode 下看亮色图片真的不怎么舒服 |
我想干这个事很久了.jpg
为ssh forwarding添加了三幅箭图来说明这些forwarding的功能,
这些quiver由q.uiver.app 生成