Skip to content

hansgschossmann/iot-edge-opc-proxy-api-csharp

 
 

Repository files navigation

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Build Status

Azure IoT Edge OPC Proxy API

Using the Azure IoT Edge OPC Reverse Proxy API, client applications can connect to devices in a local gateway network and exchange transparent payloads, allowing developers to implement applications in Azure where the command and control protocol layer resides in the cloud. 

The OPC proxy edge module itself can be found at https://github.com/Azure/iot-edge-opc-proxy.

Getting started

Before you run any of the included samples, you must obtain a service manage connection string for your IoT Hub. You can use the iothubowner connection string (going forward referred to as <*iothubownerconnectionstring>) which can easily be found on the Azure portal in the "Shared Access Policies" section of the IoT hub settings blade. For more information checkout out the documentation here.

You also need to start the proxy gateway itself. You can run it using docker (docker run -h myproxy -it microsoft/iot-edge-opc-proxy -c "<*iothubownerconnectionstring>") or by following the instructions at https://github.com/Azure/iot-edge-opc-proxy.

Samples

For simplicity, all samples read the <*iothubownerconnectionstring> from the _HUB_CS environment variable. If you do not set this variable on your machine the included samples will not work! However, make sure you safeguard the connection string properly on your development machine and do not develop against a production IoT Hub.

The following samples are included to demonstrate the use of the .net API:

  • An OPC UA client that shows how the OPC-Foundation reference stack can be used to relay OPC UA from the cloud to machines in a local gateway network.

  • PNetCat - A Netcat like proxy client that you can use to interact with an arbitrary host and port in the proxy network and for example tunnel SSH using the ssh proxy option. It supports port bridge server and stdin/stdout netcat mode.

  • A Simple TCP/IP services client that demonstrates different socket API calls.

  • A Browser client that uses the remote browsing capabilities of the proxy. Use it to enumerate services and resolve host names across all proxies.

  • A simple Reverse HTTP Web Proxy that shows how you can access a web server in the proxy network through a reverse Web proxy Server implemented using ASP.Net Core and Kestrel.

Support and Contributions

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

If you are having issues compiling or using the code in this project please feel free to log an issue in the issues section of this project.

For other issues, such as Connectivity issues or problems with the portal, or issues using the Azure IoT Hub service the Microsoft Customer Support team will try and help out on a best effort basis. To engage Microsoft support, you can create a support ticket directly from the Azure portal.

License

The Azure IoT OPC Proxy module is licensed under the MIT License.

Visit http://azure.com/iotdev to learn more about developing applications for Azure IoT.

About

iot edge reverse proxy c# API and samples

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%