From 2b56a5707b848a16069543bc7144ff09cad5a534 Mon Sep 17 00:00:00 2001 From: Anubhav Rawal Date: Fri, 16 Jan 2026 21:11:22 +0000 Subject: [PATCH] Update documentation on supported ports --- DESIGN.md | 5 ++--- README.md | 7 ++----- src/tunnel_notification_parser.c | 9 --------- test/unit/test_service_name_validation.c | 18 +++++++++--------- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 7f9a48f..0d4498d 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -141,9 +141,8 @@ Key settings: ## Supported Services -See README.md for complete service list. Common services: - -- SSH (22), HTTP (80), HTTPS (443), RDP (3389), VNC (5900) +With support of localproxy application can support a wide range of protocol but +for the first release only SSH (22) and VNC (5900) will be supported. ## Build & Test diff --git a/README.md b/README.md index 168d47c..21c7335 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ A Greengrass component that enables secure tunneling to IoT devices using AWS IoT Device Management Secure Tunneling service. This component listens for tunnel notifications and automatically establishes -secure tunnels using the localproxy client, supporting services like SSH, HTTP, -HTTPS, RDP, and VNC. +secure tunnels using the localproxy client, supporting services like SSH and +VNC. ## Quick Start @@ -42,9 +42,6 @@ Tunnel timeout duration in seconds. | Service | Port | | ------- | ---- | | SSH | 22 | -| HTTP | 80 | -| HTTPS | 443 | -| RDP | 3389 | | VNC | 5900 | ## Resource Usage diff --git a/src/tunnel_notification_parser.c b/src/tunnel_notification_parser.c index 0b87758..ad276e1 100644 --- a/src/tunnel_notification_parser.c +++ b/src/tunnel_notification_parser.c @@ -11,15 +11,6 @@ static uint16_t get_port_from_service(GgBuffer service) { if (gg_buffer_eq(service, GG_STR("SSH"))) { return 22; } - if (gg_buffer_eq(service, GG_STR("HTTP"))) { - return 80; - } - if (gg_buffer_eq(service, GG_STR("HTTPS"))) { - return 443; - } - if (gg_buffer_eq(service, GG_STR("RDP"))) { - return 3389; - } if (gg_buffer_eq(service, GG_STR("VNC"))) { return 5900; } diff --git a/test/unit/test_service_name_validation.c b/test/unit/test_service_name_validation.c index a7e6b55..9c44743 100644 --- a/test/unit/test_service_name_validation.c +++ b/test/unit/test_service_name_validation.c @@ -65,27 +65,27 @@ static void test_ssh_service_accepted(void) { ); } -static void test_http_service_accepted(void) { +static void test_http_service_rejected(void) { uint8_t arena_mem[1024]; GgMap notification = create_notification(arena_mem, "HTTP"); TEST_ASSERT_EQUAL( - GG_ERR_OK, handle_tunnel_notification(notification, &config) + GG_ERR_INVALID, handle_tunnel_notification(notification, &config) ); } -static void test_https_service_accepted(void) { +static void test_https_service_rejected(void) { uint8_t arena_mem[1024]; GgMap notification = create_notification(arena_mem, "HTTPS"); TEST_ASSERT_EQUAL( - GG_ERR_OK, handle_tunnel_notification(notification, &config) + GG_ERR_INVALID, handle_tunnel_notification(notification, &config) ); } -static void test_rdp_service_accepted(void) { +static void test_rdp_service_rejected(void) { uint8_t arena_mem[1024]; GgMap notification = create_notification(arena_mem, "RDP"); TEST_ASSERT_EQUAL( - GG_ERR_OK, handle_tunnel_notification(notification, &config) + GG_ERR_INVALID, handle_tunnel_notification(notification, &config) ); } @@ -116,9 +116,9 @@ static void test_empty_service_rejected(void) { int main(void) { UNITY_BEGIN(); RUN_TEST(test_ssh_service_accepted); - RUN_TEST(test_http_service_accepted); - RUN_TEST(test_https_service_accepted); - RUN_TEST(test_rdp_service_accepted); + RUN_TEST(test_http_service_rejected); + RUN_TEST(test_https_service_rejected); + RUN_TEST(test_rdp_service_rejected); RUN_TEST(test_vnc_service_accepted); RUN_TEST(test_random_service_rejected); RUN_TEST(test_empty_service_rejected);