id: 2a7449d641a943bc96b245b788af76cb
parent_id: 
item_type: 1
item_id: b70535f83eb948c9ae3f046b42c0b2b9
item_updated_time: 1764345493559
title_diff: "[{\"diffs\":[[1,\"文章 用开源免费的内网穿透工具 frp，实现远程桌面和文件传输\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":31}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>文章: 用开源免费的内网穿透工具 frp，实现远程桌面和文件传输</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"application-data:ANDROID_CLIP_TYPE\\\" content=\\\"full_and_local\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"22847\\\"></a>\\\r\\\n<h1>文章: 用开源免费的内网穿透工具 frp，实现远程桌面和文件传输</h1>\\\r\\\n\\\r\\\n<div>\\\n<span><div style=\\\"font-size: 16px\\\"><div style=\\\"text-size-adjust: 100%; font-size: 16px;\\\"><div style=\\\"padding-top: 60px;\\\"><div style=\\\"position:relative;overflow:hidden;margin:0px;padding:0px;background-position:50% center;background-size:cover;height:618px;background-image:url('https://sspai.com/flipboard/post/60852&quot;https://cdn.sspai.com/article/c31cb2d0-a951-bde3-0dd3-5231427a36c0.jpg?imageMogr2/quality/95/thumbnail/!700x525r/gravity/Center/crop/700x525&quot;');\\\"></div><div style=\\\"max-width:740px;margin:17px 1.0625rem;padding:0px;height:2.5rem;text-align:left;\\\"><span style=\\\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\\\"><br/></span></div><h1 style=\\\"font-size: 24px; margin: 17px 1.0625rem; max-width: 740px; padding: 0px;\\\"><span style=\\\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\\\"><a href=\\\"https://sspai.com/post/60852\\\" style=\\\"background-color: transparent; font-size: 24px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.3; font-weight: 400; color: rgb(68, 68, 68); text-decoration: none;\\\">用开源免费的内网穿透工具 frp，实现远程桌面和文件传输</a></span></h1><blockquote style=\\\"max-width: 740px; margin: 17px 1.0625rem; font-size: 16px; padding: 0px 1.0625rem; border-left: 3px solid rgb(215, 25, 26); border-top-color: rgb(215, 25, 26); border-right-color: rgb(215, 25, 26); border-bottom-color: rgb(215, 25, 26);\\\"><span style=\\\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\\\"><span style=\\\"font-size: 16px; color: rgb(153, 153, 153); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.8; font-weight: 400;\\\">使用 frp 这个内网穿透工具以及一个拥有公网 IP 的云服务器，就能实现商业远程控制软件的大部分功能。</span></span></blockquote><div style=\\\"max-width: 740px; margin: 17px 1.0625rem; font-size: 14px;\\\"><div style=\\\"float:left;margin:0.53125rem 0.53125rem 0.53125rem 0px;\\\"><span style=\\\"font-size: 14px; color: rgb(102, 102, 102); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 0; font-weight: 400;\\\">2020-06-09 02:46:08 PM</span></div><div style=\\\"float:left;margin:0.53125rem 0px;\\\"><span style=\\\"font-size: 14px; color: rgb(102, 102, 102); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 0; font-weight: 400;\\\">来自：化学心情下2normal</span></div></div></div><div style=\\\"word-break: break-word; clear: left; overflow: hidden; max-width: 740px; margin: 0px auto; padding: 0px 1.0625rem; font-size: 18px;\\\"><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">作为一个 IT 技术人员，我时常需要通过远程控制公司 PC 来进行一系列的 IT 运维操作。目前能实现远程控制操作的大多数工具都需要另外付费（商业或者企业环境），免费版本也存在相当多的限制，例如远程控制的带宽有限制，文件传输的稳定性也大受影响。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">因此，如果能利用现有的一些资源和开源工具，实现商业软件才能实现的远程控制功能，对我来说会方便不少。在经历了一番探索后，我利用 frp 这样的内网穿透工具，组合目前电脑本身自带的工具，实现了诸如远程桌面控制，远程文件传输，远程 CMD 等一系列的操作，基本上代替了商用的远程传输工具。</span></div><h4 style=\\\"margin: 1rem 0px; padding: 0px; font-size: 24px;\\\"><span style=\\\"font-size: 24px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.3; font-weight: 600;\\\">frp：将内网机器通过公网 IP 连接起来</span></h4><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">frp 是一个可用于内网穿透的高性能的反向代理应用，可以作为两个内网机器通过公网 IP 进行桥接的桥梁。通过其支持各种服务和传输协议，我们就可以实现一系列远程控制操作。（frp 的 </span><a href=\\\"https://github.com/fatedier/frp\\\" style=\\\"background-color: transparent; font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; text-decoration: underline;\\\" target=\\\"_blank\\\">Github</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"> 主页上也用结构图解释了具体的工作原理，感兴趣的话可以前往了解。）</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/e3e4d8a2f79d4e2dbec697f674fc49ce\\\" type=\\\"image/jpeg\\\" data-filename=\\\"f6756df73cb137cc83a0ab03549fc26a.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">实现下面所有操作的前提是：</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: bolder;\\\">你需要拥有一台有公网 IP 的云服务器</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">。而经过我的测试，即便是带宽仅为 1M 小水管的云服务器也可以支撑几乎后面的所有操作。我接下来的操作中，被控目标主机 PC 操作系统是： Windows 10 v2004，云服务器为 CentOS 7.8。控制端为 Windows 10 v 1909。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">首先，我们需要对拥有公网的云服务器进行设置，根据云主机的系统版本</span><a href=\\\"https://github.com/fatedier/frp/releases\\\" style=\\\"background-color: transparent; font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; text-decoration: underline;\\\" target=\\\"_blank\\\">从 frp 的 GitHub 中下载最新版本的运行包</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">，对于 Linux 版本，我的策略是下载到本地，然后通过 7zip 完全解压，之后将其中的 frps 以及 frps.ini 这两个文件通过 SFTP 工具（比如 WinSCP 或者 Xftp ）传输到目录 </span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">/etc/frp</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"> 。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/78773c85596149c89e3ff3381047576d\\\" type=\\\"image/jpeg\\\" data-filename=\\\"89b64e7bbf445497d3f7de502ddf5748.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">接着，使用 SSH 工具进入到该目录，通过 Vim 打开 frps.ini。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/2471f0cd3c4d471c8775aa0a562c5027\\\" type=\\\"image/jpeg\\\" data-filename=\\\"19ea6cbe825bd3f40e1a5727ec80e44e.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">默认的监听端口是 7000。如果希望更换端口，可以按键盘上的</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">i</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">键开启编辑，将其中的</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">bind_port</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">中后面的端口改为你想要的端口，然后按 </span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">ESC</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">关闭编辑模式，最后输入</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">:wq</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">保存编辑。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">我们需要开启 frp 的服务端，对于 Linux 主机，可以执行这一条命令来将其作为进程放到系统后台运行：</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">nohup /etc/frp/frps -c /etc/frp/frps.ini &amp; &amp;&gt; /dev/null</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">执行后，我们可以通过</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">netstat -lnp|grep 7000</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">看一下进程是否正常运行。到这里，云端服务的操作基本上就完成了。如果你使用的云服务商的主机绑定了安全组，需要手动登录服务器的云控制台，在网络安全组中将 7000 端口设置为进站出站的放行策略。</span></div><h4 style=\\\"margin: 1rem 0px; padding: 0px; font-size: 24px;\\\"><span style=\\\"font-size: 24px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.3; font-weight: 600;\\\">使用 frp 内网穿透实现 RDP 远程桌面</span></h4><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">在针对 Windows 系统的远程控制中，兼容性最好的当然是 RDP 远程桌面——无需安装第三方软件，非常简单容易进行设置。微软也在其他系统平台上推出了微软远程桌面客户端，让你几乎能在所有的主流平台上实现远程控制 Windows 主机。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">首先，我们需要设置一下被控 PC 端（也就是希望被远程控制的设备）在</span> <a href=\\\"https://github.com/fatedier/frp/releases\\\" style=\\\"background-color: transparent; font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; text-decoration: underline;\\\" target=\\\"_blank\\\">frp 的 GitHub 下载页面</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"> 中下载对应的执行包，这里因为内网目标被控主机是 Windows 10，因此需要下载 Windows 版本。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">解压缩之后，将其中的 frpc.exe 以及 frpc.ini 拷贝到</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">C:\\\\ftp</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">这个目录下面，然后使用编辑器对 frpc.ini 文件进行编辑。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/5ce050c517f445cf9295932d5a198d70\\\" type=\\\"image/jpeg\\\" data-filename=\\\"f636764d015fa97b2c0a612edd61072f.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">frpc.ini 文件中主要分为两个部分，最上面</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[common]</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">是和云端服务器通信的部分，因此</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">server_addr</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">填写的是对应的云服务器的 ip 地址，而下面这个</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">server_port</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">则是刚才我们在服务端所设置的</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">bind_port</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">，两者需要保持一致。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/a7cd4a1e131b4f36a90da21ea0390e24\\\" type=\\\"image/jpeg\\\" data-filename=\\\"801b4bcbd369b320f4b9f8b3589b29f8.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">下面部分是针对需要内网穿透的服务，比如针对 RDP 的代码写法如下：</span></div><div style=\\\"font-size: 1em;\\\"><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[RDP]</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">type = tcp</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_ip = 127.0.0.1</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_port = 3389</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">remote_port = 7002</span></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">其中</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_ip</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">指的是本机处于内网的 IP 地址，如果你是自己使用，只需要写 127.0.0.1 即可，而</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_port</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">指的是对应的服务端口，RDP 服务端口就是 3389。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">至于</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">remote_port</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">就是远程用来映射的端口，最后根据原理，如果想通过远程桌面控制当前内网主机，其对应的地址就是：</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[server_port]</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">:</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[remote_port]</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">（公网服务器 IP:映射的端口号）</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">完成之后点击保存，接着我们需要对电脑的远程进行设置。右键点击「此电脑」-「属性」，找到「远程设置」，在「远程桌面」中勾选「允许远程连接到此计算机」，同时取消「仅允许运行使用网络级别身份验证的远程桌面的计算机连接」的勾选，然后点击「确定」。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/71e7215725254d4a8eb630dcdc08059f\\\" type=\\\"image/jpeg\\\" data-filename=\\\"5d36e96e4375f49341d46c97f9e7cb18.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">最后，我们需要打开 Windows 防火墙给以上服务予以放行，在</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">控制面板\\\\所有控制面板项\\\\Windows Defender 防火墙\\\\允许的应用</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">中点击「更改设置」，然后在下面找到「远程桌面」和「远程桌面（webSocket）」并分别勾选上「专用」和「公用」。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/7a3d54ee9fbb4ac1888703a8a4eff33f\\\" type=\\\"image/jpeg\\\" data-filename=\\\"9fc1899e66637d12136b2773192c8f52.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">之后我们打开</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">c:\\\\frp</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">目录，按住键盘上的</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">shift</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">键后右键选择「在此处打开 Powershell 窗口」，执行以下命令来开启 frp 客户端：</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">.\\\\frpc.exe -c frpc.ini</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">如果下面的终端输入显示有</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[RDP] start proxy success</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">则表示实际上服务已经成功开启，使用控制端的「微软远程桌面」应该就可以实现远程控制了。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/ff5bac9b824a4078b19a171a773194ce\\\" type=\\\"image/jpeg\\\" data-filename=\\\"e6ae1164cf171488a96adb974ff0aaeb.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">接下来我们就可以用控制端的 PC 测试一下，打开「远程桌面连接」，然后在「计算机」这一栏中输入云主机的公网 IP 后映射的端口号，比如我设置的 7002，然后点击连接。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/f373965ec346436aab0593cb4f5de99e\\\" type=\\\"image/jpeg\\\" data-filename=\\\"f20ea23a186857e066f22d6a355bd0bf.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">然后在弹出的警告中选择「是」。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/0e28424b45ee40cdb56f68c5c3c4e357\\\" type=\\\"image/jpeg\\\" data-filename=\\\"5040bbeb8e368a11eaa8568c168d9b30.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">输入远程主机的登录用户名和密码之后，你就可以通过远程桌面来控制内网中的被控主机了！</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">除了正常的操作之外，你还可以实现一定程度的文件传输，比如说你可以从控制端的 PC 中复制文件并在远程桌面点击粘贴来实现文件传输，其实这个操作和那些商业远程控制软件非常类似，传输的速度和云服务器的公网带宽有关。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/275629223900428084932239870402ef\\\" type=\\\"image/jpeg\\\" data-filename=\\\"59a7d41bce5d279543fedafd470bde8a.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">虽然这样实现了远程控制，但 frp 的客户端运行却需要一直在前台开启 Powershell 终端。其实，完全可以使用更加高效率的做法：将可执行文件打包成系统服务，然后让服务在后台自动运行。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">这里我们通过这个 winsw 小工具来实现，在其</span> <a href=\\\"https://github.com/winsw/winsw/releases\\\" style=\\\"background-color: transparent; font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; text-decoration: underline;\\\" target=\\\"_blank\\\">GitHub 的 releases 页面中下载</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"> 对应 .net 运行时的版本，如果你使用的是 Windows 10 那么可以直接下载「WinSW.NET461.exe」这个文件，同时需要下载「sample-minimal.xml」这个配置文件，然后将两者下载到 frp 对应的</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">C:\\\\frp</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">这个文件夹，分别改名为「winsw.exe」和「winsw.xml」。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/980aaaccda05405ca7ee2b7d4c080f15\\\" type=\\\"image/jpeg\\\" data-filename=\\\"1329427c6046426ee3cbe6731d899fd1.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">使用代码编辑器打开「winsw.xml」，将配置文件修改为：</span></div><div style=\\\"font-size: 1em;\\\"><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;service&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;id&gt;frp&lt;/id&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;name&gt;frp&lt;/name&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;description&gt;frp service&lt;/description&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;executable&gt;frpc.exe&lt;/executable&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;arguments&gt;-c frpc.ini&lt;/arguments&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;onfailure action=&quot;restart&quot; delay=&quot;60 sec&quot;/&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;onfailure action=&quot;restart&quot; delay=&quot;120 sec&quot;/&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;logmode&gt;reset&lt;/logmode&gt;</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">&lt;/service&gt;</span></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">点击保存之后，在 powershell 终端中按下</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">ctrl + c</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">结束此前的 frpc 进程，然后输入</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">.\\\\winsw install</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">来安装服务，然后再输入</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">.\\\\winsw start</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">来启动服务，期间如果弹出 UAC 点击允许即可，这样 frp 就被安装成系统服务在后台默默运行了。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/6613901952344aaba6c7a0fb0f6cc8ab\\\" type=\\\"image/jpeg\\\" data-filename=\\\"5feba421d96254425bce01e7ee2cbc56.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><h4 style=\\\"margin: 1rem 0px; padding: 0px; font-size: 24px;\\\"><span style=\\\"font-size: 24px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.3; font-weight: 600;\\\">更高效的文件传输：使用 frp 实现 SFTP 文件传输</span></h4><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">虽然使用远程桌面可以覆盖远程控制中大部分的使用场景，但如果遇到需要传输文件的场景，远程控制简单的复制粘贴效率就比较低了。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">通常远程文件传输可以通过 FTP 服务来解决。但 FTP 在服务配置上相当麻烦，一方面需要安装额外的第三方软件，并不能使用系统现成的软件来实现；另一方面服务相关的设置上都相当复杂。Windows 10 从 v1809 开始原生支持 OpenSSH，这让文件传输有了新的选择——通过 SSH 协议实现文件传输，无论是功能实现还是操作都变得既简单又高效。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">首先我们需要在 Windows 10 上安装 openSSH 这个组件，打开 「Windows 设置 - 应用 - 可选功能」，点击「添加功能」找到 「OpenSSH 服务器」和「OpenSSH 客户端」点击安装。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/32725749fb9942d189de14390d71ad2a\\\" type=\\\"image/jpeg\\\" data-filename=\\\"c8cb5a1f8d9c2cd5cc56c1351aadda67.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">之后打开「控制面板 - 管理工具」中「服务」，找到「OpenSSH Authentication Agent」以及「OpenSSH SSH Server」两个服务，都将其修改为「自动」并立即启动。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/7d0925ddd9c2478f99c181a4d82c82aa\\\" type=\\\"image/jpeg\\\" data-filename=\\\"c9a11e904d1cd1c06de8f0e45232e797.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">之后再次打开防火墙设置</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">控制面板\\\\所有控制面板项\\\\Windows Defender 防火墙\\\\允许的应用</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">，找到「OpenSSH Server」看是否已经勾选了「专用」和「公用」，之后重启 PC。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/154d6b1fa5c947688358c4809ae96e52\\\" type=\\\"image/jpeg\\\" data-filename=\\\"4931c687cacfd8bc4de9abad86df1b12.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">重启之后，打开 PowerShell 并进入</span> <span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">c:\\\\frp</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">目录中，输入</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">.\\\\winsw stop</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">暂停服务，使用编辑器打开 frpc.ini，添加有关 ssh 的映射配置：</span></div><div style=\\\"font-size: 1em;\\\"><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">[ssh]</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">type = tcp</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_ip = 127.0.0.1</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">local_port = 22</span></div><div><span style=\\\"color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">remote_port = 6000</span></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">这里远程的映射端口为 6000，更改完成之后保存，并使用 PowerShell 输入</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">.\\\\winsw start</span> <span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">重启 frp 服务。至此被控端的 SSH 映射就已经配置完毕了。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">下面我们来实验一下，从控制端 PC 打开 ssh 客户端（举例客户端为 Xshell），在新建会话中的「主机」一栏输入公网云服务器的 IP 地址，在端口号处输入此前设置的映射端口号 6000，点击「连接」。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/a3a23b1894e341b3a88fb2974f59c15e\\\" type=\\\"image/jpeg\\\" data-filename=\\\"79e4878802c7d104fb6e00e90fb3b51f.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">在弹出的对话框中，输入被控电脑的登录账户和密码（如果绑定了 Microsoft ID 就输入此 ID），完成连接之后你就可以看到终端显示为被控主机的用户目录。我们通过 SSH 协议连接到了被控主机的 Powershell 终端中，这也间接说明 SSH 服务已经开启成功了。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/2d098672c56f4a3fbc070db3d916c1f0\\\" type=\\\"image/jpeg\\\" data-filename=\\\"72846ca09f72ecf3d5137d554747a914.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">既然已经可以通过 SSH 连接，那么使用相同的协议传输文件也是顺理成章。点击 Xshell 功能栏中的 Xftp 就可以直接打开对应的主机文件目录，然后我们可以输入诸如</span><span style=\\\"font-size: 1em; color: rgb(68, 68, 68); font-family: monospace, monospace; line-height: 1.7; font-weight: 400;\\\">/D:/</span><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">这样的路径来进入到不同的存储空间中，文件传输也和传统的 FTP 客户端无疑，只需要选择文件或者文件夹后点击传输即可。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">唯一需要说明的是，如果右侧目录是被控主机系统文件夹，则无法从控制端将文件传输过去，原因是权限不够（这牵涉到 Windows 和 Unix 下用户权限上存在差异）。</span></div><div style=\\\"margin: 2.125rem 0px; width: 100%; text-align: center; padding: 0px;\\\"><div><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"><img src=\\\":/18aef2761c084278aa0cc3760fef82b3\\\" type=\\\"image/jpeg\\\" data-filename=\\\"3236d12bf00324732007c3edf3bbd257.jpg\\\"/></span></div><div style=\\\"margin: 0px 0px 2.125rem; color: rgb(51, 51, 51); font-size: 16px; font-weight: 300;\\\"></div></div><h4 style=\\\"margin: 1rem 0px; padding: 0px; font-size: 24px;\\\"><span style=\\\"font-size: 24px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.3; font-weight: 600;\\\">结语</span></h4><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">本文中，我们使用 frp 这个内网穿透工具以及一个拥有公网 IP 的云服务器。成功实现了一系列商业远程控制软件的功能，需要额外安装的软件都是免费软件或者是开源软件，甚至只是开启系统自带的功能而已。如果你不希望为远程控制功能再额外花钱，不妨按照本文的步骤操作一番。</span></div><div style=\\\"margin: 1.2rem 0px; padding: 0px;\\\"><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">&gt; 下载少数派 </span><a href=\\\"https://sspai.com/page/client\\\" style=\\\"background-color: transparent;\\\"></a><a href=\\\"https://sspai.com/page/client\\\" style=\\\"font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; background-color: transparent; text-decoration: underline;\\\">客户端</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\">、关注 </span><a href=\\\"http://sspai.com/s/KEPQ\\\" style=\\\"background-color: transparent;\\\"></a><a href=\\\"http://sspai.com/s/KEPQ\\\" style=\\\"font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400; background-color: transparent; text-decoration: underline;\\\">少数派公众号</a><span style=\\\"font-size: 18px; color: rgb(68, 68, 68); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 400;\\\"> ，了解更多 Windows 玩法 🚀 </span></div></div><div><blockquote style=\\\"max-width: 21.875rem; margin: 2.125rem auto; font-size: 16px; text-align: left;\\\"><span style=\\\"font-size: 16px; color: rgb(170, 170, 170); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 300;\\\">© 本文著作权归作者所有，并授权少数派独家使用，未经少数派许可，不得转载使用。</span></blockquote><div style=\\\"max-width: 21.875rem; margin: 1.0625rem auto; font-size: 16px; text-align: center;\\\"><div style=\\\"padding: 14px;\\\"><span style=\\\"font-size: 16px; color: rgb(170, 170, 170); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 300;\\\">本页面由 Flipboard 版面渲染引擎自动排版</span></div><div style=\\\"padding: 14px; border-top: 1px solid rgb(238, 238, 238);\\\"><a href=\\\"https://sspai.com/post/60852\\\" style=\\\"background-color: transparent; font-size: 16px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.7; font-weight: 300; color: rgb(102, 153, 255); text-decoration: none;\\\" target=\\\"null\\\">查看原文</a></div></div></div><div><div style=\\\"margin: 20px 1.0625rem 1.0625rem; padding: 6px 0px;\\\"><span style=\\\"font-size: 16px; color: rgb(0, 0, 0); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.8;\\\">关联阅读</span></div><ul style=\\\"margin: 6px 0px 0px; padding: 0px; text-overflow: ellipsis;\\\"><li style=\\\"overflow: hidden; width: 100%; border-top: 1px solid rgb(238, 238, 238); font-size: 16px; list-style-type: none;\\\"><div><a href=\\\"https://sspai.com/post/61066\\\" style=\\\"background-color: transparent;\\\"><div style=\\\"background-color:rgb(238, 238, 238);width:100%;height:200px;\\\"></div></a><a href=\\\"https://sspai.com/post/61066\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><h4 style=\\\"display: -webkit-box; overflow: hidden; margin: 10px 16px; -webkit-box-orient: vertical; -webkit-line-clamp: 2;\\\"><a href=\\\"https://sspai.com/post/61066\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><a href=\\\"https://sspai.com/post/61066\\\" style=\\\"font-size: 16px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.4; background-color: transparent; color: rgb(0, 0, 0); text-decoration: none; font-weight: 400;\\\">派评 | 近期值得关注的 19 款 App</a></h4></div></li><li style=\\\"overflow: hidden; width: 100%; border-top: 1px solid rgb(238, 238, 238); font-size: 16px; list-style-type: none;\\\"><div><a href=\\\"https://sspai.com/post/61014\\\" style=\\\"background-color: transparent;\\\"><div style=\\\"background-color:rgb(238, 238, 238);width:100%;height:200px;\\\"></div></a><a href=\\\"https://sspai.com/post/61014\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><h4 style=\\\"display: -webkit-box; overflow: hidden; margin: 10px 16px; -webkit-box-orient: vertical; -webkit-line-clamp: 2;\\\"><a href=\\\"https://sspai.com/post/61014\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><a href=\\\"https://sspai.com/post/61014\\\" style=\\\"font-size: 16px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.4; background-color: transparent; color: rgb(0, 0, 0); text-decoration: none; font-weight: 400;\\\">Windows 平台的 Pop Clip，可以自定义的划词「加速器」：Pantherbar</a></h4></div></li><li style=\\\"overflow: hidden; width: 100%; border-top: 1px solid rgb(238, 238, 238); font-size: 16px; list-style-type: none; border-bottom: 1px solid rgb(238, 238, 238);\\\"><div><a href=\\\"https://sspai.com/post/60986\\\" style=\\\"background-color: transparent;\\\"><div style=\\\"background-color:rgb(238, 238, 238);width:100%;height:200px;\\\"></div></a><a href=\\\"https://sspai.com/post/60986\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><h4 style=\\\"display: -webkit-box; overflow: hidden; margin: 10px 16px; -webkit-box-orient: vertical; -webkit-line-clamp: 2;\\\"><a href=\\\"https://sspai.com/post/60986\\\" style=\\\"background-color: transparent; overflow: hidden; width: 100%; cursor: pointer;\\\"></a><a href=\\\"https://sspai.com/post/60986\\\" style=\\\"font-size: 16px; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 1.4; background-color: transparent; color: rgb(0, 0, 0); text-decoration: none; font-weight: 400;\\\">用 tagLyst 管理业务记录，我的电子化工作文件管理方案</a></h4></div></li></ul></div></div></div><div><br/></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":46445}]"
metadata_diff: {"new":{"id":"b70535f83eb948c9ae3f046b42c0b2b9","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345883574,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:24.944Z
created_time: 2025-11-28T16:20:24.944Z
type_: 13