Determine proxy type in Delphi XE7 - delphi

I am currently working on an application which have to determine the type (CONNECT, Socks4, Socks5 etc.) of one or more given proxies and connect through them.
Unfortunately I have no approach to reach my goals and hope somebody can help me.
I saw in a tool (GSA SEO Indexer) that this bahvior is somehow possible. The tool has a built-in proxy finder and checker which is able to determine the proxy type:
I am using Delphi XE7 w/ Indy.

There are proxy detection protocols available, such as WPAD. You can use that to obtain details about proxies on a WPAD-enabled network, and then you can connect to them as needed.

Related

Possible to create a zeroconf service with Delphi XE5?

Working on an appliance and would like to support zero configuration feature. That way users can look for the device on the network and simply double click an icon to access the web interface without having to configure it or know its ip address.
Tried to use UPNPLib_TLB but functions seem to be read-only; am I right? I can create a device using CoUPnPDevice.Create but can't set a FriendlyName or a URL.
Tried to use Deltics Bonjour service but it crashes on create (ACCESS_VIOLATION). The demo code uses a custom test unit which complicates experimentation.
After much research it does not look like there is a component available for this and would appreciate some pointers. Has anyone successfully created a zeroconf broadcast either via UPnP or Bonjour with Delphi XE2/5.. I can go back to Delphi 7 if required. Target = Windows 7.
NOTE: To be clear, I can find existing devices on the network and don't want to enumerate existing devices but what I want is to broadcast my service so that my box behaves like a network printer for example. The only service I need to expose is the URL so that users can access an embedded web server.
Appreciate the help!
EDIT
With the tips provided I did some research and getting this done the RAD way is not possible.
Using MS APIs directly is time consuming and requires a level of understanding of C that I don't have. Porting the Delphi 5/Indy 7 component to XE2/5 will require a good amount of work and debugging.
I discovered UPnP developer tools from Intel now open source here: Developer Tools for UPnP. This tools makes it really simply to create a server in 10-15 lines of code. Intel provides a DLL that I can call from VS Express as follows and it works great:
device = UPnPDevice.CreateRootDevice();
device.FriendlyName = 'My name';
device.PresentationURL = 'URLToEmbeddedServer";
..
I tried to use headconv7 tool to convert the .h file Intel's UPNP.DLL to a pascal file and call the external functions within the DLL directly from Delphi but there were too many problems with the conversion.
It's too bad because the Intel library makes it really simple to create UPnP stacks and the approach would apply itself very well to a component but for now its quicker to use .NET and VS Express to get the job done.
When using UPNPLib_TLB, you are not supposed to create a UPnPDevice object directly. UPnpDevice describes a known device on the network, which is why its properties are read-only.
Read the documentation:
Control Point API
Finding Devices
You are supposed to create an instance of the UPnPDeviceFinder class instead. Its search methods will give you a UPnDevice object for each device that is found.

How to detect Network driver removed programmatically In delphi 7?

I was looking for some Windows API that will give me notification for any change in the Local Area Connection Properties.I tried Searching for the Entry in the Registry which it modifies after we check or uncheck the driver name but could find it.
I have also attached an image if any one has any confusion in understanding my question.
Any guidance would be appreciated.
What you need is the Windows API for Network Awareness. It would be great if Delphi example implementations were readily available but they are not. The API's are all COM interfaces and you will have to find out how to use these within Delphi yourself. That is another question. However, for the INetworkConnection, this may get you started.

Reading Network Traffic

I want to intercept all network traffic coming and going from a specific application on a Windows XP. How do I get started doing this?
The goal would be to reverse engineer the API used between the local software and the remote software and implement the same API in my own software package.
I can program in anything, Java is the easiest however.
Just use Wireshark, no need of programming anything.

Delphi - loging all HTTP request

I need loging all HTTP request (from any application).
I have Delphi 7.0.
Anybody know how do that?
I looked into whether the Indy components could do this but found an old newsgroup response from Remy Lebeau that said:
If...you want to look at the traffic
that other applications are
generating, then no, you cannot use
Indy for that. That is outside the
scope of what Indy is designed for.
You would have to write your own NDIS
driver for that kind of capturing. Or
use a third-party sniffer API, such as
WinPCap.
What about WireShark?
There is also a product called Fiddler. I have found this extremely useful to track down exactly what the Indy components are sending/receiving. The one drawback is you have to utilize a proxy. This isn't a problem with Indy components and browsers such as Firefox. But if you need to capture for all applications you would need to be able to set a proxy for those apps.
if you want to go deeper and want pure delphi thing, there is winsock logger program floating around, google might help you ( it hooks winsock apis though).
Do you have to write a Delphi app to do it? Could you use an application like ethereal?

Delphi & SmartCards

Does anyone have experience integrating SmartCard authentication in their Win32 apps? If so, are there any preferred libraries?
Try SecureBlackbox, A component that works fine for me, a second choice can be
Delphi PC/SC SmartCard Component 0.91.
try
Well I guess that you have an SmartCard reader ... if so (and if you don't have one I don't know how you are going to manage this) then it must have some interface, RS232, USB, TCP/IP ... any one will do.
Communication protocol usually is available at SmartCard reader manufacturer. Few lines, and you will have it working in Delphi.
You need to read the developer manual that comes with reader you're going to use. It might only use PC-SC (by MS) to communicate, if so you can use the component specified by RRUZ, however it doesn't work with D2009. Otherwise you'll need to use API provided by SDK.

Resources