开源ITfrp搭建
如愿frp部署教程
什么是frp(内网穿透)?
FRP(Fast Reverse Proxy)是一个高性能
的反向代理
应用,它主要用于内网穿透
,允许您在不暴露您的内网服务的情况下将内网服务映射到公网上,从而能够被外部访问。常用于物联网设备、内网服务器或任何您希望从外部网络访问的服务。
图解是这样:

准备工作
1.准备一台公网服务器
(阿里云、腾讯云等等),没有?白嫖!白嫖FRP这个已经炸了,请换另一个白嫖节点(这里的frp版本都是0.56+,且你只需要配置frpc
客户端)
2.一台内网主机
4.下载frp,这里使用的0.36.2版本,因为0.50开始frp的配置文件开始和老的配置会有所差别,个人喜欢老的配置QAQ
解压出来如下:

其中,frps.ini
是服务端配置文件,frpc.ini
是客户端的配置文件.
配置frp服务端
1 2 3 4 5 6 7
| [common] bind_port = 7000 token = 123456 dashboard_port = 7500 vhost_http_port = 23333 ashboard_user = admin dashboard_pwd = 123456
|
其中dashboard_port
,vhost_http_port
,ashboard_user
,dashboard_pwd
这些如果你不需要监控面板,你可以删掉
或者注释
掉
随后启动frp服务端
1 2 3 4 5
| ./frps -c ./frps.ini
nohup ./frps -c ./frps.ini &
|
配置frp客户端
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| [common] server_addr = server_port = 7000 token = 123456 tls_enable = true
[ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000
[ssh_2] type = tcp local_ip = 127.0.0.1 local_port = 23 remote_port = 6001
[web01] type = http local_ip = 127.0.0.1 local_port = 23333 remote_port = 23333 custom_domains =
|
然后就是启动服务端
1 2 3 4 5
| ./frpc -c ./frpc.ini
nohup ./frpc -c ./frpc.ini &
|
随后可以看看检查有没有连接成功
服务端日志长这样:

客户端日志长这样:

尝试下是否能够使用:

新frp教程
编辑新服务端frps.toml
1 2 3 4 5 6
| bindPort = 7000
vhostHTTPPort = 23333 auth.token = "token" transport.tls.force = true
|
编辑新客户端frpc.toml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| serverAddr = "xxx.xxx.xxx.xxx"
serverPort = 7000 auth.method = "token" auth.token = "public.freefrp.com" transport.tls.enable = true
[[proxies]] name = "自定义名字,一定要英文" type = "tcp" localPort = 22 remotePort = 6000
[[proxies]] name = "自定义名字,一定要英文" type = "tcp" localPort = 3389 remotePort = 6001
[[proxies]] name = "web" type = "http" localPort = 8080 remotePort = 8080
|
启动服务端
1 2
| nohup ./frps -c ./frps.toml &
|
启动客户端
1
| nohup ./frpc -c ./frpc.toml &
|