Jump to content

AllowedIPList


Sherzod

Recommended Posts

  • 4 months later...
HI All!

 

Do you think, this approach is correct?

 




procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
begin
  if RemoteAddress <> '111.111.111.111' then begin
    UniSession.Terminate(RemoteAddress + ' is not allowed...');
  end;
end;



 

Sincerely ...

Link to comment
Share on other sites

  • 1 month later...

 

HI All!
 
Do you think, this approach is correct?
 
procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
begin
  if RemoteAddress <> '111.111.111.111' then begin
    UniSession.Terminate(RemoteAddress + ' is not allowed...');
  end;
end;
 
Sincerely ...

 

nice info,

for dynamic IP maybe we can use inifiles

myini := TInifiles.Create('config.ini');

ip := myini.ReadString('general', 'validip', '');

myini.free;

 

but new feature request is possible

Link to comment
Share on other sites

×
×
  • Create New...