https://blog.csdn.net/qq_25351621/article/details/78947477
frp
中文文档
https://github.com/fatedier/frp/blob/master/README_zh.md
FRP内网穿透
内网穿透介绍
对于没有公网 IP 的内网用户来说,远程管理或在外网访问内网机器上的服务是一个问题。通常解决方案就是用内网穿透工具将内网的服务穿透到公网中,便于远程管理和在外部访问。 |
主要参考
https://blog.csdn.net/m0_37499059/article/details/79587771
案例一: 从windows外网访问windows内网里的tomcat服务
外网端配置(有域名,配置为服务端)
文件:frps.ini [common] bind_port = 7000 max_pool_count = 5 authentication_timeout = 9000 [web] listen_port = 8081 auth_token = admin123 |
启动命令
frps.exe -c frps.ini |
内网端配置(局域网内的机器,配置为客户端)
文件:frpc.ini [common] server_addr = xx.xx.xx.xx server_port = 7000 auth_token = admin123
[web] type = tcp local_ip = localhost local_port = 8080 remote_port = 8081 |
启动命令
frpc.exe -c frpc.ini |
案例二:从windows外网访问linux(centos)的nexus,maven私服
外网端配置(有域名,配置为服务端)
文件:frps.ini [common] bind_port = 7000 max_pool_count = 5 authentication_timeout = 9000 [web] listen_port = 8081 auth_token = admin123 [webNexus] listen_port = 8088 auth_token = admin123 |
内网端配置(局域网内的机器,配置为客户端)
文件:frpc.ini [common] server_addr = xx.xx.xx.xx server_port = 7000 auth_token = admin123 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 8022
[webNexus] # 这个是要跟frps的配置对应上的 type = tcp local_ip = 127.0.0.1 local_port = 8888 remote_port = 8888 # 实际访问时,是通过外网ip + remote_port 来访问的 |
启动命令
./frpc -c ./frpc.ini |