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.


Topics - LeoNeeson

Pages: [1] 2
1
Español / [Tutorial] Cómo compilar el código fuente de HFS
« on: November 21, 2018, 09:00:23 AM »
[Tutorial] Cómo compilar el código fuente de HFS

Por primera vez en la historia de este foro, me gustaría compartir con ustedes el proceso de compilar el código fuente de HFS, de la manera más simple posible para que cualquiera de ustedes pueda realizarlo sin problemas. Se recomienda previamente ver ESTE video tutorial (en formato GIF animado, de 1,56 MB que también puedes descargar de aquí), para poder previsualizar en apenas 5 minutos todo el proceso completo. Luego puedes seguir las instrucciones que dejo a continuación.

Simplemente sigan estos pasos:

1] Descarga el 'Portable Turbo Delphi Lite v1.0d', de aquí.
2] Descarga el 'Paquete de componentes' requeridos HFS, de aquí.
3] Descarga el 'Código fuente' de la última versión de HFS, de aquí.
4] Instala y/o descomprime el ejecutable del paso uno, en: C:\Portable\TDLite
5] Descomprime el archivo del paso dos, en esta carpeta: C:\Portable\TDLite\lib
6] Descomprime el código fuente de HFS, del paso tres, aqui: C:\Portable\TDLite\Projects\HFS
7] Inicia Turbo Delphi abriendo "TDrun.exe" o utilizando el acceso directo del escritorio.
8] Ve al menú 'Tools' y haz click en 'Options...' y se abrirá una nueva ventana.
     Allí, ve a: 'Environment Options' > 'Delphi Options' > 'Library - Win32'.
     Ahora en 'Directories' > 'Library path:' reemplázalo con la siguiente ruta:

Code: [Select]
$(BDS)\lib;$(BDS)\lib\Obj;$(BDS)\Imports;$(BDS)\lib\DelphiZLib.128;$(BDS)\lib\FastMM4991;$(BDS)\lib\GifImaged2010b;$(BDS)\lib\JCL1_22\source;$(BDS)\lib\Kdl32;$(BDS)\lib\OverbyteIcsV7Gold\Delphi\Vc32;$(BDS)\lib\TRegExpr\Source;$(BDS)\Projects\HFS;
9] Ahora ve al menu 'File' y haz click en 'Open Project...' y abre el archivo 'hfs.bdsproj'.
10] Luego ve al menu 'Project' y haz click en 'Options...' y se abrirá una nueva ventana.
       Allí, haz click en 'Compiler Messages' y luego en 'Warnings', desmarca o deselecciona los siguientes items:

Code: [Select]
    - Deprecated Symbol
    - Platform Symbol
    - Return value of function might be undefined

(Este paso número 10 es enteramente opcional, pero se recomienda hacerlo. Si no lo haces, encontrarás 32 o 33 advertencias ó 'Warnings' de Delphi, al momento de compilar, pero ésto no afecta en absoluto el proceso de compilación y obtendrás el mismo y funcional ejecutable. Éstas advertencias no son importantes, sino informativas).

11] Finalmente, ve al menu 'Project' y haz click en 'Build hfs' y todo se compilará.
       Una vez compilado, verás (en un texto en negrita): 'Done: Build All', haz click en 'OK' y habrás concluído.
       Encontrarás tu nuevo ejecutable hfs.exe en ésta carpeta: C:\Portable\TDLite\Projects\HFS

12] Que lo disfrutes! :)

Si necesitas un programa para descomprimir, puedes utilizar 7-Zip.

Si necesitas o deseas instalar todo en otra carpeta (para tener todo en un pendrive USB), es mejor que completes los pasos uno al seis desde las ubicaciones indicadas, y que luego antes de efectuar el paso siete, muevas toda la carpeta al dispositivo USB que quieras. De ésta manera, te aseguras de no equivocarte con las ubicaciones de carpeta. Desde luego, si eliges otra carpeta deberás cambiarla en todos los pasos, EXCEPTO que no debes modificar la ruta del paso ocho (ya que el programa auto-detectará la nueva ubicación).

