I searched barely, but not found any solutions, so i make this dirty hack.If you need hfs to automatically redirect its port via UPnP
(so others from internet will be able to access your hfs behind your router's NAT), then you can use following:
1. Download latest MiniUPnP
http://miniupnp.free.fr/files/2. Extract and place upnpc-static.exe to your hfs directory.
3. In hfs, press alt+F6 (or goto Menu-> Other options->Edit event scripts)
This will open hfs.events file.
4. Add following text to hfs.events:
[start]
{.exec|upnpc-static.exe -u http://10.0.1.1:1900/igd.xml -a 10.0.1.2 80 80 tcp 0|out=#x.}
[quit]
{.exec|upnpc-static.exe -u http://10.0.1.1:1900/igd.xml -d 80 tcp|out=#x.}
Explanation:[start] // will add port redirection when hfs is started
{.exec|upnpc-static.exe
-u http://10.0.1.1:1900/igd.xml // used to bypass router detection. "XML root description url", can be found by executing "upnpc-static.exe -s"
-a // add port redirection
10.0.1.2 //internal ip of your network card, you must write it manually
80 // local port
80 // external port
tcp // protocol
0 // duration, 0 - redirection will stay indefinetely
|out=#x // hide upnpc window
.}
[quit] // remove port redirection, when hfs is closing. You need to do this, because (dumb) programs on other computers will be unable to redirect 80 port to their computer.
{.exec|upnpc-static.exe -u http://10.0.1.1:1900/igd.xml -d // delete port redirection
80 tcp|out=#x.}
Questions:Can hfs completely hide window of executed program?
(cmd START /b, cmd /c doesn't work)
Is there a way to get LAN ip from hfs?
If not, can hfs parse output of executed program?
To Dev: when you add upnp support, will you add ip detection using upnp?