rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: tji on March 15, 2011, 05:28:45 AM
-
I have a lab environment, where I am using hfs to transfer files on various ports to simulate application traffic. For example, hfs on port 3306 simulates connecting to a database.
Is there any way to make one instance of hfs listen on multiple ports? So, I can connect on 80, 8000, 8080, and 3306 and get to the same hfs files?
-
The only solution is to use hfs in mode multiple instance
1) uncheck
menu>> start/exit>> only 1 instance
2) save always option on regitry
menu>> save options>> to registry (curent user or all users)
3) lauch hfs by using a batch file
HFS WIKI command line]
Warning: this feature is available only since version 2.3
You can pass ini commands directly from the command line. If only one instance is enabled, this is the easy way to command HFS from the command line.
This is an example to switch off the server:
hfs -c active=noTo specify many commands, separate them by \n. Example:
hfs -c active=yes\nport=8080
-d <X>
Waits at start for <X> tenths of second.
create a txt file namedhfs.bat with those four lines
@echo off
hfs8000.lnk
hfs8080.lnk
hfs3306.lnk
hfs80.lnk
create four shorcuts of hfs.exe named as above and for each command line use one of follow
hfs8000.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=8000
hfs8080.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=8080 -d 10
hfs3306.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=no\nauto-save-options=no\nport=3306 -d 20
hfs80.lnk -->> c:\-the-full-path-\hfs.exe -c active=yes\nonly-1-instance=no\nauto-save-vfs=yes\nauto-save-options=yes\nport=80 -d 30
put the five files inside hfs.exe folder and run hfs.bat
-
Thanks Mars, that's perfect.