» RENUNCIA DE RESPONSABILIDAD: No me hago responsable de ningún daño o desconfiguración de su PC. Siempre haga una copia de seguridad primero y tenga en cuenta que este tutorial se realizó en una computadora con un Windows recién instalado. Si ya tiene instalada alguna versión de Delphi, tenga en cuenta que ejecutar esta versión portátil de 'Turbo Delphi' podría ocasionarle problemas (así que evite usarla en una PC con Delphi instalada). Mis archivos subidos no fueron modificados por mí, y están libres de virus, pero debe comprobar las sumas de verificación MD5 para asegurarse que los archivos que ha bajado sean los mismos:

Quote
hfs2.3m.src.zip / MD5: AE2C3025B36FFF2BC72DB5FF7784C4BD
HFS.Libraries.zip / MD5: 7751002A930B7C211BFC1F9C7AA1853C
PortableTurboDelphiLiteInstaller10d.exe / MD5: 9B24FA6BD91FAF9ACA8AEA78B90AEF07
(Puedes utilizar el freeware HashCheck para verificar las sumas de comprobación MD5 de los archivos que has descargado)

» HFS.Libraries.zip / Enlaces de descarga:
https://www.4shared.com/s/fsY2jRS7Tda
http://www.mediafire.com/?z32tkfzezfx36i7

Siéntete libre de dejar cualquier comentario o pregunta si tienes alguna duda, y por favor reporta cualquier error o problema que encuentres al momento de compilar. Se aprecia todo tipo de comentarios, críticas constructivas, o sugerencias de cualquier tipo (tu comentario me da más ánimo para seguir publicando nuevos tutoriales).

Saludos,
Leo.-

2
Programmers corner / [Tutorial] How to compile the HFS's Source code
« on: November 21, 2018, 07:04:05 AM »
[Tutorial] How to compile the HFS's Source code

As the result of this, and for the first time ever, I would like to publish the complete process of compiling the HFS's Source code (as simple as possible, step by step, so everyone could do it). It's recomended to watch first THIS video tutorial (download size: 1.56 MB, in GIF format), to see the enterelly compilation process. Then, just follow these steps:

1] Download 'Portable Turbo Delphi Lite v1.0d', from here.
2] Download the 'Library pack' required by HFS, from here.
3] Download the latest 'Source code' file of HFS, from here.
4] Install and/or unrar the exe of the step one, on: C:\Portable\TDLite
5] Unzip the file from the step two, on this exact folder: C:\Portable\TDLite\lib
6] Unzip the source code file of HFS, from step three, here: C:\Portable\TDLite\Projects\HFS
7] Start Turbo Delphi by opening the file "TDrun.exe" or using the shortcut on your desktop.
8] Go to the menu 'Tools' and click on 'Options...' and the 'Options' window will open.
     There, on go to: 'Environment Options' > 'Delphi Options' > 'Library - Win32'.
     Now on 'Directories' > 'Library path:' replace it with the following path:

Code: [Select]
$(BDS)\lib;$(BDS)\lib\Obj;$(BDS)\Imports;$(BDS)\lib\DelphiZLib.128;$(BDS)\lib\FastMM4991;$(BDS)\lib\GifImaged2010b;$(BDS)\lib\JCL1_22\source;$(BDS)\lib\Kdl32;$(BDS)\lib\OverbyteIcsV7Gold\Delphi\Vc32;$(BDS)\lib\TRegExpr\Source;$(BDS)\Projects\HFS;
9] Go to the menu 'File' and click on 'Open Project...' and locate the file 'hfs.bdsproj'.
10] Go to the menu 'Project' and click on 'Options...' and the 'Project Options' will open.
       There, click on 'Compiler Messages' and on 'Warnings', uncheck the following items:

Code: [Select]
    - Deprecated Symbol
    - Platform Symbol
    - Return value of function might be undefined

(This entirely step 10 is optional, but recommended. If you don't do it, you will encounter 32 or 33 Warnings on compiling time, but this doesn't affect the compilation process and you will get the very same functional executable. Those warnings are not important, but informative).

11] Finally, go to the menu 'Project' and click on 'Build hfs' and wait the process to finish.
       Once finished, you will see (in bold text): 'Done: Build All', click on 'OK' and it's done.
       You will find the new executable hfs.exe on this folder: C:\Portable\TDLite\Projects\HFS

12] Enjoy! :)

If you need a tool to unzip/uncompress, you can use 7-Zip.

