使用 frp 实现 Windows 远程桌面连接教程

一、frp 介绍

项目地址:https://github.com/fatedier/frp

FRP (Fast Reverse Proxy) 是一个可用于内网穿透的高性能的反向代理应用,支持 TCP , UDP , HTTP , HTTPS 协议,可以实现 Windows 远程桌面搭建。

使用体验:搭建好了 frp,用了下远程桌面,发现速度比 AnyDesk 快不少,跟 TeamViewer 差不多,TeamViewer 最近商业化查的越来越严了,明明是自用,也会提醒你商业使用,所以搭建一个 frp 服务器作为替代(备用)还是很有必要的。

二、准备工作

需要:

  • 一个有公网 IP 的 VPS 服务器

如果你需要连接的服务器在国内,那么直接选择阿里云或者腾讯云都行,现在轻量应用服务器价格都非常便宜,学生的话更是几十块钱 / 年就能买到 5M 带宽的轻量,用来做远程连接完全够了。

学生优惠:

  • 腾讯云学生:https://cloud.tencent.com/act/campus
  • 阿里云学生:https://developer.aliyun.com/plan/grow-up

其他优惠:

  • 腾讯云秒杀:https://cloud.tencent.com
  • 阿里云云小站:https://www.aliyun.com/minisite/goods

三、frp 服务器端搭建

下载地址:https://github.com/fatedier/frp/releases

一般服务器都是 Linux 系统的,目前最新版本是 0.36.2,直接下载对应的版本:
wget https://github.com/fatedier/frp/releases/download/v0.36.2/frp_0.36.2_linux_amd64.tar.gz

解压:

tar -zxvf frp_0.36.2_linux_amd64.tar.gz
至此,你会得到一个frp_0.36.2_linux_amd64 的文件夹,进入文件夹:

cd frp_0.36.2_linux_amd64

作为服务器端,你只需要关心 2 个文件:

  • frps
  • frps.ini
    其中 frps 是运行程序,frps.ini 是配置文件。

修改 frps.ini :

vi frps.ini
文件内容如下:

bind_port = 7000
dashboard_port = 7500
token = token
dashboard_user = user
dashboard_pwd = pwd

这里主要是配置了绑定的端口(7000),控制面板的端口(7500),token(会在客户端用到),控制面板的 user 用户名和 pwd 密码。

运行 frp 客户端:
./frps -c frps.ini

