frp 内网穿透使用教程


介绍

frp是一个可用于内网穿透的高性能的反向代理应用,支持tcp、udp、http、https协议。frp分为客户端frpc和服务器端frps,客户端用于内网主机,服务器端用于公网服务器

程序地址

https://github.com/fatedier/frp

服务端

1、frps.ini 配置:

  1. [common]
  2. # frp监听的端口,默认是7000,可以改成其他的
  3. bind_port = 7000
  4. # 授权码,请改成更复杂的,这个token之后在客户端会用到
  5. token =12345678
  6. # frp管理后台端口,请按自己需求更改
  7. dashboard_port = 7500
  8. # frp管理后台用户名和密码,请改成自己的
  9. dashboard_user = admin
  10. dashboard_pwd = admin
  11. enable_prometheus = true

2、启动

  1. frps.exe -c frps.ini

客户端

1、frpc.ini 配置:

  1. # 客户端配置
  2. [common]
  3. server_addr = 服务器ip
  4. # 与frps.ini的bind_port一致
  5. server_port = 7000
  6. # 与frps.ini的token一致
  7. token = 12345678
  8. # 配置ssh服务, 也可以用来映射其他端口如3389
  9. [ssh]
  10. type = tcp
  11. local_ip = 127.0.0.1
  12. local_port = 22
  13. # 这个remote_port端口自定义,配置完成后会在公网服务器开启6000端口,来映射内网主机22端口
  14. remote_port = 6000
  15. #socks5代理配置 ,一般这个用途比较多
  16. [socks5]
  17. type=tcp
  18. plugin=socks5
  19. # socks代理账号密码,需要修改不要使用弱口令
  20. plugin_user=admin
  21. plugin_passwd=admin
  22. #映射到共外网服务器的端口
  23. remote_port = 8000

2、启动

  1. frpc.exe -c frpc.ini

参考文章:https://blog.csdn.net/smli_ng/article/details/126750072

BLOG

搜索文章