frp icon indicating copy to clipboard operation
frp copied to clipboard

使用NPM+FRP,公网ip可以成功,localhost失败?

Open A-sunny-boy opened this issue 1 year ago • 4 comments

Bug Description

阿里云作为公网服务器,使用frp对内网的http服务进行代理,然后在阿里服务器上使用NPM根据域名进行流量转发。 阿里云frps配置

......
vhostHttpPort = 1111
......                        

内网frpc配置

[[proxies]]
name = "gettint-start"
type = "http"
localPort = 3000
customDomains = ["my.domain.xyz"]

使用NPM将流量转发到阿里云服务器的公网ip时,可以使用在公网使用my.domain.xyz访问到内网服务,NPM配置如下: image

使用NPM将流量转发到localhost或127.0.0.1时,出现502。 image image

请问如何内内网ip访问呢?

frpc Version

0.53.2

frps Version

0.53.2

System Architecture

linux/amd64

Configurations

frps ...... vhostHttpPort = 1111 ......

frpc

[[proxies]]
name = "gettint-start"
type = "http"
localPort = 3000
customDomains = ["my.domain.xyz"]

Logs

No log

Steps to reproduce

...

Affected area

  • [ ] Docs
  • [ ] Installation
  • [X] Performance and Scalability
  • [ ] Security
  • [X] User Experience
  • [ ] Test and Release
  • [ ] Developer Infrastructure
  • [ ] Client Plugin
  • [ ] Server Plugin
  • [ ] Extensions
  • [X] Others

A-sunny-boy avatar Jan 22 '24 09:01 A-sunny-boy

服务端配置参数写错,先阅读文档...

superzjg avatar Jan 23 '24 13:01 superzjg

Try ::1

xqzr avatar Jan 28 '24 16:01 xqzr

解决没有,我也碰到这问题,外网可以访问,用内网就不行

ezewu avatar Feb 01 '24 13:02 ezewu

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

github-actions[bot] avatar Feb 23 '24 00:02 github-actions[bot]