Loading... # [官方发布页面](https://github.com/fatedier/frp/releases) # 使用方法: ## 服务端和客户端都要下载 下载对应版本的frp(下载其中一个就行) ``` https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_386.tar.gz https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_arm.tar.gz ``` 解压文件 ``` tar -zxvf frp_0.38.0_linux_386.tar.gz ``` 移动到新文件夹 ``` mkdir frp mv frp_0.38.0_linux_386/* frp ``` ## 服务端的操作 移动到frp的目录 ``` cd frp ``` frpc是客户端需要的文件 在服务器端可以删除(不删除也可以) ``` rm -f frpc rm -f frpc.ini ``` 配置frp/frps.ini文件 ``` [common] bind_port = 7000 #frps服务端的端口 vhost_http_port = 7080 #自己设定的http访问端口 token = 8765djilmyyydic345 #客户端连接服务端的密码 dashboard_port = 7001 #控制面板的服务端口 dashboard_user = admin #控制面板登录账户 dashboard_pwd = 123456 #控制面板登录密码 ``` 运行frp ``` sudo frp/frps -c frp/frps.ini & sudo ./frps -c ./frps.ini & #如果已经在frp文件夹里了 ``` ## 客户端的操作 可以删除不必要的文件 ``` rm -f frps rm -f frps.ini ``` 配置frp/frpc.ini文件,根据需要自行选择ssh|vnc|web|http_proxyx,也可以都加进去 ``` [common] server_addr =xx.bbb.xx.bbb #填frp服务端的ip server_port = 7070 #填frp服务端的bind_prot token = 8765djilmyyydic345 #连接frp服务端的密码 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 [vnc] type = tcp local_ip = 127.0.0.1 local_port = 5900 remote_port = 6100 [web] type = http local_port = 80 #客户端网站端口 custom_domains = pi.pangjuzhong.xyz #映射的域名,记得域名的A记录要解析到外网主机的IP [http_proxyx] type = tcp #通信数据类型 remote_port = 1080 #在frp服务端开设代理服务的端口 plugin = socks5 #通过插件开设socks5代理服务 #plugin_user = abc123 #通过插件设置连接代理的用户名 #plugin_passwd = abc123 #通过插件设置连接代理的密码 #user_compression=true ``` 运行frp ``` sudo frp/frpc -c frp/frpc.ini & sudo ./frpc -c ./frpc.ini & #如果已经在frp文件夹里了 ``` 注意:服务端的安全组要开启用到的端口,比如 - 7070 frp服务端端口 - 6000 shh访问端口 - 7080 http访问端口 如果装了宝塔或其他类似的东西,注意是否自带防火墙,有的话也要在里面开放相应的端口 ## frpc启动时提示:login to server failed: EOF 解决办法: ``` [common] server_addr = server_port = 7001 tls_enable = true #加这一句 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 ``` ## 参考 [搭建远程办公服务器(FRP)超全教程](https://blog.csdn.net/qq_34779901/article/details/104412887) [服务器安装配置frp内网穿透](https://www.cnblogs.com/idjl/p/9610531.html) [frpc启动时提示:login to server failed: EOF](https://www.cnblogs.com/linmilove/p/15324905.html) Last modification:March 7, 2022 © Allow specification reprint Support Appreciate the author WeChat Like 0 如果觉得我的文章对你有用,请随意赞赏