# 【抛弃向日葵、Todesk】配置Windows自带的远程控制桌面，更流畅，更安全

By [ypfkk](https://paragraph.com/@ypfkk) · 2023-04-05

---

准备工作
====

#### 需要有一台服务器

#### 下面我用Ubuntu系统的服务器做演示

1、下载最新版本
========

##### 不考虑用最新版的可以直接用下面的命令 忽略下面查看版本号的步骤

##### [https://github.com/fatedier/frp/releases](https://github.com/fatedier/frp/releases)

打开链接去看最新版本号，替换下面命令中的版本号即可

###### 输入下面的命令

    wget https://github.com/fatedier/frp/releases/download/v0.48.0/frp_0.48.0_linux_amd64.tar.gz
    tar -zxvf frp_0.48.0_linux_amd64.tar.gz;mv frp_0.48.0_linux_amd64 frp
    cd frp
    

![](https://storage.googleapis.com/papyrus_images/265a2c47e9dbcb93ef9d72623a48b1a168da23a952122c5b0f55d0bb81457341.png)

![](https://storage.googleapis.com/papyrus_images/18d880d738bb2bf36d30da68cf2d31c18f81b2c03225debaf65b2f176b0f7e7e.png)

2、把Frp设置为服务器开机自启
================

官方文档位置：[https://gofrp.org/docs/setup/systemd/](https://gofrp.org/docs/setup/systemd/)

###### 输入下面的命令，一般Ubuntu系统都自带 不输入也行

![](https://storage.googleapis.com/papyrus_images/926e2b875aa7c8badec8fd1569cd7639ce1e6fe97c9c3d54bbccdff2065701b3.png)

###### 输入下面的命令 编辑内容并保存

    nano /etc/systemd/system/frps.service
    

#### 修改下面的内容 并复制粘贴进去

    [Unit]
    Description = frp server
    After = network.target syslog.target
    Wants = network.target
    
    [Service]
    Type = simple
    # 只需要修改下面的内容即可   2个端口号 和最后的123456  都可以修改   第一个7100端口号修改后记好后面要用
    ExecStart = /root/frp/frps --bind_port 7100 --dashboard_port 7150 --token 123456
    
    [Install]
    WantedBy = multi-user.target
    

![](https://storage.googleapis.com/papyrus_images/0147062b7de8d70ad14fc8893824eda4960f0b982202ced439c8f5aea6ae28ba.png)

###### 然后按下Ctrl+X 退出

![](https://storage.googleapis.com/papyrus_images/821fa9f43df14b7747812c683ba201ce248b618b2a54db15100576cd7663a4b5.png)

###### 输入Y

![](https://storage.googleapis.com/papyrus_images/c4ae75091e1250f7ead3f0134c6546bf623a1eb2044108864d228859fb231c83.png)

###### 然后回车键完成

#### 设置开机自启

    systemctl enable frps
    

#### 启动程序

    systemctl start frps
    

![](https://storage.googleapis.com/papyrus_images/e261f37e6e5f3c136b8cb4bbd9d91ff8dc13e944cb9c1f9dac0d8e183dedf02e.png)

#### 查看状态

    systemctl status frps
    

![](https://storage.googleapis.com/papyrus_images/1e00db45711c0696e50de0ec7c97260d72a631829fcadb9d57da76e4b6ece09c.png)

#### 上面显示successfully 然后服务器方面设置就ok了

3、Windows系统 下载软件 修改配置
=====================

#### 去下载 对应的软件 如果上面修改版本号了 这里一样 最好用一个版本的

[https://github.com/fatedier/frp/releases/tag/v0.48.0](https://github.com/fatedier/frp/releases/tag/v0.48.0)

#### 一般下载后缀是amd64的 如果后面步骤执行出问题 回来更换下载其他Windows版本的包

![](https://storage.googleapis.com/papyrus_images/fc7e7d5f3d081e33d7f203e5d7b518dcfccc7ebf11f59b7a5243f79411e89860.png)

可能会报毒，因为这个东西用途比较广泛，但是肯定无毒的，Github开源项目 66k的星星，有毒可完犊子了，所以放心使用！

设置白名单，Win11系统自带的防护也会报毒同样加白名单，或者关闭防护，这个自己查资料处理

#### 解压后只需要留下两个文件，并且记录好存放的位置

![](https://storage.googleapis.com/papyrus_images/7e5e4676ad79d4996adb93452aaed155172c129d04eff687b6211fe21e36e2c2.png)

#### 编辑frpc.ini文件（可以用记事本打开修改）

    [common]
    server_addr = 你的服务器IP
    server_port = 上面设置的第一个端口号 默认是7100
    token = 上面设置的Token 默认是123456
    
    [ssh]
    type = tcp
    local_ip = 127.0.0.1
    local_port = 3389
    remote_port = 6000
    

###### 修改后复制粘贴 最终结果应该是像下面一样 相关参数改成你自己的就行了

image-20230405161902492

![](https://storage.googleapis.com/papyrus_images/b6bc5280f8c5375d025b29d716f3f7c05adbf149007efba01515fa2d4bf9f19a.png)

#### 记得保存 然后关闭即可

#### 最后的6000端口号也可以修改，改了的话后面用到6000时候记得也同时修改

4、修改系统设置，开启允许远程控制自己的电脑
======================

![](https://storage.googleapis.com/papyrus_images/79e55505ae99c88ba2c5a2e1f59fef24d4ee53f0494e17edf0ecc3b77cedbbd6.png)

![](https://storage.googleapis.com/papyrus_images/59fe03cb869f8f144e7adf5a2a3ef0fb3fbbcd1b48868700ca8c9a24b9c6fdae.png)

![](https://storage.googleapis.com/papyrus_images/4f668bcad29df29b757b4a9f6c1b47b904e5a525e49830b693778ea1f2ae9545.png)

看到这里正常有你的微软账号即可 设置马上完毕 差最后一步了
=============================

5、【最后一步】设置Windows的开机自启
======================

#### 开始菜单里面搜索计划

![](https://storage.googleapis.com/papyrus_images/a7bd828ccd320a20e3079e7ba91769d246ef01cef77add8dda5f376f54f6ab08.png)

#### 打开任务计划程序

#### 窗口 右上角点击 创建基本任务

![](https://storage.googleapis.com/papyrus_images/aae387487e00ca6cd23a520ee283d506d1ebbab754dbd90b139512a0d36988b4.png)

![](https://storage.googleapis.com/papyrus_images/11ff5460a2a79b5280ce87ddf0c19521af110372a8e08f998196b810844c14bd.png)

![](https://storage.googleapis.com/papyrus_images/e43e4f711c8e45845a305be4603face852ea5a9c30ddbaf2af12f0a792139e7a.png)

![](https://storage.googleapis.com/papyrus_images/9053a26b5763dc35e25cd80bb0f6895903a52f2724c23a77c8be862498d1a82f.png)

![](https://storage.googleapis.com/papyrus_images/c088777cf3442bde8bfff284d51154c3f97461e49f79a944b1c2fac348968829.png)

![](https://storage.googleapis.com/papyrus_images/1930a489b40682b3b2500ef50301c41b273209c526f6d06bf65acaec2e51b4a8.png)

#### 点击完成

#### 这一步保证运行时候不显示窗口 ，后台运行

![](https://storage.googleapis.com/papyrus_images/3fe5bb3f2e37a1ed6a8e64c280ac2cd216a464a6dcfda20cff98d4d65ad91111.png)

![](https://storage.googleapis.com/papyrus_images/0d96103c42b83687f774ecb0cfa134b4c7f6cf48c3d17c0a165b9a9f2cabddea.png)

**完成了！现在用其他电脑或者手机上去Google应用商店下载**

电脑端远程连接
=======

![](https://storage.googleapis.com/papyrus_images/f764096255c3647dcd938b82b49869c17b93a1843e41409a0f34d114928d4bdc.png)

#### 输入你服务器Ip:6000链接即可，正常情况会提示输入密码，输入你的账号密码登录即可！

![](https://storage.googleapis.com/papyrus_images/af478150f2c7821245e344b248049304e725ab52a29fcb3676c4c95101765266.png)

手机端远程连接
=======

![](https://storage.googleapis.com/papyrus_images/7d14b5daacd31de14c9f04d89d2c64196c1d0f28829f79bcf861b019fa11acf7.png)

![](https://storage.googleapis.com/papyrus_images/e863339fd0b409fc7eaaba88c9bf3dccb0c4909783a09181c49fe80fb5f8f385.jpg)

#### 正常情况会提示输入密码，输入你的账号密码登录即可！

---

*Originally published on [ypfkk](https://paragraph.com/@ypfkk/todesk-windows)*
