rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - danny

Pages: 1 2 3 4 5 6 ... 15
46
Programmers corner / Re: Template/events for QOS or traffic shaping.
« on: April 03, 2021, 03:07:18 AM »
@Mars

Would also like to streamline error handler for sections [overload] and [max contemp downloads].

Currently, I have: 
Code: [Select]
[overload]
{.if not|%user%|{:{.if|{.%url% = /.}|{:{.disconnect.}:}.}:}.}{.add header|Cache-Control: no-cache, max-age=0.}<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><META HTTP-EQUIV="Refresh" CONTENT="3;URL=./"><TITLE>Overload</TITLE><link rel="icon" href="data:,"></head><body bgcolor="black" text="white" alink="white" link="white" vlink="white"><center><h2><br>High traffic mode engaged.</h2>Returning to previous page after overload has cleared.</center></body>{.disconnect|{.current downloads|ip|file=this.}.}{.if|{.{.current downloads|ip=%ip%|file=this.} > 1.} |{: {.disconnection reason|knackered.} :}/if.}

[max contemp downloads]
{.add header|Cache-Control: no-cache, max-age=0.}<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><META HTTP-EQUIV="Refresh" CONTENT="3;URL=./"><TITLE>Downloads</TITLE><link rel="icon" href="data:,"></head><body bgcolor="black" text="white" alink="white" link="white" vlink="white"><center><h2><br>There are ongoing downloads.</h2>More available <i>after</i> current downloads finish.</center></body>{.disconnect|{.current downloads|ip|file=this.}.}

This is bulky/verbose and partially successful.  Main trouble is when in overdo condition, file downloaded consists of error page internally.  It would be nice to Stop the download without filling the requested file internals with contents of error page. 
Causing the client to stop a download requires either server-side redirect or disconnect, macros.  So, these pages need to start with if download then disconnect; but, how to? 

47
...HFS 2.3 Beta Build # 284...
Up to date security begins at HFS #299; so, perhaps an update. 
If you didn't want basic auth (login by url) then use newer HFS2.4.  http://rejetto.com/forum/index.php?topic=13060.msg1064012#msg1064012
If you want a custom template to run on HFS2.4 there is help http://rejetto.com/forum/index.php?topic=13326.msg1065975#msg1065975

48
Everything else / Re: permission
« on: March 30, 2021, 04:36:10 AM »
Thanks Mars! 

Good to know that the feature was already built-in. 

49
For now I have stopped the http.sys service. By editing the windows registry.  HKEY_Local_Machien\System\CurrentControlSet\Services\HTTP  changed value os start to 4 <reboot>

This is not an ideal workaround. The http service is stopped, so now you can't run IIS.  I wasn't planning on using Internet Information Server, so it's good enough for me.  Now i can switch hfs to use port 80  :)
That's some good results. 
Previously, I had suggested changing the http.sys service to ipv6-only (no listeners on ipv4 addresses) to clear ipv4 port 80. . . and still allow more modern microsoft things to use http.sys on ipv6.

50
Everything else / Re: permission
« on: March 28, 2021, 07:59:13 PM »
fail to erase is default rights for virtual file system, and this can be repurposed as fail to delete + fail to download, simply by making download action check for delete rights (if no delete rights then no download). 

Here's Naitlee's white.tpl modified with
[+special:alias|cache]
admz={.if|{.get|can delete.}|{:<a href="%item-name%">%item-name%</a>:}|{:%item-name%:}.}

and the file list uses {.admz.} instead of href clickable links. 

But, you'd also need events file http://rejetto.com/wiki/index.php?title=HFS:_Event_scripts
press altF6 to edit events file, and put this in
[download]
{.if|{.get|!can delete.}|{:{.disconnect.}:}.}

Edit:
upnotdown_for_HFS2.4RC.tpl is modified white.tpl
upnotdown2_for_HFS2.4RC.tpl is modified stripes.tpl

51
...i get error 404 the requested resource is not found...
Good news!  That is a response from an HTTP server. 
Maybe you need content at webroot, or replace the VFS?

52
When i check the PID in taskmanager it turns out it is my FTP server (Wing FTP server) is allready using that port.
In the wing admin panel, the port settings are located at Domains / mydomain / WebLink Manager / settings / Listeners  And, there you can modify the wing's http listener to use port 8080.

P.S. 
Filezilla FTP server can do FTPS (FTP over TLS) And the more modern SFTP secure connections, free. 

