<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.3">Jekyll</generator><link href="https://zhangchao.info/feed.xml" rel="self" type="application/atom+xml" /><link href="https://zhangchao.info/" rel="alternate" type="text/html" /><updated>2023-02-08T02:33:12+00:00</updated><id>https://zhangchao.info/feed.xml</id><title type="html">且随疾风前行，身后亦需留心</title><subtitle>Personal WebSite
</subtitle><author><name>张 超 Zhang Chao</name><email>zhangchaogoo@gmail.com</email></author><entry><title type="html">在Linux服务器上安装VSCode Server，实现免VPN访问局域网服务器</title><link href="https://zhangchao.info/2023/01/29/%E5%9C%A8Linux%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E5%AE%89%E8%A3%85VSCode-Server-%E5%AE%9E%E7%8E%B0%E5%85%8DVPN%E8%AE%BF%E9%97%AE%E5%B1%80%E5%9F%9F%E7%BD%91%E6%9C%8D%E5%8A%A1%E5%99%A8.html" rel="alternate" type="text/html" title="在Linux服务器上安装VSCode Server，实现免VPN访问局域网服务器" /><published>2023-01-29T00:00:00+00:00</published><updated>2023-01-29T00:00:00+00:00</updated><id>https://zhangchao.info/2023/01/29/%E5%9C%A8Linux%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E5%AE%89%E8%A3%85VSCode%20Server,%E5%AE%9E%E7%8E%B0%E5%85%8DVPN%E8%AE%BF%E9%97%AE%E5%B1%80%E5%9F%9F%E7%BD%91%E6%9C%8D%E5%8A%A1%E5%99%A8</id><content type="html" xml:base="https://zhangchao.info/2023/01/29/%E5%9C%A8Linux%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E5%AE%89%E8%A3%85VSCode-Server-%E5%AE%9E%E7%8E%B0%E5%85%8DVPN%E8%AE%BF%E9%97%AE%E5%B1%80%E5%9F%9F%E7%BD%91%E6%9C%8D%E5%8A%A1%E5%99%A8.html">&lt;h2 id=&quot;背景&quot;&gt;背景&lt;/h2&gt;
&lt;p&gt;作者由于工作学习需要，需要经常在校外通过 VPN 连接到学校内网，然后再通过 SSH 或者 VSCode 连接到实验室的 Linux 服务器上写代码。代码写和跑都在 Linux 服务器上。我觉得连 VPN 有点麻烦，所以尝试用 VSCode Server 省掉这一步，虽然最后成功了，但考虑到最后的体验，还是把此方法作为了备用。&lt;/p&gt;

&lt;h3 id=&quot;优点&quot;&gt;优点&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;不需要 VPN。&lt;/li&gt;
  &lt;li&gt;可以随时随地写代码，也支持网页（iPad）。&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;缺点&quot;&gt;缺点&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;打开代码比较慢，输入命令也比较卡。原因是 Linux 服务器和写代码的客户端都需要和 VSCode 的服务器通信，我感觉和 VPN + SSH 体验差距比较大，也是我放弃的原因。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;步骤&quot;&gt;步骤&lt;/h2&gt;
&lt;p&gt;下载 CLI 客户端到服务器上，解压之后就是一个文件名为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;code&lt;/code&gt; 的可执行文件，然后运行 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./code tunnel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/0.png&quot; alt=&quot;0&quot; /&gt;&lt;/p&gt;

&lt;p&gt;直接回车接受，它会显示一个 GitHub 链接和一个八位的字符串，在网页中打开链接输入这个字符串，然后这个服务器便会和你的账户绑定。
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/1.png&quot; alt=&quot;1&quot; /&gt;
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/2.png&quot; alt=&quot;2&quot; /&gt;
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/3.png&quot; alt=&quot;3&quot; /&gt;&lt;/p&gt;

&lt;p&gt;然后给当前服务器起一个名字，长度不能超过20。
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/4.png&quot; alt=&quot;4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;在自己电脑上的 VSCode 中安装这个 Remote-Tunnels 插件，便可以看到服务器了，或者打开它提供的链接直接在浏览器上写代码。。另外作者把 VSCode Server 跑在了 tmux 里，这样就可以一直开着了。
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/5.png&quot; alt=&quot;5&quot; /&gt;
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/6.png&quot; alt=&quot;6&quot; /&gt;
&lt;img src=&quot;https://github.com/zhangchaosd/superchao/raw/master/_posts/assets/20230130/7.png&quot; alt=&quot;7&quot; /&gt;&lt;/p&gt;

