[GH-ISSUE #135] 按照配置,一切日志显示成功,但是无法访问内网穿透应用。 #79

Closed
opened 2026-05-05 11:43:05 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @zhangchaoxu on GitHub (Oct 17, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/135

按照文档中“通过自定义域名访问部署于内网的 web 服务”一节配置,一切日志显示成功,但是无法访问内网穿透应用。

通过7500可以看到console,但是穿透的内网端口9000上就是看不到任何内容,已经确定防火墙打开,本地8080应用启动。

# version:0.8.1
## server: centos 6.5 amd64
### frps.ini
[common]
bind_port = 7000
dashboard_port = 7500
vhost_http_port = 9000
log_file = /usr/local/frp_0.8.1/frps.log
log_level = debug
log_max_days = 3

[web]
type = http
custom_domains = 我的域名
auth_token = 123

log

2016/10/17 23:20:38 [main.go:182] [I] Start frps success
2016/10/17 23:20:43 [control.go:38] [D] Get new connection, 122.245.208.60:15476
2016/10/17 23:20:43 [control.go:63] [D] Get msg from frpc: {"type":0,"proxy_name":"web","auth_key":"8805828be8efd219a6fbd06433516d30","use_encryption":false,"use_gzip":false,"pool_count":0,"privilege_mode":false,"privilege_key":"","proxy_type":"http","remote_port":0,"custom_domains":null,"host_header_rewrite":"","timestamp":1476717643}

2016/10/17 23:20:43 [control.go:314] [I] ProxyName [web], start proxy success
2016/10/17 23:21:03 [control.go:164] [D] ProxyName [web], get heartbeat
## client: win10 x64
### frpc.ini
[common]
server_addr = 服务器ip
server_port = 7000
auth_token = 123
log_file = C:/PortableApps/frp/frpc.log
log_level = debug
log_max_days = 3

[web]
type = http
local_port = 8080

log

2016/10/17 23:23:00 [main.go:109] [I] Start frpc success
2016/10/17 23:23:00 [control.go:172] [D] ProxyName [web], read [{"type":3,"code":0,"msg":""}
]
2016/10/17 23:23:00 [control.go:185] [I] ProxyName [web], connect to server [服务器ip:7000] success!
2016/10/17 23:23:00 [control.go:193] [I] Start to send heartbeat to frps
2016/10/17 23:23:20 [control.go:197] [D] Send heartbeat to server
2016/10/17 23:23:20 [control.go:101] [D] ProxyName [web], receive heartbeat response
Originally created by @zhangchaoxu on GitHub (Oct 17, 2016). Original GitHub issue: https://github.com/fatedier/frp/issues/135 按照文档中“通过自定义域名访问部署于内网的 web 服务”一节配置,一切日志显示成功,但是无法访问内网穿透应用。 通过7500可以看到console,但是穿透的内网端口9000上就是看不到任何内容,已经确定防火墙打开,本地8080应用启动。 ``` ini # version:0.8.1 ## server: centos 6.5 amd64 ### frps.ini [common] bind_port = 7000 dashboard_port = 7500 vhost_http_port = 9000 log_file = /usr/local/frp_0.8.1/frps.log log_level = debug log_max_days = 3 [web] type = http custom_domains = 我的域名 auth_token = 123 ``` ### log ``` 2016/10/17 23:20:38 [main.go:182] [I] Start frps success 2016/10/17 23:20:43 [control.go:38] [D] Get new connection, 122.245.208.60:15476 2016/10/17 23:20:43 [control.go:63] [D] Get msg from frpc: {"type":0,"proxy_name":"web","auth_key":"8805828be8efd219a6fbd06433516d30","use_encryption":false,"use_gzip":false,"pool_count":0,"privilege_mode":false,"privilege_key":"","proxy_type":"http","remote_port":0,"custom_domains":null,"host_header_rewrite":"","timestamp":1476717643} 2016/10/17 23:20:43 [control.go:314] [I] ProxyName [web], start proxy success 2016/10/17 23:21:03 [control.go:164] [D] ProxyName [web], get heartbeat ``` ``` ini ## client: win10 x64 ### frpc.ini [common] server_addr = 服务器ip server_port = 7000 auth_token = 123 log_file = C:/PortableApps/frp/frpc.log log_level = debug log_max_days = 3 [web] type = http local_port = 8080 ``` ### log ``` 2016/10/17 23:23:00 [main.go:109] [I] Start frpc success 2016/10/17 23:23:00 [control.go:172] [D] ProxyName [web], read [{"type":3,"code":0,"msg":""} ] 2016/10/17 23:23:00 [control.go:185] [I] ProxyName [web], connect to server [服务器ip:7000] success! 2016/10/17 23:23:00 [control.go:193] [I] Start to send heartbeat to frps 2016/10/17 23:23:20 [control.go:197] [D] Send heartbeat to server 2016/10/17 23:23:20 [control.go:101] [D] ProxyName [web], receive heartbeat response ```
Author
Owner

@zhangchaoxu commented on GitHub (Oct 17, 2016):

@fatedier 烦请给点指导建议,已经折磨了我一天了,Thanks

<!-- gh-comment-id:254243367 --> @zhangchaoxu commented on GitHub (Oct 17, 2016): @fatedier 烦请给点指导建议,已经折磨了我一天了,Thanks
Author
Owner

@fatedier commented on GitHub (Oct 17, 2016):

从日志上看是 custom_domains 字段没有配置成功。

<!-- gh-comment-id:254244934 --> @fatedier commented on GitHub (Oct 17, 2016): 从日志上看是 custom_domains 字段没有配置成功。
Author
Owner

@zhangchaoxu commented on GitHub (Oct 17, 2016):

我能确定的是配置的域名A指向到服务器ip的,7500我也是通过这个域名访问的。
不过这台服务器的80端口部署着nginx,不知道是否会有影响。

非常感谢深夜解答。

ps. 我先换到privilege_mode模式下工作正常了。

<!-- gh-comment-id:254247086 --> @zhangchaoxu commented on GitHub (Oct 17, 2016): 我能确定的是配置的域名A指向到服务器ip的,7500我也是通过这个域名访问的。 不过这台服务器的80端口部署着nginx,不知道是否会有影响。 非常感谢深夜解答。 ps. 我先换到privilege_mode模式下工作正常了。
Author
Owner

@fatedier commented on GitHub (Oct 17, 2016):

看错了,日志没问题,我自己这边测试也正常。

和80端口的 nginx 无关,不影响。可以将域名换成 127.0.0.1 然后在服务器上通过 curl -v http://127.0.0.1:9000 看是否能访问,不确定是否是一个潜在的 bug。

<!-- gh-comment-id:254252291 --> @fatedier commented on GitHub (Oct 17, 2016): 看错了,日志没问题,我自己这边测试也正常。 和80端口的 nginx 无关,不影响。可以将域名换成 127.0.0.1 然后在服务器上通过 `curl -v http://127.0.0.1:9000` 看是否能访问,不确定是否是一个潜在的 bug。
Author
Owner

@zhangchaoxu commented on GitHub (Oct 17, 2016):

我再从privilege_mode切换到最初的配置文件,居然就好了。
也有可能是我昨天脑袋出了bug。

close issue first, thanks you so much

<!-- gh-comment-id:254366806 --> @zhangchaoxu commented on GitHub (Oct 17, 2016): 我再从privilege_mode切换到最初的配置文件,居然就好了。 也有可能是我昨天脑袋出了bug。 close issue first, thanks you so much
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#79
No description provided.