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 - LeoNeeson

Pages: 1 2 3 ... 54
Programmers corner / Re: Only one thing that wasn't released about HFS...
« on: January 05, 2023, 07:42:55 PM »
Thanks for the file! (I will try it on my spare time)

I had to remove from the source the part related to antiflood because it is bound to my database
That's fine (it's fair and understandable), and it's not quite important since it's unrelated to HFS (there are plenty PHP antiflood scripts on Google).

you have my email address, next time send me the link to your post if you want to catch my attention.
Yeah, but I didn't want to bother you (I'll keep it in mind for next time)

Grazie mille! :D

Beta / Re: 2.4 template-making guide
« on: December 28, 2022, 10:12:15 PM »
2.4 beta 2 - The option.newfolder=0 works fine
2.4 beta 3 - The option.newfolder=0 is ignored, "new folder" does not turn off
Thank you, I will check the source code this weekend, and try to fill a bug report on the next days. My free spare time is limited, so don't expect this to be fixed soon (and also, Rejetto is not actively working on v2.x branch). That said, your report is very appreciated.

» EDIT: I've found the problematic commit where this bug was introduced, HERE. We still need to analyze how to keep the improvements, but fix this issue. Please be patient, until we find a solution.

Beta / Re: 2.4 template-making guide
« on: December 28, 2022, 12:58:15 AM »
But why is option.newfolder=0 not working?

HFS 2.4.0 RC7 build #319
The best way to 'catch' where this error was introduced, is to test each build backwards. First, my recommendation is making a backup of your config files .ini and .vfs, and then start testing builds: RC6, RC5, RC4, RC3, etc. until you find the working version. This way it is much easier to find where the bug is.

Everything else / Best DynDNS alternative:
« on: November 22, 2022, 08:46:34 AM »
Many users of HFS have asked in the past (on this forum), what is the best alternative to DynDNS, and from my own experience, nothing beats
(and this is NOT an advertisement, since I'm not getting paid for commenting this).

His owner (Joshua Anderson) is very friendly, and his services are trustworthy (he has more than 20 years of experience, working online since 2001). You can use it for free or by paying only $5 USD/monthly ($60/yr). Although I'm not a Premium member of them (since I currently can't afford it), I highly recommend it to anyone here, and I can't say enough good things about this service.

You can use your own domain (to delegate your DNS to them) and start using it to self-host content (for example, using HFS as server); or by choosing a subdomain from any of their 41,950 domains, which half of them, are only available if you are a paid customer (by getting a Premium Membership). But if your budget is tight, you can use a subdomain, and start using it for free, for as long as you want.

If you need any help to configure and use it with HFS, just leave a message here, and I will try my best to help you. :)


Bug reports / There was a message here yesterday...
« on: November 17, 2022, 03:55:25 AM »
» Edit: there was a message here, only valid for yesterday: November 17, 2022 (but it seems he has forgotten about us: his loyal community of users ). By the way, my message now it's being replaced with the following image (as a meme). From my point of view, this is how it looks for the average user of HFS v2...

Versione italiana per lui (English version for the rest, here)

...I don't want to sound dramatic, but when HFS v3 started flying high (and when v2.4 stalled with an ‘RC’ version, without ever seeing a final stable version), from that moment I began to worry. The difference with my comparison, is that this was intentional (in favor of the new v3.x), and not something accidental, since the ‘captain’ got tired of supporting the old v2.x branch. But don't worry, HFS v2.x is unsinkable .

Sorry, I had to say it.- 8) ;D ::)

HFS ~ HTTP File Server / Re: Rejetto HFS file server alternative?
« on: November 15, 2022, 04:30:53 AM »
madmax leo my man
Fysack! it's been a long time since your visit on the forum. I'm wondering how are you (I hope you are doing well). HFS v2 needs your fixes! ...and this forum some more action.

Programmers corner / Re: Macros matching only a Content-Type
« on: November 12, 2022, 02:56:04 AM »
I've also tried this (without success, since it doesn't work as expected):