&lt;!--more--&gt;

&lt;hr /&gt;

&lt;!-- If you like TeXt, don't forget to give me a star. :star2:

[![Star This Project](https://img.shields.io/github/stars/kitian616/jekyll-TeXt-theme.svg?label=Stars&amp;style=social)](https://github.com/kitian616/jekyll-TeXt-theme/) --&gt;</content><author><name>张 超 Zhang Chao</name><email>zhangchaogoo@gmail.com</email></author><category term="Linux" /><summary type="html">背景 作者由于工作学习需要，需要经常在校外通过 VPN 连接到学校内网，然后再通过 SSH 或者 VSCode 连接到实验室的 Linux 服务器上写代码。代码写和跑都在 Linux 服务器上。我觉得连 VPN 有点麻烦，所以尝试用 VSCode Server 省掉这一步，虽然最后成功了，但考虑到最后的体验，还是把此方法作为了备用。 优点 不需要 VPN。 可以随时随地写代码，也支持网页（iPad）。 缺点 打开代码比较慢，输入命令也比较卡。原因是 Linux 服务器和写代码的客户端都需要和 VSCode 的服务器通信，我感觉和 VPN + SSH 体验差距比较大，也是我放弃的原因。 步骤 下载 CLI 客户端到服务器上，解压之后就是一个文件名为 code 的可执行文件，然后运行 ./code tunnel 直接回车接受，它会显示一个 GitHub 链接和一个八位的字符串，在网页中打开链接输入这个字符串，然后这个服务器便会和你的账户绑定。 然后给当前服务器起一个名字，长度不能超过20。 在自己电脑上的 VSCode 中安装这个 Remote-Tunnels 插件，便可以看到服务器了，或者打开它提供的链接直接在浏览器上写代码。。另外作者把 VSCode Server 跑在了 tmux 里，这样就可以一直开着了。</summary></entry><entry><title type="html">Welcome</title><link href="https://zhangchao.info/2018/07/01/welcome.html" rel="alternate" type="text/html" title="Welcome" /><published>2018-07-01T00:00:00+00:00</published><updated>2018-07-01T00:00:00+00:00</updated><id>https://zhangchao.info/2018/07/01/welcome</id><content type="html" xml:base="https://zhangchao.info/2018/07/01/welcome.html">&lt;p&gt;A Post with Header Image, See &lt;a href=&quot;https://tianqi.name/jekyll-TeXt-theme/samples.html#page-layout&quot;&gt;Page layout&lt;/a&gt; for more examples.&lt;/p&gt;

&lt;p&gt;Update in 2022&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;assets/pic1.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost:&lt;/p&gt;

&lt;p&gt;You may want to &lt;a href=&quot;https://tianqi.name/jekyll-TeXt-theme/docs/en/configuration&quot;&gt;config the site&lt;/a&gt; or &lt;a href=&quot;https://tianqi.name/jekyll-TeXt-theme/docs/en/writing-posts&quot;&gt;writing a post&lt;/a&gt; next. Please feel free to &lt;a href=&quot;https://github.com/kitian616/jekyll-TeXt-theme/issues&quot;&gt;create an issue&lt;/a&gt; or &lt;a href=&quot;mailto:kitian616@outlook.com&quot;&gt;send me email&lt;/a&gt; if you have any questions.&lt;/p&gt;

&lt;!--more--&gt;

&lt;!-- --- --&gt;

&lt;!-- If you like TeXt, don't forget to give me a star. :star2:

[![Star This Project](https://img.shields.io/github/stars/kitian616/jekyll-TeXt-theme.svg?label=Stars&amp;style=social)](https://github.com/kitian616/jekyll-TeXt-theme/) --&gt;</content><author><name>张 超 Zhang Chao</name><email>zhangchaogoo@gmail.com</email></author><category term="TeXt" /><summary type="html">A Post with Header Image, See Page layout for more examples. Update in 2022 If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost: You may want to config the site or writing a post next. Please feel free to create an issue or send me email if you have any questions.</summary></entry></feed>