如果没有问题的话,就会直接运行成功了:
frps started successfully
通过(http://152.67..:7500)可以访问控制面板了。

可以借助 nohup 后台运行 frps,命令如下:
nohup ./frps -c frps.ini > /root/frp/log.log 2>&1 &

通过systemcl设置开机自启动
将frps注册为系统服务

[root@frp_server ~]# vim /usr/lib/systemd/system/frps.service
[Unit]
Description=frp server
After=network.target

[Service]
Type=simple

ExecStart=/usr/local/frp_server/frps -c /usr/local/frp_server/frps.ini
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID

[Install]
WantedBy=multi-user.target
[root@frp_server ~]# systemctl enable frps
[root@frp_server ~]# systemctl start  frps.service
[root@frp_server ~]# systemctl status frps
 frps.service - frp server
   Loaded: loaded (/usr/lib/systemd/system/frps.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-09-25 17:47:44 CST; 20s ago
 Main PID: 4168 (frps)
   CGroup: /system.slice/frps.service
           └─4168 /usr/local/frp_server/frps -c /usr/local/frp_server/frps.ini

Sep 25 17:47:44 frp_server systemd[1]: Started frp server.
Sep 25 17:47:44 frp_server systemd[1]: Starting frp server...

四、frp 客户端配置

下载地址:https://github.com/fatedier/frp/releases

同样是下载 releases,以 Windows 为例,下载与服务器端对应版本的 frp_0.36.2_windows_amd64.zip。

作为客户端端,你只需要关心 2 个文件:

  • frpc
  • frpc.ini
    编辑 frpc.ini文件,加入如下内容:
server_addr = 152.67.*.*
server_port = 7000
token = token
[rdp]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 7001
[smb]
type = tcp
local_ip = 127.0.0.1
local_port = 445
remote_port = 7002

“server_addr”是服务端 IP 地址,填入即可,“server_port”为服务器端口,即 bind_port 的值,“token”是你在服务器上设置的连接口令。

这里用到了 2 个自定义规则,一个是 rdp,一个是 smb:

  • RDP,即 Remote Desktop 远程桌面,Windows 的 RDP 默认端口是 3389,协议为 TCP,本条规则可以实现远程桌面连接。
  • SMB,即 Windows 文件共享所使用的协议,默认端口号 445,协议 TCP,本条规则可实现远程文件访问。
    打开 cmd,进入 frp 的目录,执行如下命令运行 frp 客户端(不能双击 frpc.exe):
    frpc -c frpc.ini
    结果如下所示:
2021/07/06 08:40:09 [I] [service.go:304] [bb69e2195d1e242d] login to server success, get run id [bb69e2195d1e242d], server udp port [0]
2021/07/06 08:40:09 [I] [proxy_manager.go:144] [bb69e2195d1e242d] proxy added: [rdp smb ssh]
2021/07/06 08:40:09 [I] [control.go:180] [bb69e2195d1e242d] [rdp] start proxy success
2021/07/06 08:40:09 [I] [control.go:180] [bb69e2195d1e242d] [smb] start proxy success
2021/07/06 08:40:09 [I] [control.go:180] [bb69e2195d1e242d] [ssh] start proxy success

之后开启 Windows 远程访问:Windows 开启远程访问,直接直接在本地远程连接即可,地址就是 152.67..:7001 (服务器 IP 和绑定的端口),之后输入用户名和密码就能成功远程了。

所有评论(5)

  1. 111说道:

    This message is used to verify that this feed (feedId:73642078670399488) belongs to me (userId:73641743010498560). Join me in enjoying the next generation information browser https://follow.is.

  2. View More说道:

    First off I want to say superb blog! I had a quick question that I’d
    like to ask if you do not mind. I was interested to know how you center yourself and clear your mind before writing.
    I have had difficulty clearing my mind in getting my
    ideas out. I do enjoy writing but it just seems like
    the first 10 to 15 minutes are generally wasted simply just trying to figure out how to begin. Any suggestions or hints?
    Appreciate it!

  3. More information说道:

    Good day! I know this is somewhat off topic but I was wondering which blog platform
    are you using for this site? I’m getting tired of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform.
    I would be awesome if you could point me in the direction of a good platform.

  4. Every woman could have a unique tolerance concerning how much unfavorable
    effect she is keen to deal with. The most hardcore
    female bodybuilders could have a excessive tolerance for more severe side effects and may not even be overly
    bothered by this. Nevertheless, suppressing the event of male traits as much as potential for
    a lot of other women might be a high precedence during the cycle.
    This is the place getting the dosage right
    can make all of the distinction, and so will minimizing cycle size.
    Some folks will use it for months; others will restrict themselves to a six or 8-week cycle.
    This all is dependent upon your objectives and if you’re stacking it with steroids,
    SARMs, or different fat-burning PEDs.
    Arnold Schwarzenegger saved this idea as a secret
    plan due to any unplanned and potential accident or injuries which will happen during his training.
    After getting ready for weeks and months within the shade, Arnold Schwarzenegger appeared and won the 1980
    Mr. Olympia for one last time. As quickly as Arnold stepped on the bodybuilding scene,
    he immediately began profitable titles and awards.
    He additionally competed in several powerlifting and weightlifting categories,
    where he won two contests in weightlifting (1964 and 1965) in addition to two powerlifting contests
    in 1966 and 1968. In the Nineteen Seventies, bodybuilding was more than only a trend – and definitely more than only a sport.
    Impressed by the icons and toned physiques in the sport, people were in search of the next famous person they may admire and
    reward for years to return. Interestingly, the period of dominance
    for Oliva began with a fortunate swap.
    A long steroid cycle will run wherever from three months
    up to 9 months in size. In other words, these cycles don’t
    embody a break from the steroid compounds at any point, so be prepared for
    the lengthy haul. You should be acquainted with the pros and cons of
    this strategy before jumping in.
    With the popularity of social media, trainers and physique stars no longer need to compete to assemble an enormous following.
    From the Arnold Classic to the Night Time Of Champions,
    Grand Prix titles, Mr. Olympia, and even the Olympia Masters,
    Jackson appeared in many bodybuilding events and gained most of them.

    Jackson even gained the Masters Olympia in 2016 (at the age of
    43) and his fourth Arnold Classic title in 2013. The slim waistlines, unbelievable symmetry, and big shoulders became the important thing aspects of a physique;
    a glance that everyone was making an attempt to attain during this era.
    Apart from his determination, proper vitamin and supplementation, the key behind Ronnie Coleman’s success lied in his conditioning and great genetics.
    His physique was one of the aesthetically pleasing to ever hit the Olympia stage – and one thing that
    actually matched Yates, Schwarzenegger, Haney, and lots of different icons from
    the previous. Later in his profession, Vince
    Taylor went on to compete in a quantity of other competitions, including the 2007 Arnold Classic.

    Protein intakes ranged from 2–4.2 grams of protein per kilogram of body weight
    per day in males and from somewhat below 2–2.eight
    g/kg/day in girls. None of the studies looked on the timing of the protein consumption, only the total day by day intake.

    A 2020 narrative evaluate compiled the outcomes from 14 research using various research protocols.2
    The study we just looked at was included. Sixty-four p.c of the bodybuilders regularly carried
    out some type of cardio during low season training.
    The majority did 30 to 60 minutes of aerobic train per week, with running (68.8%), cross-trainer (61.2%), walking (53.7%), and cycling (39.9%)
    being the preferred types of cardio.
    Arnold Schwarzenegger’s ascent to stardom via the long-lasting movie “Pumping Iron” not only popularized bodybuilding but also solidified
    his standing as a legend. The Bronze Period additionally witnessed the
    introduction of dietary supplements, albeit rudimentary by today’s requirements.
    Whereas steroids made their debut during this era, they have been uncharted territory, and their use and implications weren’t
    totally understood.
    On-cycle therapy will give attention to protecting your liver, kidneys, and cardiovascular system.
    Even low doses of PEDs can pose a risk, however widespread sense actions can minimize the
    prospect of great problems. This stack combines the best
    secure and efficient options to Anavar, Winstrol, and Clenbuterol.
    T3 is a thyroid human Growth hormone Steroids (https://www.yojoe.com/) that’s
    naturally produced by the pituitary gland.
    The coaching strategies of the Bronze Era had been rugged and unrefined,
    reflecting the uncharted territory of bodybuilding.
    Pioneers like Sandow relied on bodyweight
    workouts, isometric contractions, and primitive equipment to sculpt their physiques, displaying the raw determination that characterised this age.

    The giants of bodybuilding from varied eras
    have not solely sculpted their physiques but have additionally left behind
    a legacy that continues to inspire generations. We’ll take an in-depth take
    a look at how these legends have impacted the sport and the way their ideas can nonetheless guide
    us on the trail to attaining our fitness targets. Bodybuilding, as we all
    know it at present, has a rich history that has advanced over the
    a long time. It has morphed from a distinct segment interest
    into a global phenomenon, characterised by different eras, each with its unique
    defining traits. Understanding these eras sheds mild on the transformations in training techniques, vitamin, and philosophies which have molded the modern bodybuilder.

    Salads, vegetables, and fruits were the popular choices for
    extra power, but refined carbohydrates manufactured from flour and sugar
    had been staunchly prevented. Gasoline your body accurately by getting the proper amount of protein on your necessities,
    at least 1g per pound of body weight. Aspire to achieve
    fairly sized, lean quads and hamstrings with emphasis on calves.

  5. As our cycle listed underneath the “Novice Cycles I” hyperlink is for a real newbie some newbies may select to start here with a little more however ought to only
    achieve this if their private schooling is nicely past common. Most
    who will supplement with the next cycles will have a minimal of one cycle just like the one beneath the “Novice Cycles I” link underneath their belt but are
    still relatively new to PED use. Every cycle is listed by PED and the dosing to correspond with
    every week.
    After all, Dbol is essentially the most popular anabolic
    steroids (https://www.ihvo.de/wp-content/pages/liquid_clenbuterol_for_weight_loss_dosage_and_safety.html) potent oral steroid in the marketplace, even beating the likes of Anadrol on a milligram for milligram foundation. That
    said; the use of Dianabol doesn’t additionally give permission to overeat,
    as this is able to lead the physique to store more fat instead of correctly utilizing the additional calories to construct up muscle.

    The half-life of a steroid is a very different idea to detection time.
    While the half-life does influence detection time to an extent,
    you can’t rely on a steroid’s half-life to estimate just
    how lengthy that steroid would possibly be able to be detected
    via drug testing. Some steroids might be extra fat-soluble
    than others and so detectable for longer durations due to them remaining within the
    fat tissue. Anabolic compounds are very fat-soluble compounds, that
    means these are substances which may be absorbed with fat after which stored in fatty tissue.

    This does not imply all of our positive aspects will be stored; with out
    the massive inflow of hormones, some gains will probably be lost in time
    but we are in a position to do a significantly better job if we surpass the 8
    week mark. When planning steroid cycles, we’ll find many anabolics are extra efficiently
    used for one type of cycle over one other. We’ll also discover quite
    commonly that many anabolics show secondary traits that may well-serve
    the opposite kind of cycle, even when their primary
    role is finest served in the other. Further, we will also find some anabolics which are so versatile in nature they can be utilized as successfully for any cycle.
    Of course, we’ll additionally find a few anabolics that don’t exhibit sturdy secondary characteristics and are only well-suited for one sort
    of cycle; these steroids fall within the minority.
    For 50% of men, it takes about months to retake the pure testosterone production.
    Steroid cycles containing Anadrol, Superdrol, trenbolone, or Winstrol are toxic protocols.
    As A Outcome Of Primobolan is a milder compound, it won’t replicate the results of Winstrol or trenbolone.
    Deca Durabolin additionally raises prolactin levels,
    which can diminish libido in males. We have discovered that the addition of cabergoline,
    a dopamine receptor, has an inhibitory effect on prolactin. Nevertheless,
    trenbolone doesn’t induce aromatization, inflicting vital elevations in blood pressure,
    which are attributed to huge reductions in HDL.
    Younger bodybuilders get well much quicker and have their blood levels
    and testosterone production into limits inside weeks. Thus, an older particular person might anticipate complete months to get blood
    level in limits and fail on this. Trenbolone is one other harsh compound that people typically react
    negatively to, regardless of its superb outcomes. The post-cycle crash on trenbolone
    is also extreme, leaving users feeling mentally low in addition to having their testosterone shut down. Oral trenbolone (methyltrienolone) is
    even more poisonous than normal injectable trenbolone, with our LFTs indicating liver toxicity,
    even in conservative dosages. Testosterone suppression is almost sure (9); nonetheless, this effect is simply mild to moderate in our testing.
    Some newbies will choose not to take a PCT
    after Anavar, as endogenous testosterone ranges typically recuperate rapidly.

    Earlier Than you construct a steroid stack, you want to outline your major goal.
    Every compound impacts the physique in another way — some promote measurement and energy, others help shed fats
    or maintain lean tissue under stress. Your goal determines which compounds you employ, how lengthy you
    run them, and what your total technique appears like. Constructing a steroid stack isn’t just about throwing compounds together — it’s about
    precision, function, and protection. One Other just as famous and efficient stack is the Test P-Tren A-Mast P, which can last for a good ten weeks.
    Stacking is dangerous, but when your health skilled advises that you just need it, Anabolic World should be
    the ultimate choice! It is as a outcome of you aren’t vulnerable to the unwanted effects of 1 anabolic
    steroid but 2-3.
    In follow-up cycles, users may begin on week 1 using 20 mg per day, with cycles lasting up to eight weeks.
    The only draw back for some novices is that testosterone is predominantly an injectable steroid.
    Due To This Fact, if users need to take orals throughout their
    first steroid cycle, Anavar and Dianabol can be most well-liked options.
    In this article, we will reveal the most secure steroids
    for newbies, serving to to reduce the dangers
    and unwanted effects skilled during a primary steroid cycle.
    When mixed with steroids, they may help maintain measurement
    and strength even beneath intense caloric restriction — with out rising the estrogen load or joint pain that usually accompanies compounds like
    Winstrol. Stacking SARMs with steroids isn’t simply bro-science — there’s a transparent organic rationale behind combining these
    compounds.
    This specific section of this article is certainly not designed to be
    a complete information to feminine anabolic steroid use.
    As A Substitute, only essentially the most immediate issues and matters in regards to proper feminine steroid cycles will be lined.
    Dianabol expresses a average degree of conversion into Estrogen, which can be
    a downside for people who find themselves sensitive to estrogenic unwanted side effects.
    Dianabol unwanted facet effects in regards to Estrogen can embrace bloating, water retention,
    blood strain will increase, and gynecomastia. Though Dianabol isn’t
    significantly androgenic, androgenic unwanted effects can also come up beneath various circumstances, which might result in increased zits formation, oily skin, and/or prostate points.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注