Code: [Select]
{.add header|Expires: 0|if=

Neither this works...

Code: [Select]
          {.add to log|Web site served 2.}
  {.add header|Expires: 2.}

This is puzzling, but after many crazy tests, I think we got a bug...

See, this example SEEMS to working (but it's working bad, see at the end):

Code: [Select]
{.disconnection reason|It seems to work since all UA have Mozilla|if=

But this another example should NOT work (since 'Content-Type' can never be 'Mozilla'):

Code: [Select]
{.disconnection reason|Whoa there, something is wrong here|if=

And another crazy example...

Code: [Select]
{.disconnection reason|It should work since there is no mysterious browser|if=

» Result: Something weird is happening here (or I'm doing all wrong)... :o

*** Since I already know Rejetto is not actively working on v2.4x (and I don't expect him to do it), I'm open to receive the modifications needed in the source code to fix this (since I can compile HFS by myself). ***

Programmers corner / Macros matching only a Content-Type
« on: November 12, 2022, 12:52:55 AM »
After reading this post, I have a hypothetical question about macros. I already know how to make a macro that match a file extension in a URL (for example: {.match|*.jpg;*.gif|%url%.}), but I don't know how to ONLY match a 'Content-Type' found in a header. (I've read the Wiki, but found nothing relevant to my question)

I've tried with the following, without success:

Code: [Select]
{.add to log|Web page was served.}
{.add header|Expires: 1.}

My idea is ONLY match requests, with any of these headers:

Content-Type:"text/html; charset=utf-8"



Do you know how to ONLY match a header, with a 'Content-Type' of 'text/html'?. I do NOT want to match files with *.html or *.htm extension (I repeat: I do NOT want to filter or match files by extension). The type of 'Content-Type' was only an example, but it can be any other type.

What am I doing wrong?... :-\

Français / Re: Possible cache problem
« on: November 11, 2022, 11:20:46 PM »
» Edit: after reading your message below...

Can you upload those files you use?
Can't do this for now, I need to complete my work for the next weeks. In a near future, I should share it on Github.
It's a simple HTML that allow to import other HTML in wich I create <article> of news, and the main HTML is then used in OBS Studio to display some news in a carrousel, one by one.
Don't worry, I don't need it (it was only to help you, but you have solved your problem)

Thanks for the answers @LeoNeeson, but I found the source of the problem : it was probably a mix of my Javascript bugging and of the URL I used in my second computer.
You're welcome, I'm glad you solved the issue.  :)


Français / Re: Possible cache problem
« on: November 11, 2022, 09:26:05 PM »
In the meantime, the solution to avoid the cache, is adding a random number to the URL of your .js (JavaScript) files. I've asked you to upload the files, to give you a direct solution, but if you can do it by yourself (adapting it to your code), you can try something like this:

Code: [Select]
<script type="text/javascript">
    document.write('\x3Cscript type="text/javascript" src="script.js?r='+ (new Date()).getTime() +'">\x3C/script>');

Or something like this:

Code: [Select]
    var axel = Math.random() + "";
    var num = axel * 1000000000000000000;
    var script = document.createElement('script');
    script.setAttribute('type', 'text/javascript');
    script.setAttribute('src', 'script2.js?r='+ num +'?');

Another possible solution (at server level, without changing your code).

1) In HFS, press Alt+F6 (or go to: Menu -> Other options -> Edit event scripts)

2) When it opens the '' file, paste the following code:

Code: [Select]
{.add header|Cache-Control: no-cache, no-store, must-revalidate.}
{.add header|Pragma: no-cache.}
{.add header|Expires: 0.}

This is the most cross-browser headers I've found to avoid cache (supporting HTTP 1.1, HTTP 1.0 and proxy clients). If you only need to support 'HTTP 1.1', then you can skip the last 2 headers ('Pragma: no-cache' and 'Expires: 0').

If my solution has solved your problem, leave a comment here, as reference for other users (in case someone comes with a similar issue in the future). :)

Hope this helps,

Français / Re: Possible cache problem
« on: November 11, 2022, 08:14:45 PM »
Hi!, I will try to help you...

I'm using a HTML page declared in HFS as an index to serve.
In this page, I use Javascript to import HTML partials (it works, I've tested and validated it). I then use a second JS script to operate on those snippets included in the main HTML.
Can you upload those files you use? (to try to replicate the error and think of a solution). In case these files contain private content, you can remove the private parts, and upload those files as a .zip file (as attachment on the forum).

Programmers corner / Re: Only one thing that wasn't released about HFS...
« on: October 26, 2022, 05:55:29 AM »
You have read my mind. ;D That's right, I was thinking of using another HFS's instance, to simulate the server (to have an alternative, just in case if someday Rejetto's servers are down). Editing the Windows hosts is one option (and the other is compiling my own executable, and for example, changing '' to a '' address).

in the root put  as diff template

Yes, that would work (the valid options are: '1' is when is the server is reachable; '2' is when no port specified and '3' is when server does not answer).

And although that would work, you can also run PHP code directly from HFS by calling php.exe using 'exec' (taking as an example, the work done by 'raybob' on his 'FHFS', here).

But I'm interested in having the original PHP code Rejetto have used, because it has a part that would be somewhat difficult for me to replicate (due to my limited knowledge). I mean the part where it detects if is NATted (NAT detection), here:

http:// ?port={external_port}&host={external_ip|dns_name}&natted={no|yes}

That's why I hope Rejetto could share the PHP code he is using. :)

He already had released the PHP code for 'ip.php' (for detecting the external IP), here.

So, the only missing code, is the PHP script for ''.

Programmers corner / Only one thing that wasn't released about HFS...
« on: October 21, 2022, 06:00:39 AM »
I totally agree!  100%
HFS should be completely independent!
Hi Rejetto! :D After reading this comment, I've realized there is only one thing that wasn't released about HFS: the PHP code that runs behind (Self test). I guess it must be a very simple code (something that any PHP coder could easily replicate it). Anyway, if you could please share it, I would like to have it, to analyze and learn from it (I know it makes a 'ping' from your server to the user's IP, and then it gives a reply with a code).

Do you mind sharing it here? :) (or privately via PM)


Beta / Re: version 2.4
« on: October 13, 2022, 04:18:35 AM »
Is it possible to make a link I created in a folder open in a new tab/window by default, without having to shift or ctrl+click it?
Hi Tim, sorry for my late reply.
It's easy, just do this...

1) Go to HFS, Virtual File System
2) Right-click on the Home/Root
3) Properties...
4) Diff template
5) Paste this text:

Code: [Select]
  $(this).attr('target', '_blank');

6) Click on 'Apply' and 'OK'.
This is only valid for HFS v2.4.0 RC6 (default template)


HFS ~ HTTP File Server / Re: Why file system cleared?
« on: October 04, 2022, 09:08:56 AM »
@Mars: Your comment leads me to have this 'theoretical' idea: how about setting up the 'System' file attribute, on the VFS file?. In this way, the file should be considered important enough to not be deleted by Windows or other file utilities. This way, we could discard that some external program could be automatically deleting the file (and concentrate the efforts on knowing if it's an HFS's problem). The 'System' attribute could be changed using Attrib or BulkFileChanger (or any other file utility). What do you think? Is a good or bad idea? (or is useless?)

Pages: 1 2 3 ... 54