If you want to use another folder path location (for example to run it from a USB drive), it's better you complete steps one to six from those locations, and then move that folder to the USB before running step seven. This way, you don't mess up with folder locations. Of course, if you choose another folder, you need to change the path in all the steps, but do NOT change the path of step eight (since it will auto-detect the new location).

» DISCLAIMER: I'm not making me responsible for any damage or miss-configuration on your PC. Always backup first, and keep in mind this tutorial was done on fresh installed Windows computer. If you already have any version of Delphi, running this portable version of 'Turbo Delphi' could lead you to problems, so avoid using it on a PC with Delphi installed. My uploads are untouched and virus free, but you must re-check that the MD5 file checksums are the same, as follows:

Quote
hfs2.3m.src.zip / MD5: AE2C3025B36FFF2BC72DB5FF7784C4BD
HFS.Libraries.zip / MD5: 7751002A930B7C211BFC1F9C7AA1853C
PortableTurboDelphiLiteInstaller10d.exe / MD5: 9B24FA6BD91FAF9ACA8AEA78B90AEF07
(You could use the freeware HashCheck to verify the MD5 file checksums)

» HFS.Libraries.zip Download link:
https://www.4shared.com/s/fsY2jRS7Tda
http://www.mediafire.com/?z32tkfzezfx36i7

Feel free to leave a comment or ask any question if you have doubts, and also report if you find any problem when compiling, or if you need further help.

Cheers,
Leo.-

3
Programmers corner / [Solved] Friendly petition to Mars or any programmer
« on: November 14, 2018, 09:45:44 PM »
Since a long time I wanted to build HFS by my self, and recently I've found this 'Portable Turbo Delphi Lite v1.0d' here. But that's not enough, since I need all the library components listed on 'developer notes.txt' (but I've read here in various posts on the forum, that the configuration and installation of those components is not very straightforward and it's prone to give errors on compiling time).

I rarely ask for help, but this time I'm asking to someone who already had compiled HFS, the following...

@Mars/Anyone: Could you please provide me the ./lib folder (with all the components included, and with everything ready to compile HFS, including the configuration file 'TDrun.reg' of your 'portable Turbo Delphi' folder?...

@Mars: Over the years, you have many times proposed excellent code changes and enhancements that some of them were later discarded or not used by Rejetto. That's why I would love to have your own custom modified HFS source code, since it could contain many of those interesting changes that were not included on the final version of HFS. So, Mars: would you be kind enough to share with me your the source code of HFS with the custom modifications done by you?. This is a very small file (that you could even attach in this thread), or send me a download link in a private message, if you don't want to keep it public. If you don't like to share it with me, it's OK, I will accept your answer, but please don't give me an ironic 'wait, wait and wait' response.

Cheers, :)
Leo.-

4
HTML & templates / Old default template for new and legacy browsers
« on: November 05, 2018, 07:00:25 AM »
Since Rejetto has updated the default template of HFS v2.4 to a new responsive mobile-friendly version (and also have updated jQuery from v1.4.2 to v1.12.4), I decided it's time to release a specially modified version of the old default template you found on past HFS versions, up to v2.3m, supporting both new and legacy browsers. The only modification I did is embedding the old jQuery v1.4.2, and the rest of the code is untouched. This file was taken from the source code of v2.3m (default.tpl).

You can use this old default template (that's attached to this post) on HFS v2.4 and newer versions too, but keep in mind that Rejetto only gives support to browsers not older than JAN/2006 with some exceptions (as he stated here), so keep in mind that the use of this template is officially unsupported (and unless Rejetto says otherwise, I'm currently the only one who gives support for it, but rest assured this template is rock-solid stable).

In the case you use an old custom template (that makes use of old jQuery) on a legacy browser (older than 2016), you will need to make the following modification, simply replacing this text (marked in red):

Quote
<script type="text/javascript" src="/?mode=jquery">

...to the following text (marked on green color):

Quote
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">



Or if you want to make it work offline (because you use HFS on a LAN, without internet access), the modification is more complex (and is exactly the same modification I did on the attached template), and you need to use this:

Quote
<script type="text/javascript" src="/?mode=section&id=jquery.js">

And also add the following text, before this section: [file=folder=link|private]

Quote
[jquery.js|no log|cache]
/* Copy and paste here the contents of the jQuery v1.4.2 file */



