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 ... 15
HFS ~ HTTP File Server / Re: Why file system cleared?
« on: October 08, 2021, 05:09:00 PM »
In addition to Leo's good backup idea...

You could try the WatchCat script. 
If you hfs menu > save settings > to file
then the watchcat script will backup and then roll back to working settings if an error occurs while HFS is running
see that copy command (one in startup for backup and one in error for rollback) and notice that it could be expanded to first back up the vfs and then utilize the backup on the fly if errors occurred. 

Those features of the watchcat2 script are for the purpose of 'locking down' working condition.  So, you'd first get HFS running as you like. . . and afterwards start up the watchcat script to make HFS stay put. 

For example (watchcat edited to include vfs backup and restore):
Code: [Select]
@echo off
copy hfs.ini hfsini.bak /y
copy myvfs.vfs myvfs.bak /y
@echo       /\     /\
@echo      {  '''''  }
@echo     _{_ O   O _}_
@echo WatchCat is now running
timeout /t 30 > nul
VER > nul
wget --output-document=nul --quiet --wait=10 --tries=3
@echo !
@echo HFS did not respond.
@echo Exiting...
date /T
time /T
TASKKILL /IM hfs.exe /F > nul
timeout /t 3 > nul
@echo ------------------------
copy myvfs.bak myvfs.vfs /y >nul
copy hfsini.bak hfs.ini /y > nul
timeout /t 2 > nul
@echo Starting HFS
start "" "hfs.exe" -c start-minimized=yes -c active=yes
if not port 80, be sure to put the actual port number
if not myvfs.vfs, be sure to use the actual file name
wget is in the zip file:

Bug reports / Re: HFS download speed slow for anything other than lan.
« on: October 08, 2021, 04:54:24 PM »
...mostly 1Mbps.... ports (currently using 9090...
Try (because 9090 is high enough to be affected by QOS.)
Try temporarily loading the throwback template (to take advantage of the settings pack) and then put back the standard template if you like. 
Disable menu setting always search for better address (there is no better address than localhost if you are port forwarding normally)

1mbit is rather severe, so, it could be either qos or it could be if the single thread is wound up to max (sticky console ui). 
To find out the difference, get a friend to download while you play with the console ui (to see if it responds reasonably). 

If the console ui responds actively while downloading then the speed problem is external to HFS (not HFS). 

Programmers corner / Re: HTTP File Server on a Raspberry PI.
« on: August 29, 2021, 07:39:56 PM »
I would like to try a native HFS on arm hardware. 

Everything else / Re: Today is my 18th birthday :)
« on: August 29, 2021, 07:19:51 PM »
... Many ones say that I'm "pre-matured" "since i'm small"...
More swagger, better posture
That is good! 
...I coded many, but got few attention...
because you are smarter, and your audience is trying and wants to catch up.
That is good!

Everything else / Re: My new avatar
« on: August 29, 2021, 06:59:22 PM »
But, can I make a try on a painting of the actual cuteness?  If so, make a picture (preferably several) and put them on a fileshare service, then send a link on private message.  If closer to real for a guy, then I might opt for navy blue hair.  Just sayin.  :D 

Also, it was no secret that I was probably skilled in something other than coding.  :D

Bug reports / Re: Unable to archive/download all
« on: May 24, 2021, 03:18:39 PM »
You can use the .exec macro to run a batch file, which creates copies or archives. 

batch command for multi-tasking is in this format (so the program doesn't wait until the command finishes)
start "" "program.exe" -o options

In this case, program.exe is your choice of copy or command line zip utility.
For an example of batch file, see my WatchCat script (signature link)

If you have the movies in generally browser-compatible basic mp4, then the movie playback is made simple (with the built-in HTML5 player which is in every up-to date browser).   

The trouble is that .mkv, hevc, x265 types may need to be Transcoded to simpler .mp4 (any format that browsers can play natively); and you'd need a movie data-rate (perhaps in the range of  600 to 800 kbits) that doesn't swamp your connection.  But, after the hurdle is cleared, native playback can make the rest of the job much easier. 

The good news is that 'most' of the files are probably browser-compatible already. 

For a conservative data-rate with .mp4, you'd want to crop to 16:9 before/while transcoding so that quality of the viewable area is maximized--particularly, it is the wide-screen movies that need to be cropped to fit so they still look good after transcoding to .mp4 (of conservative size).

P.S.  When I try this with the easy-to-use Stripes template, compatible movie files open in the browser (when HFS is set to open mp4 type in browser:  menu > other > open directly in browser).   See also mime types menu. 

It looks like an expansion of the typical feature of web and ftp servers--the ability to set webroot to a real folder (folder is C:\web (example) but link is /).  The values are stored in web server's data file.  HFS has this, except more capacity to store more links. 

HFS ~ HTTP File Server / Re: problem with config ini file
« on: May 11, 2021, 01:39:18 PM »
Try this method:
 At HFS console, press F7, and add user accounts there first.

HFS ~ HTTP File Server / Re: "username not found"
« on: May 11, 2021, 04:44:12 AM »
...When I try to access a folder...
I wonder if the login script of the Stripes template would do differently?  That was recently revised to go into the folder. 

If that doesn't do it, next step after, would be reset hfs settings (menu > save options > clear options) and then save settings to file (menu > save options > to file), and then put the usernames back in.  EDIT: At HFS console, press F7 and add user accounts there first.
If you went back-and-forth between HFS2.3 and HFS2.4, then it is possible that the VFS has a glitch (to clear it, menu > clear file system). 

P.P.S.  One place to make a real folder is a bit hidden.  That is the root of VFS (house icon)--right click and bind to real folder (usually just a new empty folder on the hard drive).  I just mentioned that because it helps the speed if all folders are real folders. 

HFS ~ HTTP File Server / Re: Changing HTTP response header
« on: May 09, 2021, 03:32:15 PM »
Here is the events file that I use to cause caching
At hfs console, press Alt+F6 to edit events file
Code: [Select]
{.if|{.match|*.jpg;*.JPG;*.jpeg;*.gif;*.png;*.ico;*.mp3;*.mp4;*.mkv;/*img*;*.js|%url%.}|{:{.add header|Cache-Control: public, max-age=604800.}{.add header|Vary: Accept-Encoding.}:}.}

for no cache {.add header|Cache-Control: no-cache, max-age=0.}

...the file can be only accessed by a specific IP...
At HFS console, press alt+f6 to edit events file, and add this:
Code: [Select]
replace  myparticularfile.doc  with target file name (to block for most)
replace  with target IP address (to allow for one)

P.S. Other options instead of  myparticularfile.doc may be /folder* or *.doc and you can even add to the list, such as myparticularfile.doc;myotherfile.txt;*.pdf with semicolon in-between. 

P.P.S. If this method seems clunky, then you could use the more normal and flexible users/groups/passwords, located in hfs menu > other options > user accounts.  And, then you can right-click on a particular folder/file to set it private to your users/groups. 

Programmers corner / Re: Template/events for QOS or traffic shaping.
« on: April 29, 2021, 03:01:40 PM »
...a variable is defined by its name which can include letters or numbers and preceded by # to become a global variable
just include %ip% in the name
{.set|#flag_%ip%| ....   .}
Thanks Mars! 

It works:
Code: [Select]

Programmers corner / Re: Template/events for QOS or traffic shaping.
« on: April 28, 2021, 02:23:15 PM »
For QOS purpose, I had few questions...

Are there some per ip-specific measurements?
How to make global variable apply to only 1 ip? 

something like these:?
set or get #^flag_this_ip

Some templates have extra features (such as thumbnails) that are not good in high-load conditions.  It is good to make a bypass macro to temporarily streamline the template (without extras) to lighten the load.  If global measure is used for traffic shaping, then 1 miscreant affects everyone (this is anti-QOS); so, for QOS function, it may be better if feature-bypass macro targeted the specific overdoing IP address. 
I don't know; but, if the per-ip measures are available, then I could test it. 

Pages: 1 2 3 ... 15