- Install visual studio 2017 ( Select Desktop development with c++ while installing ).
- Install Cmake 3.16+ from https://www.cmake.org/download.
- Install Strawberry Perl 5.30+ using link https://www.perl.org/get.html.
- Install git using link https://git-scm.com/download/win
- Install NASM using link https://www.nasm.us/
- Install the following dependencies (Choose visual studio command prompt based on architecture):
- Download and install zlib:
- Use Visual Studio native tool command prompt in admin mode.
git clone -b v1.2.13 https://github.com/madler/zlib.gitcd zlibmkdir buildcd buildcmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../nmakenmake install(installs zlib inside C:\Program Files (x86)\ )- Update PATH environment variable to add the dll for zlib which is inside C:\Program Files (x86)\zlib\bin
- Download and install openssl
- Use Visual Studio native tool command prompt in admin mode.
git clone https://github.com/openssl/openssl.gitcd opensslgit checkout OpenSSL_1_1_1-stableperl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }(Choose one of the options based on your architecture, usually WIN64A if you are on the x86_64 platform).nmakenmake install(installs OpenSSL inside C:\Program Files)- Update PATH environment variable to add the dll for openssl which is inside C:\Program Files\OpenSSL\bin
- Note: In some x86_64 windows configurations, compiling for a 64 bit target may fail. You may instead install openssl through Chocolatey.
- Download and install catch2
- Use Visual Studio native tool command prompt in admin mode.
git clone --branch v3.7.0 https://github.com/catchorg/Catch2.gitcd Catch2mkdir buildcd buildcmake -DBUILD_TESTING=OFF -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../( Install python if you want to execute test )nmakenmake install( install catch2 inside C:\Program Files (x86)\ )
- Download and install protobuf
- Download from https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz
- Extract protobuf-all-3.17.3.tar.gz
- Use Visual Studio native tool command prompt
cd path/to/protobuf-3.17.3cd cmakemkdir buildcd buildcmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ../nmakenmake install( install protobuf inside C:\Program Files (x86)\ )
- Download and install boost
- Download from https://archives.boost.io/release/1.87.0/source/boost_1_87_0.zip
- Extract boost_1_87_0.zip
- Use Visual Studio native tool command prompt
cd path/to/boost_1_87_0bootstrap.bat.\b2 toolset=msvc address-model={32 | 64} install define=BOOST_WINAPI_VERSION_WIN10( installs boost inside C:)- Replace
BOOST_WINAPI_VERSION_WIN10with the appropriate macro from here
- Replace
- Download and build aws-iot-securetunneling-localproxy
- Use Visual Studio native tool command prompt in admin mode
git clone https://github.com/aws-samples/aws-iot-securetunneling-localproxy.gitcd aws-iot-securetunneling-localproxymkdir buildcd build- Build the cmake project. Replace <_WIN32_WINNT> with the appropriate value based on your OS from here
- For visual studio 2019
cmake -DWIN32_WINNT=<_WIN32_WINNT> -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 16 2019" -A x64 ..\- for visual studio 2017
cmake -DWIN32_WINNT=<_WIN32_WINNT> -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 15 2017 <Win64/Win32>" ..\ msbuild localproxy.vcxproj -p:Configuration=Release( builds localproxy.exe inside bin\Release folder )
- Follow instructions under heading
Security Considerationsto run local proxy on a window OS.
- Download and install zlib: