mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2852] Nginx无法使用proxy_protocol功能 #2279
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2279
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @smallfish01 on GitHub (Mar 17, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2852
Bug Description
今天突然发现通过内网去访问同属于内网的两台Nginx服务器都访问不了了,网页打不开,但是在外网访问正常,查看服务器/var/log/nginx/error日志发现:
2022/03/17 17:58:20 [error] 75479#0: *660 broken header: "^V^C^A^B^@^A^@^Aü^C^C¾¯oHPñÂf <98>2ïj<96>^BÁ^B^O«6^Y<92>~Î"sJ£qØ^HE NÖ2<9a><9e><92>ñ½t<8e><93>C?<81><9f>^^.x<99>&j²^KÏõÂ<83>®ç1<8f>á^@ ºº^S^A^S^B^S^CÀ+À/À,À0̨̩À^SÀ^T^@<9c>^@<9d>^@/" while reading PROXY protocol, client: 192.168.1.7, server: 0.0.0.0:443
192.168.1.7是公司内网客户端IP。
在Nginx配置文件里取消以下相关设置后正常:
listen 443 ssl http2 proxy_protocol;
real_ip_header proxy_protocol;
set_real_ip_from 192.168.1.5/32; // FRP Server IP
这几天没做什么改动,只是将FRP从0.38.1升级到0.4,而且内网访问不走frp,不知道为什么会这样?理
frpc Version
0.40
frps Version
0.40
System Architecture
linux/amd64
Configurations
listen 443 ssl http2 proxy_protocol;
real_ip_header proxy_protocol;
set_real_ip_from 192.168.1.5/32; // FRP Client IP
Logs
No response
Steps to reproduce
...
Affected area
@smallfish01 commented on GitHub (Mar 18, 2022):
经过多次测试,在内网nginx服务器上,增加另外一个端口解决:
listen 8443 ssl http2 proxy_protocol;
然后在frpc.ini上配置:
[www]
type = https
local_port = 8443
local_ip = 192.168.1.10
custom_domains = xxx.domain.com
proxy_protocol_version = v2
@peaceanddemocracy commented on GitHub (May 30, 2022):
大佬,我也碰到了这个问题,开了proxy_protocol之后404界面,不知道怎么操作?
@smallfish01 commented on GitHub (Jun 12, 2022):
上面不是有配置么。