Skip to content

Latest commit

 

History

History
73 lines (73 loc) · 4.71 KB

windows-localproxy-build.md

File metadata and controls

73 lines (73 loc) · 4.71 KB

Building local proxy in Windows

  • 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.git
      • cd zlib
      • mkdir build
      • cd build
      • cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../
      • nmake
      • nmake 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.git
      • cd openssl
      • git checkout OpenSSL_1_1_1-stable
      • perl 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).
      • nmake
      • nmake 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.git
      • cd Catch2
      • mkdir build
      • cd build
      • cmake -DBUILD_TESTING=OFF -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../ ( Install python if you want to execute test )
      • nmake
      • nmake install ( install catch2 inside C:\Program Files (x86)\ )
    • Download and install protobuf
    • Download and install boost
    • 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.git
      • cd aws-iot-securetunneling-localproxy
      • mkdir build
      • cd 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 Considerations to run local proxy on a window OS.