[GH-ISSUE #427] FRPC WEB模式,GET参数过长会卡住 #319

Closed
opened 2026-05-05 12:07:22 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @neatstudio on GitHub (Aug 16, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/427

环境frpc/frps 0.13
1、SEVER配置了subdomain,配置nginx做跳转
2、Client 配置了web,定了subdomain和local_port

一般情况下都正常,只是在使用datatables控件 的时候,由于它默认会传很多参数(目前我的是1181个字节)。然后整体就卡住了!

请检查一下

Originally created by @neatstudio on GitHub (Aug 16, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/427 环境frpc/frps 0.13 1、SEVER配置了subdomain,配置nginx做跳转 2、Client 配置了web,定了subdomain和local_port 一般情况下都正常,只是在使用datatables控件 的时候,由于它默认会传很多参数(目前我的是1181个字节)。然后整体就卡住了! 请检查一下
gitea-mirror 2026-05-05 12:07:22 -06:00
Author
Owner

@neatstudio commented on GitHub (Aug 17, 2017):

已经加了:
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
然而无效。
参考:https://stackoverflow.com/questions/23732147/configuring-nginx-for-large-uris

<!-- gh-comment-id:322999335 --> @neatstudio commented on GitHub (Aug 17, 2017): 已经加了: client_header_buffer_size 64k; large_client_header_buffers 4 64k; 然而无效。 参考:https://stackoverflow.com/questions/23732147/configuring-nginx-for-large-uris
Author
Owner

@fatedier commented on GitHub (Aug 17, 2017):

直接给 frps 发请求,还是经过 nginx 转发?

另外这么多参数为什么不用 POST 的方式传呢。

<!-- gh-comment-id:323005175 --> @fatedier commented on GitHub (Aug 17, 2017): 直接给 frps 发请求,还是经过 nginx 转发? 另外这么多参数为什么不用 POST 的方式传呢。
Author
Owner

@neatstudio commented on GitHub (Aug 17, 2017):

通过nginx转发WEB
1、frps 配置

 [common]
 bind_port = 7000
 subdomain_host=xxx.xxx.com
 vhost_http_port=8000

2、nginx 配置

upstream xxx.xxx.com {
    server 127.0.0.1:8000 ;
}

server {
    listen 80;
    server_name *.xxx.xxx.com;
    location / {
        proxy_pass http://xxx.xxx.com;
        include /etc/nginx/proxy_params;
    }
}

3、FRPC配置

[web]
type=http
local_port=80
subdomain = test
<!-- gh-comment-id:323005937 --> @neatstudio commented on GitHub (Aug 17, 2017): 通过nginx转发WEB 1、frps 配置 ``` [common] bind_port = 7000 subdomain_host=xxx.xxx.com vhost_http_port=8000 ``` 2、nginx 配置 ``` upstream xxx.xxx.com { server 127.0.0.1:8000 ; } server { listen 80; server_name *.xxx.xxx.com; location / { proxy_pass http://xxx.xxx.com; include /etc/nginx/proxy_params; } } ``` 3、FRPC配置 ``` [web] type=http local_port=80 subdomain = test ```
Author
Owner

@zhfish commented on GitHub (Aug 22, 2017):

虽然不知道为什么不用post
其他方面的建议
用nginx其实就别设置vhost_http_port和subdomain_host了

nginx的proxy_pass直接指向frpc设置的ip
附gitlab用的一些proxy配置

client_max_body_size 0;
gzip off;

proxy_pass x.x.x.x;
proxy_read_timeout      300;
proxy_connect_timeout   300;
proxy_redirect          off;

proxy_http_version 1.1;

proxy_set_header    Host                $http_host;
proxy_set_header    X-Real-IP           $remote_addr;
proxy_set_header    X-Forwarded-Ssl     on;
proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
proxy_set_header    X-Forwarded-Proto   $scheme;#
<!-- gh-comment-id:323904867 --> @zhfish commented on GitHub (Aug 22, 2017): 虽然不知道为什么不用post 其他方面的建议 用nginx其实就别设置vhost_http_port和subdomain_host了 nginx的proxy_pass直接指向frpc设置的ip 附gitlab用的一些proxy配置 ``` client_max_body_size 0; gzip off; proxy_pass x.x.x.x; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;# ```
Author
Owner

@neatstudio commented on GitHub (Aug 22, 2017):

楼上各位好,不是我不用POST,而是 dataTables 的插件用是的GET

再者,其实楼上的一些设置我也都有相应的配置,我nginx之所以用vhost_http_port和subdomain_host是因为我还有一些其他网站需要用来转发

<!-- gh-comment-id:323937171 --> @neatstudio commented on GitHub (Aug 22, 2017): 楼上各位好,不是我不用POST,而是 dataTables 的插件用是的GET 再者,其实楼上的一些设置我也都有相应的配置,我nginx之所以用vhost_http_port和subdomain_host是因为我还有一些其他网站需要用来转发
Author
Owner

@zhfish commented on GitHub (Aug 23, 2017):

  1. 其他网站不用nginx么?就算不用,建议至少你这个网站,proxy直接指向frpc端口,而不是vhost
  2. 如果不是你开发的,那不说什么了,如果是你开发的,那么dataTables必须有POST支持啊,要不然不是扯淡了?
    https://datatables.net/examples/server_side/post.html
<!-- gh-comment-id:324203221 --> @zhfish commented on GitHub (Aug 23, 2017): 1. 其他网站不用nginx么?就算不用,建议至少你这个网站,proxy直接指向frpc端口,而不是vhost 2. 如果不是你开发的,那不说什么了,如果是你开发的,那么dataTables必须有POST支持啊,要不然不是扯淡了? `https://datatables.net/examples/server_side/post.html`
Author
Owner

@neatstudio commented on GitHub (Aug 23, 2017):

@zhfish 接受你的意见。
我其他网站也是用nginx的。
1、主要是我其他都是nginx+apache。暂没问题
2、我proxy指的是我本地(我本地机器 ),所以我才用了vhost
3、接受你POST的意见。刚接触使用dataTables,已经使用POST(主要是GET可以缓存一些简单的数据,POST就没办法了,当然也可以用它的Cache)
BTW:感谢

<!-- gh-comment-id:324358706 --> @neatstudio commented on GitHub (Aug 23, 2017): @zhfish 接受你的意见。 我其他网站也是用nginx的。 1、主要是我其他都是nginx+apache。暂没问题 2、我proxy指的是我本地(我本地机器 ),所以我才用了vhost 3、接受你POST的意见。刚接触使用dataTables,已经使用POST(主要是GET可以缓存一些简单的数据,POST就没办法了,当然也可以用它的Cache) BTW:感谢
Author
Owner

@fatedier commented on GitHub (Aug 24, 2017):

所以这个问题是一个需要解决的问题吗?有标准规定 url 必须要能够接收多少字节以内的请求还是各个服务端可能会有不同的实现?

<!-- gh-comment-id:324657691 --> @fatedier commented on GitHub (Aug 24, 2017): 所以这个问题是一个需要解决的问题吗?有标准规定 url 必须要能够接收多少字节以内的请求还是各个服务端可能会有不同的实现?
Author
Owner

@zhfish commented on GitHub (Aug 26, 2017):

url 必须要能够接收多少字节 是浏览器限制的,一般来说不会超过1024吧?
如果你本身并没闲置的话,感觉不用解决

<!-- gh-comment-id:325086531 --> @zhfish commented on GitHub (Aug 26, 2017): url 必须要能够接收多少字节 是浏览器限制的,一般来说不会超过1024吧? 如果你本身并没闲置的话,感觉不用解决
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#319
No description provided.