Supporting custom URL protocol on Mac/Linux - cross-platform

This article discusses how to register an application for a custom protocol on Windows but [how] can the same be achieved on Mac & Linux? And is this always an OS-level task or does it have to be registered per-browser?

Related

Is there a .net implementation for openthread

I have been working to connect to a device to a dongle using OpenThread.
I am looking for a .Net Implementation of Openthread.
There is a Zigbee implementaion for .net called ZigbeeNet.
Looking at ZigbeeNet it appears to be a library to interface with Zigbee device over a COM port, so I'm assuming you're also targeting .Net on Windows. The equivalent would be a Network Co-Processor host implementation in OpenThread terminology and unfortunately there isn't a direct .Net implementation. Microsoft implemented a Windows 10 NCP driver which would have been a good starting point, but unfortunately they've dropped support. It still may work but YMMV.
It is possible to run the UNIX host wpantund in a VirtualBox VM and run your .Net application in the guest.

Standard mDNS service on Windows

Does Windows (some modern flavour) have an mDNS server installed and/or running by default? If so then how does one tell it, preferably dynamically, to start/stop advertising a new service?
If there is no standard then how does one deal with the problem of conflicts trying to run multiple mDNS servers in that environment?
Basically, I want to implement a service that will run on Linux, Windows and Mac OS X and which needs to advertise its zeroconf webserver location using mDNS. On Linux I just use avahi-publish (or install a config file). I'm guessing that the answer will be straightforward for OS X. I'm struggling to find information for Windows.
Starting with Windows 10, Microsoft made strides towards a native Windows implementation of mDNS and DNS-SD.
While earlier iterations have been limited to UWP apps, a general Win32 API has been exposed from at least SDK version 10.0.18362.0 (1903/19H1, May 2019).
Note: This implementation is currently confirmed working only for 64bit build targets, there is an open issue preventing compilation for 32bit targets.
Outdated note from a previous version of this answer:
Early iterations resulted in mDNS network flooding:
Windows 10, in its default configuration, will spam its local networks
by responding to all mDNS requests with null response packets.
This issue was fixed in Windows 10 1511 (10586) and above
Last time I needed one, Apple's Bonjour Print Services for Windows was the most convenient mDNS client for Windows I could find. Only 5MB.
No, Microsoft doesn't directly support Multicast-DNS.
However, there appear to be several 3rd-party alternatives:
http://bens.me.uk/2013/multicast-dns-and-development-virtual-machines
http://en.wikipedia.org/wiki/Bonjour_%28software%29
http://www.icir.org/gregor/tools/autoconf-protocols.html
http://www.zeroconf.org/
... and ...
http://blogs.technet.com/b/networking/archive/2008/04/01/how-to-benefit-from-link-local-multicast-name-resolution.aspx
Have also successfully used C++/WinRT for dnssd discovery directly from C++ now. It appears from our perspective to be quicker and more reliable to query services and will let you easily install a watcher to get notifications when devices arrive etc. Of course, this is limited to versions of Windows 10 with support for C++/WinRT, which starts with 10.0.17134.0 (Windows 10, version 1803).
One caveat: We've noticed that it does not provide, nor recognise, a FQDN (trailing dot). So for a device that Bonjour OR Avahi would give an address of mydevice.local., Windows instead gives mydevice.local. Attempting to ping mydevice.local. under Windows 10 (1809) fails.
Windows 10 supports natively mDNS/Zeroconf, but only for modern APIs, not for Win32 applications.
If you have such an application, a third party service is required.
Source: https://social.technet.microsoft.com/Forums/en-US/8a0346de-2296-4f46-bc36-ff3fb13e283b/builtin-mdnsdnssd-zeroconf-support-in-windows-10
The short answer is to support both Avahi and Bonjour. You'll need Bonjour support to run on OSX anyway, and if a Windows user has installed iTunes they'll already be running it.
As a fallback for Windows users not running iTunes, you can compile Avahi as a library for Windows (with a bit of effort) and bundle it. This is a non-trivial bit of packaging, but the alternative is requiring your Windows users to install iTunes in order to use your application.

How to implement a SSL server on Windows CE

I need to implement a server running on Windows CE 5.0 that shall communicate on a secure connection. To implement a secure connection SSL looks like a good choice.
The Windows CE 5.0 Winsock implementation allows to implement all the SLL stuff using the Winsock Secure Sockets. But the problem is that the referred site states:
SSL does not support the following Winsock functionality ... "Calls to the accept function".
How can I implement a SSL secured server when accept will not work? What other options do I have to implement a secure connection to a Windows CE 5.0 device?
Edit: My current application implementation is in C++. So I would prefer an approach that use the Windows API or a C++ library.
We ported the Mentalis Secure Socket Library to the Compact Framework for when we needed SSL. It was fairly painless, though not without its bugs.
MatrixSSL supports Windows CE:
MatrixSSLâ„¢ is an embedded SSL and TLS implementation designed for
small footprint applications and devices. Available is a fully
supported, commercial version as well as an open source version that
is available for download. MatrixSSL allows secure management of
remote devices. Several secure embedded Web servers also use MatrixSSL
for their encryption layer.
MatrixSSL has been ported to operating systems including
FreeRTOS, Bare Metal, eCos, VxWorks, uClinux, eCos, FreeRTOS, ThreadX,
WindowsCE, PocketPC, Palm, pSOS, SMX, BREW, MacOS X, Linux and
Windows.

PPAPI Plugin and Chromium OS

I'm looking to use Chromium OS for a specific business application, but I need access to local serial and USB ports. My reading of the Chromium docs says NPAPI plugins are not supported in Chrome OS, only PPAPI (Pepper). I'm a bit confused about PPAPI, as all docs talk about this in the context of Native Client, which as it's a sandboxed environment, cannot access local resources.
So my basic question is: Is it possible to write a PPAPI browser plugin that will work like a regular NPAPI browser plugin to access local resources?
Currently, no. NPAPI plugins are on the way out, Native Client is a sandboxed environment, and Pepper's interfaces are designed to mirror those available elsewhere on the web platform (e.g. Javascript). So a good place to look for future interfaces would be draft web standards and HTML5/JS addons, e.g. for gamepads (https://wiki.mozilla.org/GamepadAPI) or cameras (http://developers.whatwg.org/video-conferencing-and-peer-to-peer-communication.html )

What is a socket library?

While reading about OpenSSL I've stumbled upon sentence: "It would be nice if security was as
simple as linking in a different socket library when building a program".
What is this mentioned socket library? What is it used for (i.e. in Java or C#)?
A socket is the endpoint of an Internet connection. A socket library is a library that implements sockets so that you can use them in your program for Internet communication.
What the text suggests is that it would be nice if you could replace your regular socket library (which would be for example a DLL on Windows) with a different version, which would automatically add SSL functionality for secure, encrypted connections - but adding SSL functionality is not as simple as that.
In Java or C#, you wouldn't use such a library directly. Java for example has classes in its standard API for working with Internet connections. You'd use that API in your Java program, and the JVM will use the socket library that the operating system provides to do the actual communication.