Jump to content

Angus Robertson

Members
  • Content Count

    1702
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by Angus Robertson


  1. Unfortunately the developer that added SocketFamily and IPv6 never documented it's intended external use.  I've been adding SocketFamily into more components and samples recently now I have IPv6 on all my local and hosted servers, firewall support for IPv6 is in it's infancy and stopped IPv6 working for a long time. 

     

    I've been finding DNS lookups may offer an IPv6 address which then fails to connect for various reasons, so you need the ensure SocketFamily is set to sfIPv4 to the alternate IPv4 is used instead.   But that is all done automatically, so not sure that family checking is necessary for proxies, if it's done later anyway.

     

    Angus

     


  2. While it always good for people to test SVN trunk, it is a work in progress and not designed for production use, at least unless there have been no changes for several weeks and it's been released properly released.  Having said that, I try to built all my live applications before uploading anything to SVN, and build all packages and a few samples with Delphi 2007 and the latest version. 

     

    A bad web server did slip out a couple of weeks ago that I forget to put on my own hosted servers and once I did an SSL certificate issue became apparent, but that is very rare.  But that panic update was the cause of your TriggerSslAlpnSelect issue, and I'm still messing with it today.  It will be sorted real soon, but may not reach SVN for a few days. 

     

    Stuff like USE_SSL and packages for all compilers only gets tested before a final release.

     

    Angus


  3. Testing without USE_SSL is very low priority, most improvements to ICS involve SSL so you may as well use an old version. 

     

    Improvements are always made so that USE_SSL is still honoured, nut new units are skipped completely since all new development assumes SSL is used. 

     

    But I will do a quick test of V8.62 before it is released, however too many errors may mean that and future versions become SSL only, I'm not spending time to make it 100% backward compatible.  

     

    Angus

     


  4. Accessing Delphi objects from C# is very unusual, was not aware it could be done.  It's certainly not something we can support here.  You would presumably need c# headers as well, or whatever than language uses.

     

    Creating DLLs using ICS is common, there are examples in samples, but they export complete functions, not the components themselves and always use a thread with a message handler.

     

    Angus

     


  5. Do you mean the exports are not in the DLL, you can use a DLL exports viewer to check that. the Windows Kit has one, lots of others around.  For a DLL, you need a library dpr with an exports section, which I assume you created yourself.   It may need updating with changes over many years.  Or perhaps you are only exporting functions you wrote, and not the entire library?  What version of ICS were you using before, in OverbyteIcsWSocket.pas?

     

    Angus

     


  6. Pleased you got it working.  Session caching is poorly documented in ICS, all written by a previous developer and I don't really understand it. 

     

    But the new high level components I've added in the last couple of years like TIcsFtpMulti, TSslHttpRest and IcsHosts for servers, handle most the SSL implementation like SSL context and session caching, so the application does not need to worry about it, and that's why TIcsFtpMulti worked.

     

    Angus

     

     

     


  7. There is a Websockets project at https://github.com/fajar-khairil/ics-websockets by Stan Korotky, dating back to 2012, but it is not SSL enabled.  From the demo server comments:

     

    Basic websockets server based on TWSocketServer and TWSocketClient components, and websockets implementation ported from phpws project (http://code.google.com/p/phpws/). Derived from TCP server demo V7.02, by François PIETTE.

     

    Been meaning to incorporate it into ICS for a while, never had the time or a suitable project to test it with.

     

    Angus

     

     


  8. TStringlist has DelimitedText and CommaText properties that works for many CSV files, free and one line of code.  However it treats spaces as a delimiter, so I use a minor variant that also always writes delimiters.

     

    Angus


  9. Does seem strange the code eats errors on OnDataAvailable silently while some other events do raise an exception.

     

    I've updated my version to trigger a background exception, but this change is not absolutely backward compatible, applications that don't have OnBgException assigned will now shut down with an exception window, rather than perhaps continuing to ignore the error, maybe good, maybe bad.  This won't go into SVN for a few days, until I've rebuilt and tested all my applications.

     

    Angus

     


  10. If multicast needs to listen on multiple UDP ports and/or addresses, just create an array of TWSocket components with different IP addresses/ports for each, sharing the same event handlers.  For TCP we already have TMultiListenWSocketServer which is the same as TWSocketServer so web servers listen on lots of ports and IPv4 and IPv6 at the same time.

     

    Angus


  11. I just use a simple batch file:

     

    cd C:\Program Files (x86)\Windows Kits\10\bin\x86
    signtool sign /p "password" /f "c:\certificates\magenta-systems-certkey.pfx"  /d "WebApp Server - Telecom" /fd sha1 /t http://timestamp.verisign.com/scripts/timstamp.dll "d:\webapps\webapp_telecom.exe"
    signtool sign /p "password" /f "c:\certificates\magenta-systems-certkey.pfx"  /d "WebApp Server - Telecom" /as /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp "d:\webapps\webapp_telecom.exe"
    signtool verify /all /pa d:\webapps\webapp_telecom.exe
     

    This assumes you can buy a code signing certificate as a file, some authorities only sell them on dongles when you need a slightly different command line and you may find Windows demands a password each time you sign a file, so not very automated.

     

    EV certificates are only needed for kernel drivers. If you start your order at

     

    https://msdn.microsoft.com/windows/hardware/drivers/dashboard/get-a-code-signing-certificate

     

    you will find most authorities offer substantially cheaper prices than their web sites, Digicert sells EV for $104 a year, non-EV for $74.  

     

    Angus
     

     


  12. Sorry can not really help any further, I think my last UDP project was just broadcasting not multicasting. 

     

    I would test keeping things simple, ignore multicast completely, just a simple UDP listener and see what happens.  Your can use the OverbyteIcsIpStmLogTst sample to send normal UDP packets to make sure your server is receiving something, then look into why multicast is not working.

     

    Angus


  13. TWSocketServer is only for TCP, not UDP which does not have a concept of clients or connections.  Change it to TWSocket. 

     

    Not used multi casting for many years, but suspect that MultiCastAddrStr is for sending stuff, not receiving it. 

     

    V8.60 added a new component TIcsIpStrmLog with a sample OverbyteIcsIpStmLogTst.dpr which has a logprotUdpServer mode that allows you to create a server with little code handling receiving data for you.

     

    Angus


  14. 5 hours ago, Kenny Phong said:

    I change THttpCli to TSslHttpRest and on event OnHttpRestProg write Msg to log file.

    Below is what i get:

     

    26/06/2019 09:20:25.378: 
    Request completed: 200 OK

     

    You also need to set the DebugLevel property to the level of logging required from THttpDebugLevel, DebugHdr in this case to get all the headers.  Most applications don'r need a high level of logging.

     

    Angus

×