Recent Posts

Pages: 1 ... 8 9 [10]
92
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by rejetto on November 04, 2017, 05:21:04 PM »
hi guys,
HFS actually supports the x-forwarded-for header.
There's an option that has no part in the GUI, but it is editable in your HFS.INI file.
Search for "forwarded-mask", and put the IP of cloudflare (that you see in the log).

93
Programmers corner / Re: Translations to other languages
« Last post by LeoNeeson on November 04, 2017, 03:20:43 PM »
WHOAA!!! Finally!! I can't believe it! :D

IT WORKS!! It was worth the wait! I will make some more tests now, and give you a file translated to Spanish in the next few hours or tomorrow (and sorry I didn't check the emails yesterday).

Congrats! :)

-------
> EDIT: It will take me a few days to complete the spanish translation, but every seems to work correctly. If anyone wants to start translating to another language, be sure to use a text editor that supports UTF-8, and not ANSI like the Windows's default notepad. The best editor to get this done is Notepad++ (Choosing from the menu: Encoding > Encode in UTF-8, and from: Language > I > INI file), and then starting translating everything after the "=" symbol, taking care of not breaking anything. If anyone has another freeware utility to edit the file, feel free to leave the suggestion here. Thanks again Rejetto!, I'm very happy to see this added! :D I'm sure all the HFS comunity is also happy!
94
Programmers corner / Re: Translations to other languages
« Last post by rejetto on November 02, 2017, 05:03:24 PM »
Leo, Leo, LEEEOOOOO, I finally did it. Can you believe it? :D
Let's make a test, first, to see if everything is ok.
https://drive.google.com/open?id=1aNhV6j2AcmL5XivZNbleU6rLn3atGyuv
Consider this method doesn't cover every bit of text in the app, but we can work in the future to expand the set of translatable strings.
95
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by sergio on October 31, 2017, 12:25:02 PM »
I just verified that activating in hfs  "Requests dump" register IP Cloudflare and visitor correctly. without the need to add the previous code.
I had not noticed that option.

problem solved.

Thanks Mars for your great help.
96
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by Mars on October 31, 2017, 09:51:39 AM »
I suppose that  http://myhfs.com/file.zip is a direct access to hfs without going through Cloudflare, if it is so, then the headers are not initiated and remain empty

compare the dump requests obtained in the hfs log for both cases, directly  by http://myhfs.com/file.zip and trough Cloudflare
97
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by sergio on October 31, 2017, 09:45:33 AM »
if I enter http://myhfs.com

register the 2 ip correctly

15:01:38 127.0.0.1:2243 request
>    Cloudflare IP       : 127.0.0.1
>    CF-Connecting-IP :   correctly
>    X-Forwarded-For  :   correctly


if enter link direct http://myhfs.com/file.zip

only register IP Cloudflare.
it no longer appears:

15:01:38 127.0.0.1:2243 request
>    Cloudflare IP       : 127.0.0.1
>    CF-Connecting-IP :   correctly
>    X-Forwarded-For  :   correctly
98
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by Mars on October 31, 2017, 08:38:09 AM »
I did not understand what's wrong.

did you get information for the last two lines or are they blank as below?

15:01:38 127.0.0.1:2243 request
>    Cloudflare IP       : 127.0.0.1
>    CF-Connecting-IP :
>    X-Forwarded-For  :

on the hfs-log, do a right click and select "requests dump" in the "log what" list  and  you must obtain the list of the complete header as in the log
99
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by sergio on October 30, 2017, 12:33:53 PM »
Thanks Mars.

I enter the code at the beginning of the head tag
Is it the right place?

works well. But when it is entered by direct link, it does not work.
example, mihfs.com/file.zip
How is this resolved?

Code: [Select]
<head>
{.add to log| request
   Cloudflare IP       : %ip%
   CF-Connecting-IP : {.header|CF-Connecting-IP.}
   X-Forwarded-For  : {.header|X-Forwarded-For.}
.}
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{.!HFS.} %folder%</title>
<link rel="stylesheet" href="/?mode=section&id=style.css" type="text/css">
    <script type="text/javascript" src="/?mode=jquery"></script>
<link rel="shortcut icon" href="/favicon.ico">
<style class='trash-me'>
.onlyscript, button[onclick] { display:none; }
</style>
    <script>
    // this object will store some %symbols% in the javascript space, so that libs can read them
    HFS = { folder:'{.js encode|%folder%.}', number:%number%, paged:{.!option.paged.} };
    </script>
<script type="text/javascript" src="/?mode=section&id=lib.js"></script>
</head>
100
HFS ~ HTTP File Server / Re: Macro for logging visitor's IP (using Cloudflare)
« Last post by Mars on October 29, 2017, 02:07:49 PM »
to query an header entrance there is this macro  {.header|xxxxxxxx.}

Quote
{.add to log| request
   Cloudflare IP       : %ip%
   CF-Connecting-IP : {.header|CF-Connecting-IP.}
   X-Forwarded-For  : {.header|X-Forwarded-For.}
.}
Pages: 1 ... 8 9 [10]