Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
SUMMARY = "AWS Iot Secure Tunneling local proxy reference C++ implementation"
DESCRIPTION = "When devices are deployed behind restricted firewalls at remote sites, you need a way to gain access to those device for troubleshooting, configuration updates, and other operational tasks. Secure tunneling helps customers establish bidirectional communication to remote devices over a secure connection that is managed by AWS IoT. Secure tunneling does not require updates to your existing inbound firewall rule, so you can keep the same security level provided by firewall rules at a remote site. "
HOMEPAGE = "https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

DEPENDS += "\
boost \
catch2 \
openssl \
protobuf \
protobuf-native \
zlib \
"

BRANCH ?= "main"

# nooelint: oelint.file.patchsignedoff
SRC_URI = "\
git://git@github.com/aws-samples/aws-iot-securetunneling-localproxy.git;branch=${BRANCH};protocol=https \
file://boost-support-any.patch \
file://gcc13.patch \
file://run-ptest \
"
SRCREV = "b6c31b442fa6d4c930e705d2853efd73dadff169"

UPSTREAM_CHECK_COMMITS = "1"

S = "${WORKDIR}/git"

inherit cmake ptest

do_configure:prepend() {
sed -i "s/Protobuf_LITE_STATIC_LIBRARY/Protobuf_LITE_LIBRARY/g" ${S}/CMakeLists.txt
sed -i "s/string.*Protobuf_LITE_LIBRARY.*/#&/g" ${S}/CMakeLists.txt
sed -i "s/set_property.*PROTOBUF_USE_STATIC_LIBS.*/#&/g" ${S}/CMakeLists.txt
}

do_install () {
install -d ${D}${bindir}
install -m 0755 ${B}/bin/localproxy ${D}${bindir}/localproxy
}

FILES:${PN} += "${bindir}/localproxy"
FILES:${PN}-ptest += "${bindir}/localproxytest"

do_install_ptest() {
install -d ${D}${bindir}
install -m 0755 ${B}/bin/localproxytest ${D}${bindir}/localproxytest
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From aa17740b66d7a33d9259719cb143c1b97327b202 Mon Sep 17 00:00:00 2001
From: Thomas Roos <throos@amazon.de>
Date: Fri, 10 Mar 2023 12:46:05 +0000
Subject: [PATCH] aws-iot-securetunneling-localproxy: support any boost version

---
CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 340e109..38f1af4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,8 +75,7 @@ endif(BUILD_TESTS)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_DEBUG_RUNTIME OFF)
#set_property(GLOBAL PROPERTY Boost_USE_MULTITHREADED ON)
-set(BOOST_PKG_VERSION "1.81.0" CACHE STRING "")
-find_package(Boost ${BOOST_PKG_VERSION} REQUIRED COMPONENTS system log log_setup thread program_options date_time filesystem chrono)
+find_package(Boost REQUIRED COMPONENTS system log log_setup thread program_options date_time filesystem chrono)
include_directories(${Boost_INCLUDE_DIRS})
foreach(BOOST_LIB ${Boost_LIBRARIES})
string(REPLACE ${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_SUFFIX} BOOST_STATIC_LIB ${BOOST_LIB})
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From f6ba73eaede61841534623cdb01b69d793124f4b Mon Sep 17 00:00:00 2001
From: tro <throos@amazon.de>
Date: Tue, 30 May 2023 12:02:24 +0200
Subject: [PATCH 1/2] Url.h: #include <cstdint>

Upstream-Status: Pending -> https://github.com/aws-samples/aws-iot-securetunneling-localproxy/pull/136

fix GCC 13 issue "'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? "
---
src/Url.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/Url.h b/src/Url.h
index 81fc932..fa084d3 100644
--- a/src/Url.h
+++ b/src/Url.h
@@ -3,6 +3,7 @@
#pragma once

#include <string>
+#include <cstdint>
namespace aws {
namespace iot {
namespace securedtunneling {
--
2.34.1


From de8779630d14e4f4969c9b171d826acfa847822b Mon Sep 17 00:00:00 2001
From: tro <throos@amazon.de>
Date: Tue, 30 May 2023 12:10:36 +0200
Subject: [PATCH 2/2] ProxySettings.h: add #include <cstdint>

Upstream-Status: Pending -> https://github.com/aws-samples/aws-iot-securetunneling-localproxy/pull/136

---
src/ProxySettings.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/ProxySettings.h b/src/ProxySettings.h
index 9dc4e10..de3098a 100644
--- a/src/ProxySettings.h
+++ b/src/ProxySettings.h
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once

+#include <cstdint>
#include <boost/property_tree/ptree.hpp>
namespace aws { namespace iot { namespace securedtunneling { namespace settings {
using boost::property_tree::ptree;
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

localproxytest -s [config] | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| sed -n '/PASS/{s|^|PASS: |};p' | sed -n '/FAIL/{s|^|FAIL: |};p' | sed -n '/SKIP/{s|^|SKIP: |};p'