If you have any doubts, use as reference the template attached to this post, or feel free to ask me for help, by leaving a message here, in this post (the support I'm giving is limited only to make work the old jQuery v1.4.2 with your template, and nothing else). If your template doesn't use jQuery at all, you don't need to make any modification. An alternative to this template, is using 'The really fast Throwback (retro) template' made by danny.

Enjoy! :) ...and don't forget to leave a comment if you find this useful!
(and thanks to Rejetto for making it the default template for almost 8 years)

Code: [Select]
File: legacy-template.tpl
MD5: 048E8A2A4A4F6AA8D6B544A24CECE11F

Cheers,
Leo.-

5
EDIT: As reference, I comment this thread was started here and then moved here. The idea started after reading the code of mobil-light_V4.2beta.zip by dj (thanks him for the inspiration, Mars for the actual code implementation that you will find below, and Rejetto, because he took this idea into consideration). Now it follows the original post...



Offtopic: Reading your template, I always wondered is a file section (in the HFS template), could store a file encoded in Base64, and that be decoded by the server on-the-fly (delivering the decoded output).

I see you have write this:

Code: [Select]
[mystyle.css]
{.mime|text/css.}
a {text-decoration: none}

...and I expected this to deliver the same output (but it doesn't):

Code: [Select]
[mystyle.css]
{.mime|text/css;base64.}
YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==

I already know that is possible to directly write Base64 code, like this:

Code: [Select]
<link rel="stylesheet" type="text/css" href="data:text/css;base64,YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==" />
But I was wondering if is it possible make HFS decode Base64 'on-the-fly' using a macro like: {.mime|text/css;base64.}

Also, neither of the following works:

Code: [Select]
[mystyle.css]
{.base64|YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==.}

Code: [Select]
[mystyle.css]
{.base64decode|YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==.}

I'm curious to know if this is possible using macros. ???

6
Programmers corner / Adding Two-Factor Authentication (2FA) to HFS
« on: September 23, 2018, 01:16:24 AM »
Since HFS currently depends only on a primitive and weak HTTP/1.1 login system (where unless you use SSL, the password travels in clear text, encoded in Base64), I was thinking it would be nice if HFS implements a simple Two-Factor Authentication system (also known as TOTP or 2FA). This system is a time-based password algorithm (which change every 30 seconds), added on top of the current login. This way, if someone steals the user/pass, they could not get through the TOTP/2FA system (since the 2FA would prevent the access to your private account and files, even if they know the password).

- How this works on the server?
The server needs to generate a secret key (only once, when setting up the 2FA), and it would store that secret key (encoded in Base32) along with the user/pass (I'm always talking about the server part). At user/client level, when TOTP is enabled on HFS, it should check if the credentials (user/pass) are correct first, and then if they are valid it should ask for the 2-Factor Authentication Code. To make this work (like I've said), HFS should store (along with the username and password) the 2FA 'secret key' needed to generate the 2FA time-based codes. The rest of the work flow (at server level) can be read here. To end-users, I guess most of you know how the Two-Factor Authentication works, since Gmail already use it since several years (check out this, if have any doubts).

- Implementing TOTP on HFS using a free Delphi library
After a deep search, I've found a small Delphi/FreePascal/Lazarus library, that could make easy the implementation on HFS: https://github.com/nikosdion/timecode

And now that version 2.4 is on beta test (and since HFS is doing a step from v2.3 to v2.4), I think is a great time to make the server a little more secure by default. I hope Rejetto like and welcome the idea, and if anyone here could collaborate at code level to make this works on HFS, it would be great :) (this is only a suggestion, not a petition to add it).

Cheers,
Leo.-

7
HTML & templates / Alternative login form for modern browsers
« on: August 25, 2018, 03:05:25 AM »
Thanks to danny and his idea (in this post), and after spending several hours finding a solution and doing lot of tests, I think we finally have a working workaround solution for login from mobile browsers (that it even work on desktop browsers too).

