frps-frpc配置

frps配置(域名指向的云主机):

bindPort = 7000
vhostHTTPPort = 8000
log.to = "./frpc.log"
log.level = "info"
log.maxDays = 3
auth.Token = "11225566"

frpc配置(公司内部主机)

serverAddr = "101.132.99.120"
serverPort = 7000
auth.Token = "11225566"

[[proxies]]
name = "web"
type = "http"
localIP = "127.0.0.1"
localPort = 9700
customDomains = ["www.acb.cn"]

 然后通过 www.acb.cn:7000来访问

 

 

IP方式访问配置

frps配置:

bindPort = 7000
log.to = "./frpc.log"
log.level = "info"
log.maxDays = 3
auth.Token = "11225566"

 

 frpc配置

serverAddr = "101.101.101.101"
serverPort = 7000
auth.Token = "11225566"

[[proxies]]
name = "web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 9700
remotePort = 9700

 然后通过http://101.101.101.101:9700/访问

 

 如果要映射多个端口,服务端不变,只需在客户端增加一个节点即可:

serverAddr = "101.101.101.101"
serverPort = 7000
auth.Token = "11225566"

[[proxies]]
name = "web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 9700
remotePort = 9700

[[proxies]]
name = "web2"
type = "tcp"
localIP = "127.0.0.1"
localPort = 9701
remotePort = 9701

  

posted @ 2024-05-28 15:01  石曼迪  Views(25)  Comments(0Edit  收藏  举报
瓴域建设-环保事业中心