rejetto forum

Default IP

Guest · 9 · 9491

0 Members and 1 Guest are viewing this topic.

jack_2000

  • Guest
I'm not sure weather this should go here or in suggestions but here it goes:

When i start hfs( i have it on auto start) It chooses my hamachi vnc ip:  5.99.172.72
It is indeed a valid ip within the routing of hamachi if i were in a virtual network with some one they could connect through it.

However i'd like it to choose my external ip address, it is sadly dynamic but real and unique to me. So i can't set it with custom ip and i always have to use the find external ip address.

Is it possible for there to be an option to always find external ip address upon start of hfs?
And if also possible to always do a self test after that?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
menu > start/exit > find external address on startup

are you sure you still need the self-test now?


jack_2000

  • Guest
Hm thanks i didn't notice that option, a self test on start could be usefull, like the way it tells you it can't open the port if some other app is using it, it could be a toggle like this function.
If it's not too hard to implement.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
to put an option in the menu, it should be widely used.
i don't think such feature would be widely used.
what i can do is to let make an event script (ALT+F6) like this work for the next release

[server start]
{.self test.}



interested?


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2068
    • View Profile
 ???
Quote
[server start]
{.self test.}

 :P
[server start]
{.server|sleep=true.}
{.server|ip={.get|external ip.}|port=xx.}
{.server|sleep=false.}
...continue



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
it's not meant to reprogram the self-test.
just to invoke it.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2068
    • View Profile
tested and working, i don't know if someone is interressing to use it ??

Quote
   if name = 'get' then
      try
        if p = 'can recur' then trueIf(mainFrm.recursiveListingChk.Checked)
        else if p = 'can upload' then trueIf(accountAllowed(FA_UPLOAD, md.cd.conn, md.folder))
        else if p = 'can delete' then trueIf(accountAllowed(FA_DELETE, md.cd.conn, md.folder))
        else if p = 'can archive' then canArchive(md.folder)
        else if p = 'can archive item' then canArchive(md.f)
        else if p = 'url' then getUri()
        else if p = 'external address' then
           begin if not getExternalAddress(result) then result:='' end

        else if p = 'stop spiders' then trueIf(mainFrm.stopSpidersChk.checked)
        else if p = 'is new' then trueIf(md.f.isNew())
        else if p = 'can access' then trueIf(md.f.accessFor(md.cd.conn))
        else if p = 'agent' then result:=md.cd.agent
        else if p = 'accounts' then
          result:=join(';', getAccountList(
            stringExists(par(1),['','users']),
            stringExists(par(1),['','groups'])
          ))
        ;
      except unsatisfied() end;


macro
{.get|external address.} can return the current internet address if is valid else nothing.
« Last Edit: January 21, 2010, 09:06:46 PM by Mars »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2068
    • View Profile
Quote
macro
{.get|external address.} can return the current internet address if is valid else nothing.

using the macro inside the template take a lot of time.

to reduce it you can do this

events

[+start]
{.set|#external-address|{.get|external address.}.}

[every 10 minutes]
{.set|#external-address|{.get|external address.}.}



then you insert this macro in your template

{.^#external-address.}

thanks to silentpliz to his report of this inconvenient. ;)




Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
mine has not this problem, but it's not updated over time. maybe it's not good. :-\

begin
if externalIP = '' then getExternalAddress(externalIP);
result:=externalIP;
end