1. In the "Virtual File System" box, right click on the first element (Home)
2. Properties
3. Diff template
4. Enter this text:
Code: [Select]
[unauthorized]
<h1>{.!Unauthorized.} {.!&#47; Please login&hellip;.}</h1>
{.!Either your user name and password do not match, or you are not permitted to access this resource..}<br>
{.!Please login to access to your account, and check if you have the correct permissions to continue..}<br>

<br>
<fieldset id='login'>
  <legend><img src="/~img27"> {.!Login.}</legend>
  <center>
    <input type='text' id='usr' size='15' placeholder=" Username" value=""><br>
    <input type='password' id='psw' size='15' placeholder=" Password" value=""><br>
    <input type='button' id='lognow' style="width:110px;" value="{.!Login.}" onclick="NewLogin();">
  </center>
</fieldset>
<br>

<script>
function NewLogin() {
  var xhr = new XMLHttpRequest();
  var ThisFolder = window.location;
  var ThisUser = document.getElementById("usr").value;
  var ThisPass = document.getElementById("psw").value;
  var LoginToken = ThisUser+':'+ThisPass;
  xhr.open("GET", "/~login", true);
  xhr.withCredentials = true;
  xhr.setRequestHeader("Authorization", 'Basic ' + btoa(LoginToken));
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4 && xhr.status == 200) {
      if (window.location.href.indexOf("~login") != -1) {
        window.location.replace('/?success');
        } else {
          window.location.replace(ThisFolder);
      };
    }
    if (xhr.readyState == 4 && xhr.status == 401) {
      alert("Invalid credentials! \(Wrong username or password\)");
    }
  }
  xhr.send();
}
</script>

Please test it and report the results (remember to create an account first on HFS). I've literally wasted all my free afternoon, but I'm happy with the results!. It may not be perfect, so, feel free to adapt/correct/enhance the code... ;)

Cheers,
Leo.-

8
HTML & templates / Simple contact template
« on: July 22, 2018, 09:26:42 AM »
Today I was trying to get working a simple contact template, that automatically save its contents as a local .txt file. To apply this template, follow these steps:

1. Create a folder named, for example as: contact (add it as real folder)

2. Extract from the zip the "hfs.diff.tpl" of the version you've choosen.

3. Copy that file (hfs.diff.tpl) to the "contact" (or whatever name you choose) folder you made on the first step.



» Versions:

Macro-Method = Using Form + Macros (without needing upload permissions)
XML-Method = Using XMLHttpRequest (needs upload permissions to anyone)
EML-Email = Same as XML-Method, but it saves in .eml format instead of .txt

» Description:

Both version are currently functional, but still need to add some kind of field validation (to check if the fields are empty or not), and perhaps we can also show that the message was successfully sent using another methods than showing a simple 'alert' (getting some answer back from the server, at least in the v1.0b-XML-Method). The v1.0a-Macro-Method could have redirect to page like (after the form was submitted):

Code: [Select]
[success]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Message successfully sent</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head><body><h3 style="color:black;">The message was successfully sent!</h3>
</body></html>

