rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: rejetto on July 09, 2020, 01:56:54 PM

Title: "max connections"
Post by: rejetto on July 09, 2020, 01:56:54 PM
I wonder if the option "max connections" is really any good or if it only makes problems.
I saw several cases of people having problems, because the browser doesn't behave well with the way HFS is refusing the connection.
I made several attempts at changing the method (backlog, not accepting, aborting), and several research, but nothing improved.
I think I should remove this option.
Title: Re: "max connections"
Post by: NaitLee on July 09, 2020, 04:41:12 PM
How about a "max connections before limiting speed" or "max connections before stop offering file(main/html) page"?
Title: Re: "max connections"
Post by: rejetto on July 09, 2020, 04:42:51 PM
sorry but i don't understand what you mean by that/those
Title: Re: "max connections"
Post by: NaitLee on July 09, 2020, 04:49:28 PM
Just some suggestions if "max connections" is getting removed. They are useful for lowering server payload, but not too hard as refusing connections.
Title: Re: "max connections"
Post by: rejetto on July 09, 2020, 04:57:26 PM
ok but i'm not seeing how  your suggestion is going to NOT have the same problems. Can you explain?
Title: Re: "max connections"
Post by: NaitLee on July 10, 2020, 03:35:16 AM
Most of the "max connections limit" disadvantages are page half-loaded, such as the icon-hidden problem happened just now (http://rejetto.com/forum/index.php?topic=13342.0), or external css/js missing problem.
If we just limit speed after reaching a connection limit, similar confusing problems will be less; or we just stop offering HTML pages, as this can explain the limit situation clearly to page viewers.
Title: Re: "max connections"
Post by: danny on April 10, 2021, 12:08:58 PM
To avoid 'right click save as corrupt file' a redirect is needed; however, can't redirect from [overload] when already past the limit; therefore, must use disconnect to defeat the masquerade. 
Solution:   
Code: [Select]
[overload]
{.if|{.{.calc|{.get ini|max-connections.}.}<>0.}|{:{.set ini|max-connections=-1.}:}.}{.disconnect.}{.add to log|%ip% %user% disconnected at %connections% connections.}
Global max connections limit = ddos so that is unset; and then, the remaining possibility is per-ip connections limit which is repurposed as a miscreant disconnector+logger.