rejetto forum

Recent Posts

1
HFS ~ HTTP File Server / Re: problem with get ip address of external user in my log
« Last post by rejetto on August 12, 2022, 02:46:28 PM »
1. it's described in the link i posted
2. i suppose this to not affect the mechanism, as it address is carried inside the http request

stunnel is not an http proxy, as apache can be, and so you have no way to get the real ip.

with nginx (i'm not using apache) you only need a line like this:
         proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;

as an alternative, HFS 3 is already supporting https natively, one may not need a proxy.
2
1.hfs need to be set to receive an IP from any IP not set to local Host IP

2. Reverse proxy need to send traffic to the machine address not the localhost (this is why you are seeing 127.0.0.1)

Rejetto I have not found that to be the case, such as stunnel. The networking from stunnel is on the local Host and all connection are to and from the localhost. S tunnel logs the public ip. The work silent plz has done os to combine and see that log.

The same is still true with HFS in a reverse proxy situation as configuration by default. This is done to secure the connection with in the reverse proxy, that why jfs is seeing the connection as 127.0.0.1 as machine traffic forwarded it to that.

OP will need to revisit his Apache configuration to setup his networking to allow HFS to see that data.
3
HFS ~ HTTP File Server / Re: problem with get ip address of external user in my log
« Last post by rejetto on August 11, 2022, 04:08:32 PM »
if apache/nginx works as reverse-proxy, it forwards the client's ip to HFS
4
i have a the hfs server in the dmz zone. my hfs have a public ip address. when the user downloads file from the my hfs server in log it displays ip 127.0.0.1 how i can receive public ip address of  the user? the format of log is in the apache format %u %f "%r" %>s %b

Sounds like you're using a patch she has reverse proxy. Because it's reverse proxy you'll always see the traffic coming on your local Host Network. Because that's what a proxy does. In that case you need to look into the logging on Apache when they first hit your Apache website that does the reverse proxy.

Otherwise you need a port forward your HFS to the public and use HFS as your main website.

See Apache docs:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html

5
HFS ~ HTTP File Server / Re: problem with get ip address of external user in my log
« Last post by rejetto on August 01, 2022, 12:05:43 PM »
so, you are using apache as reverse proxy in front of hfs ?
if yes, you are on case #3 of my list
6
Programmers corner / Re: [Tutorial] How to compile the HFS's Source code
« Last post by bmartino1 on July 31, 2022, 08:15:32 PM »
Current sources to compile https://github.com/rejetto/hfs2/releases

I may need to relook into the lib and sources to compile the current revision.
At the time of this writing, as i have been distant on the form.

Per Rejeto HFS "fork me on GitHub Sources:
https://github.com/rejetto/hfs2/

I have found this to be done with Delphi / Free Pascal - C+ coding:
(My Google Drive has file still available, I can only assume multiple geo access to the US Google drive has forced drive to change or disable my account from time to time.)

Introduction
You can use HFS (HTTP File Server) to send and receive files. It's different from classic file sharing because it uses web technology. It also differs from classic web servers because it's very easy to use and runs "right out-of-the box".

The virtual file system will allow you to easily share even one single file.

Dev notes
Initially developed in 2002 with Delphi 6, now with Delphi 10.3.3 (Community Edition). Icons are generated at http://fontello.com/ . Use fontello.json for further modifications.

For the default template we are targeting compatibility with Chrome 49 as it's the latest version running on Windows XP.

Libs used
ICS v8.64 by Fran├žois PIETTE :http://www.overbyte.eu/frame_index.html
Download: http://www.overbyte.eu/eng/download.html?url=http://www.overbyte.eu/arch/icsv858.zip

TRegExpr v0.952b by Andrey V. Sorokin :https://github.com/andgineer/TRegExpr/releases
Download: https://github.com/andgineer/TRegExpr/releases/download/0.952b/TRegExpr_0952b_20040105.zip

JEDI Code Library v2.7 :https://github.com/project-jedi/jcl
Download: http://jcl.sourceforge.net/daily/

Kryvich's Delphi Localizer v4.1 :https://sites.google.com/site/kryvich/localizer / https://github.com/Kryuski/kryvich-delphi-localizer
Download: (requires Google drive share access): https://drive.google.com/open?id=0BwH77FLlRxs2RnFRTnMxcnZNbUE

7
HFS ~ HTTP File Server / Re: read permision with download file on subfolder
« Last post by Mars on July 31, 2022, 03:59:53 PM »
A forgotten event appeared while extending the legacy tests

we start from a real folder added to the VFS (we make sure that it does not inherit the upload itself), we assign it the upload rights by checking anyone,
we then add a new virtual folder as a child, we can confirm that the upload is not possible for this child.

To this virtual child if we also add a real folder: named UPLOAD HFS
it then appears a dialog box asking us whether or not we want to authorize the inheritance upload for this 'grandchild' for all, in this case anyone will be checked for this folder otherwise he will still benefit from the rights of upload successive parents.

After verification, it is implemented that any folder name containing the word upload brings up the question
8
HFS ~ HTTP File Server / Re: read permision with download file on subfolder
« Last post by LeoNeeson on July 31, 2022, 03:06:04 PM »
I see that it is the exact suggestion from rejetto above
Your post is also very helpful and informative. :)

virtual folders do not have permission to perform uploads, only real folders mounted in the VFS have this possibility
This is new to me (but it makes sense, since 'virtual folders' are static resources).
9
HFS ~ HTTP File Server / Re: read permision with download file on subfolder
« Last post by Mars on July 30, 2022, 06:21:32 PM »
virtual folders do not have permission to perform uploads, only real folders mounted in the VFS have this possibility

if the subfolder is a physical child on the hard disk of the uploaded folder, it will have the same rights as its parent, on the other hand if the two directories are neither parent of one nor parent of the other, it is possible to mount the 2nd as a child of the first in the VFS as actual directories (red folder icons) and individually assign the necessary permissions but it does seem like the inheritance persists, a solution to invalidate it is to put a filter mask for the upload of the sub-directory in the files mask tab, put \*.* in the upload field ( which means none matching the mask *.*)


this will not prevent the user from being able to send a file, but hfs will refuse to save it


the solution that can be adopted is to create an account named for example "noupload" protected by a password not found with special characters

we configure the parent to authorize the upload to any authorized person, then for the subfolder we only authorize the upload for the "noupload" account, this deactivates parental inheritance and the upload button will not appear, for remote maintenance needs, we can also authorize the upload for the account that manages the server in addition to the right to delete the subfolder

I remind you that the child must not be a direct subdirectory of the parent on the disk, although theoretically it could work indirectly
I see that it is the exact suggestion from rejetto above
10
If 'the IP address is not shown in the Apache server', then this issue could be related to your Cisco router, and HFS can't do anything to solve this. You could try to describe this problem (and ask for help), on the Cisco Community forum. Since HFS is not widely known, when describing your issue, my recommendation is only saying that you are using an 'Apache server'. I'm almost sure there must be some configuration on your router that is causing this. If you solve this, you could comment the solution here, as reference for other users, in case someone comes with a similar issue in the future. :)