Thanks to dj for his help! :) (without him, this couldn't be done)
Any other enhancements/suggestions are welcome!

Cheers,
Leo.-

9
WARNING: there is a serious security hole in the use of this script (which was solved here), that allows access to any file on the entire hard disk hosting HFS. Be sure to restrict the access of this script only to yourself.


Hi there! I was reading these wiki pages (Template macros & scripting commands), trying to being able to download and save an external file to the current folder (Remote upload), but I can't get it working.

Please check my code (in my example, there is an URL already loaded, of a Tiny Core Linux ISO file). The following code works fine, but it's NOT recommended as it could overload the RAM if you are downloading a big file (I only leave this as reference):

THIS CODE WORKS:
Code: [Select]
<form method='post'>
URL: <input name='url' value="http://distro.ibiblio.org/tinycorelinux/9.x/x86/release/Core-9.0.iso">
<br>Filename: <input name='dest' value="%folder%Core-9.0-GOOD.iso">
<br><input type='submit'>
</form>
{.set|url|{.postvar|url.}.}
{.break|if={.not|{.^url.}.}.}
{.set|dest| {.or|{.filename|{.postvar|dest.}.}|{.filename|{.^url.}.}|downloaded.} .}

{.load|{.^url.}|var=data.}
{.and
| {.length|{.save| ./{.^dest.} |var=data.}.}
| Downloaded {.^dest.} for {.length|var=data.} bytes
.}

The following is the recommended code by rejetto here (chinking the file every 1MB), but it doesn't work as expected (the download has a never ending loop). This code not only doesn't work, but besides that, it also have missing the text "Downloaded Core-9.0.iso for 13256704 bytes" and the event doesn't get logged on HFS's log.

THIS CODE DOESN'T WORK: (why?)
Quote
<form method='post'>
URL: <input name='url' value="http://distro.ibiblio.org/tinycorelinux/9.x/x86/release/Core-9.0.iso">
<br>Filename: <input name='dest' value="%folder%Core-9.0-BAD.iso">
<br><input type='submit'>
</form>
{.set|url|{.postvar|url.}.}
{.break|if={.not|{.^url.}.}.}
{.set|dest| {.or|{.filename|{.postvar|dest.}.}|{.filename|{.^url.}.}|downloaded.} .}

{.set|from|0.}
{.set|chunk|1000000.}
{.save|{.^dest.}|.}
{.while|chunk|{:
   {.load|{.^url.}|var=data|size={.^chunk.}|from={.^from.}.}
   {.if|{.length|var=data.}
      | {:{.append|{.^dest.}|var=data.}
         {.inc|from|{.length|var=data.}.}
        :}
      | {:{.set|chunk|0.}:}.}
:}|timeout=0.}

Could someone point me where is the fault?... :-\

10
Español / HFS en Español - Versiones beta
« on: December 05, 2017, 12:22:43 PM »
HFS en Español v2.3k #299 Beta [05-DIC-2017]

» Descarga:
https://www.4shared.com/s/f1CqBvhssei
http://www.mediafire.com/?2vv2yc76tv1dkpa

Code: [Select]
Nombre: HFS v2.3k Build #299 Spanish Beta [05-DIC-2017].rar
CRC-32: 0CA7F67A
   MD4: 6B7E71011E61419D304435B3F60EB01C
   MD5: D19336717A380BD874E592B1BA8EF411
 SHA-1: B775B108B31BB7FDFCB832D75B7F4022D555862F

Versión portable: Descomprima el archivo RAR en una carpeta nueva y listo.
Solo actualización: Para aquellos que hayan bajado exactamente ESTA versión preview y deseen actualizar a esta versión en español, pueden descargar y descomprimir ESTE archivo adjunto en la carpeta donde tienen instalado HFS, conservando asi toda su configuración actual (haz siempre una copia de seguridad antes de sobrescribir cualquier archivo).

» Basado en la 'compilación previa' de la próxima versión 2.3l (Build #300).

Que lo disfruten! :)
Leo.-
 

11
FHFS / FHFS: Is there going to be any update on this?
« on: August 29, 2016, 04:24:09 AM »
@Raybob: Is there going to be any update on this? Since in the HFS.ini of FHFS v2.1.3, the updates of the internal HFS (server.dll) are not automatic (update-automatically=no), it would be great to have an updated version with the last HFS v2.3i Build #297 running out-of-the-box. There are many users out there who are still using FHFS with a built-in outdated HFS v2.3d Build #292. And since there was a VERY important security update in this last version, many users may be exposed to hackers, like recently happened here. I understand that having the automatic updates disabled is to ensure everything keeps working/compatible with the rest of the FHFS code. I also understand that you may not want (or have the time) to be updating FHFS every time a new version of HFS is out, but this time is critical to have an update (since it fixed a "Remote Command Execution" exploit).

12
HFS ~ HTTP File Server / Changing HTTP response header
« on: May 22, 2016, 09:36:06 AM »
OK, I've started a new thread to keep this organized. This post started here, and the question was: How to change the HTTP response header "Server" (or any other string in the header) using Macros? ("Server" is a string that displays the name of the server, and it shows the HFS version). If you don't know what I'm talking about, use a Download Manager that show this info (for example, I'm using FlashGet).

Suggestions and examples are welcome. :)

13
Bug reports / [SOLVED] Uploading a MD5 file is forbidden?...
« on: March 13, 2016, 09:42:24 AM »
I think I've found a bug, since HFS says 'uploading a MD5 file is forbidden'. After doing an extensive search on this forum about "MD5" implementation on HFS, just to be sure this wasn't' posted before, I think there is a bug on HFS that prevents MD5 files to be uploaded...

