aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
74 stars 71 forks source link

Resolved TCP bind retry issue in source mode and supplemented Dockerfile #26

Closed matthewpaul closed 4 years ago

matthewpaul commented 4 years ago

Description of changes: The changes included in this PR address an issue originally reported by @DavidOgunsAWS . When running the local proxy in source mode against a port that is unavailable, the local proxy will attempt to bind to the port an infinite number of times. While this behavior may make sense in destination mode since we're hopeful that we may be able to bind to the remote service, it just doesn't make sense in source mode. This fix resolves the issue and only makes the default (currently 5) attempts to bind to the specified port when in source mode.

I've also included some updates to the README and some extra lines for the Dockerfile that may assist future developers in using Docker to build the local proxy and leverage the docker build system when making changes to the local proxy source files.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.