何亦冷

导航

frp实现内网远程访问

## 服务端(CentOS64)
# 1.下载文件
wget https://github.com/fatedier/frp/releases/download/v0.31.1/frp_0.31.1_linux_amd64.tar.gz
tar -zxvf frp_0.31.1_linux_amd64.tar.gz
cd frp_0.31.1_linux_amd64

# 2.编辑start.sh, 后台运行(默认的最简配置7000端口即可)
vim start.sh
nohup ./frps -c frps.ini >/dev/null 2>&1 &
./start.sh

-------------------------------------------------------------------------------------------------
## 客户端(Windows64)
# 1.下载文件
wget https://github.com/fatedier/frp/releases/download/v0.31.1/frp_0.31.1_windows_amd64.zip

# 2.配置fprc.ini, 注意tls_enable = true开启加密否则一些网络情况下启动连接失败
[common]
tls_enable = true server_addr
= ali.hepengju.com server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 3389 remote_port = 3389 # 3.编辑start-mstsc.bat, 并启动即可 frpc.exe -c frpc.ini

-------------------------------------------------------------------------------------------------
## Window服务
# 1. 下载WinSW-x64.exe : https://github.com/winsw/winsw/releases (和frpc.exe放在一起)
# 2. 编写WinSW-x64.xml
    <service>
        <id>frpc</id>
        <name>frpc</name>
        <description>frpc客户端</description>
        <executable>frpc</executable>
        <arguments>-c frpc.ini</arguments>
        <onfailure action="restart" delay="60 sec" />
        <onfailure action="restart" delay="120 sec" />
        <logmode>reset</logmode>
    </service>
 # 3. 执行命令
    安装:WinSW-x64.exe install   
    启动:WinSW-x64.exe start
    停止:WinSW-x64.exe stop
    卸载:WinSW-x64.exe uninstall

posted on 2020-01-22 22:20  何亦冷  阅读(658)  评论(0编辑  收藏  举报