53
netsh http add iplisten ipaddress=192.168.2.180
I believe that the article wanted you to 'distract' http.sys by changing it to ipv6-only (thus ipv4 port 80 is clear). 
netsh http delete iplisten ipaddress=192.168.2.180
netsh http add iplisten ipaddress=::
netsh http show iplisten
Be sure there is no ipv4 address on that list.
netsh http show servicestate view=requestq verbose=yes

netstat -o -n -a | findstr 0.0:80
The last column of each row is the process ID, PID, which can be matched to a PID number in Task Manager details tab (and find out what has hogged the port).

P.S.  Here is the really simple firewall that I use:  https://tinywall.pados.hu/download.php  It is a whitelist type, which reduces data costs.

54
When you can't get access to a port in windows, then a different piece of software is already using that port. 

It is probably http.sys
http://web.archive.org/web/20160126063606/http://www.mikeplate.com/2011/11/06/stop-http-sys-from-listening-on-port-80-in-windows/

55
Bug reports / Re: user account login
« on: March 26, 2021, 08:53:30 AM »
So what i want is that every user (no matter who it is) HAS to login.
Virtual File System
🏠/
right-click
properties
access tab, put checkbox in 'can change password' (a user-group)
OK/Apply.   
Verify that a padlock icon shows at /
Save virtual file system (saves your changes)

After that, go to menu/other/user, and add some users to the group 'can change password' to allow access

56
I wonder if one of HFS versions will do a little differently? 
K https://sourceforge.net/projects/hfs/files/HFS/2.3k/
M http://rejetto.com/hfs/?f=dl
RC7 http://rejetto.com/forum/index.php?topic=13060.msg1064012#msg1064012

Other things to explore
powershell Get-Content .\test.txt | Set-Content -Encoding utf8 test-utf8.txt
https://www.powershelladmin.com/wiki/Convert_from_most_encodings_to_utf8_with_powershell

57
Programmers corner / Re: Template/events for QOS or traffic shaping.
« on: March 23, 2021, 08:19:35 PM »
Thank you for doing the edits and the briefing.  Awesome!!!   


I wonder how to get upload speed/#/status when not on the upload page?

58
Bug reports / Re: [Solved] Robots are scanning my HFS server
« on: March 23, 2021, 06:14:14 AM »
I did associate / webroot with a real empty folder.  So, I don't have any virtual folders. 

And as for the Robots/Hacks/Scans, just weekly I review the accesses and use the Ban and the *

You know like 167.248.133.123, that bother from Censys?  Well, I just ban 167.248.133.* to minimize the inconvenience. 

This plan wasn't instantaneous, but it wasn't laborious. 
If anything, upping the ante on the ban ranges has been best for both security and convenience.
In fact, it has been convenient for the miscreants to put their addresses in my logs so that I can increase scope of range blocking on them. . . resulting in a sharp decrease of bother; and, a whopping good bout of better security. 

The robots.txt contains suggestions.  But, suggestions are only good for real people.  However, as for bots, just use force. 

59
Programmers corner / Template/events for QOS or traffic shaping.
« on: March 23, 2021, 05:57:47 AM »
This won't be complete because full equal-opposite metrics/status/measures aren't provisioned. 

But, this is what I've 'cooked-up' so far: 




{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .}> 7500.}|{: busy :}|{: archive :}.} 
can also be used for style display none or style display initial (to hide/show buttons)

or

{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .} < 7500.}|{:
archive script
upload script
:}.}
If reasonable load, do script (else omit)

or

soft version {.if|{.%connections% > 39.}|{: busy excuse + javascript recheck timer :}|{: do file list :}.}
connection count management without high cpu load cost

hard version {.if|{.%connections% > 49.}|{:{.redirect|/~busyexcuse.}:}.}
new [busyexcuse|public] section is page for javascript recheck timer wait seconds, if less than x connections then back..
connection count management without high cpu load cost + connection desist (disconnect/redirect) kills downloader/scanner.


P.S.
Multi-user scalable:  These above examples run condition detect on the server but the stalling waiting part runs on the Client cpu.
To make stronger logic, the scope was purposefully confined to doable.   Just sayin' that hard road North got 2 more signposts, like Snacks > and < Else. 

60
HTML & templates / Re: Responsive small screen template
« on: March 23, 2021, 05:34:20 AM »
yes, it's the old way before modules:
Code: [Select]
<span onclick="import('/~audiopl.js').then(obj => obj.audiop())">👁</span>
That is freedom to include/add a large amount more 'standard' features. 
And, there is also benefit to easier/effective quality control because when features are included, they are more sure to work. 

Pages: 1 2 3 4 5 6 ... 15