> How this happened?...
The other day I was uploading a bunch of files to my server, and it was unable to upload a MD5 file. This doesn't have anything to do with the 'fingerprints' feature of HFS, since I have that option disabled (or at least it should not interfere with it). I've tried renaming the .md5 file to .txt, and HFS uploaded the file successfully. But having the .md5 extension, give the following error: "File name or extension forbidden.". This doesn't happen with any other checksum files (like .sha1, for example).

> How to reproduce the problem?...
1) Enable the 'Upload' feature to some real folder.
2) Using any browser (using the web interface), try to upload a ".md5" file to the server.
3) Bang! The file cannot be uploaded...

Here is a log...
Code: [Select]
00:28:13 192.168.0.101:1760 Requested GET /MyFolder/
00:28:13 192.168.0.101:1761 Requested GET /?mode=jquery
00:28:15 192.168.0.101:1761 Requested GET /MyFolder/New/
00:28:16 192.168.0.101:1761 Requested GET /?mode=jquery
00:28:29 192.168.0.101:1761 Upload failed for Test.md5: File name or extension forbidden.
00:28:29 192.168.0.101:1761 Upload failed Test.md5
00:28:29 192.168.0.101:1760 Requested POST /MyFolder/New/
00:32:45 192.168.0.101:1760 Requested GET /MyFolder/New/
00:32:45 192.168.0.101:1760 Requested GET /?mode=jquery
00:32:51 192.168.0.101:1770 Uploading Test.txt
00:32:51 192.168.0.101:1770 Fully uploaded Test.txt - 44 @ 0B/s
00:32:51 192.168.0.101:1770 Requested POST /MyFolder/New/

Here is an screenshot (cropped)...


I'm almost sure this bug/error has to be related to the 'fingerprints' feature. I can provide more details if you need them. To me, uploading .md5 files is important.

> EDIT: The "solution" for this, it's here. Thank you Rejetto.

14
Everything else / How to tell if an OpenVPN Client runs on a router?
« on: October 05, 2015, 04:24:36 PM »
Hi there! Sorry for this offtopic and technical question:

> How to tell if an OpenVPN Client runs on a router?

I mean, every internet browser has an "User Agent", but I can't find any information related to OpenVPN having an "User Agent". So, is there any way an OpenVPN Server may know if some OpenVPN Client is running on Linux, Windows, Android, etc?...

Why I'm asking this weird question? Because my VPN provider doesn't like that their VPN service be used from a Router (mainly, to avoid misuse, and to avoid abuse by sharing the service with others). Not my case. I DO NOT want to do this to "circumvent" their terms in ANY way, because I would like to use the router ONLY to make the configuration easier on my devices (I mean, only have to configure the router, and not every single device). Of course, to make happy my VPN provider, I'll connect ONLY ONE device at a time to that router (after all, my speed connection doesn't allow me to use more than that, since it's a wireless connection).

Sorry if it's a confusing question, but this is not something I can ask my VPN provider directly (to avoid any misunderstanding, or worse yet, having my account cancelled). So, my question is: if I run an OpenVPN Client on a router (with OpenWRT firmware), can I be 100% sure my VPN provider doesn't detect it? Does an OpenVPN client have an "User Agent"? (or any hardware/system identification string when makes its connection?). Anyone have an idea about this?...

Thank you people... :)
Leo.

15
HFS ~ HTTP File Server / Adding Remote Upload to HFS...
« on: July 20, 2014, 11:54:17 PM »
I'm always thinking new features that can be great for HFS. Like this one...

Remote URL upload: Upload files from remote servers directly to your HFS server.

Imagine you are on a mobile connection (or on the road), and someone has a file in his HFS server (or anywhere), and you want to upload it directly to your HSF server. Imagine you have a direct link that you know it will expire in a few hours, and you want to upload it to your server directly. All this can be done using Remote URL upload. Obviously this, like any other feature, can be disabled or password protected (and may come disabled by default). I think you know how this works. It's like "interconnecting" servers, a very cool feature. I think it may be easy to implement it, since it's not exactly about uploading a file. It's more about downloading a file, since your server will be downloading a file from a remote location and saving it in a local "shared" folder. And voila!...

Again, this is only a suggestion, not a request. There is no pressure at all, not obligation or whatever. My only wish is to put my "two cents" in this proyect, at least giving ideas. :)

In case you add this, it will be usefull to have an option to know the free space available in the server (or set a limit). Hope you like it!

Greetings!
Leo.

Pages: [1] 2