mirror of
https://github.com/depler/curl-impersonate-win.git
synced 2026-09-13 04:15:49 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d206f41149 | ||
|
|
5fb42508d6 | ||
|
|
27b516f7af | ||
|
|
ab2f2e900a |
@@ -6,9 +6,9 @@ Original idea and patches from https://github.com/lwthiker/curl-impersonate
|
||||
|
||||
# Version
|
||||
Current version based on:
|
||||
* Curl (https://github.com/curl/curl): v7.84.0
|
||||
* Curl (https://github.com/curl/curl): v8.1.1
|
||||
* BoringSSL (https://github.com/google/boringssl): 3a667d10e94186fd503966f5638e134fe9fb4080
|
||||
* curl-impersonate (https://github.com/lwthiker/curl-impersonate): v0.5.4
|
||||
* curl-impersonate (https://github.com/lwthiker/curl-impersonate): v0.6.0
|
||||
|
||||
# Environment
|
||||
MSYS2 is needed to build binaries. Steps:
|
||||
@@ -23,7 +23,7 @@ MSYS2 is needed to build binaries. Steps:
|
||||
|
||||
In case if everything goes fine you should see this:
|
||||
|
||||

|
||||

|
||||
|
||||
# Run
|
||||
Executables and scripts are located inside release archive. Scripts can impersonate different browser, for example:
|
||||
|
||||
@@ -1,46 +1,31 @@
|
||||
set MINGW64=c:\msys64\mingw64
|
||||
set GOROOT=%MINGW64%\lib\go
|
||||
set PATH=%MINGW64%\bin;%PATH%
|
||||
set ROOT=%~dp0
|
||||
|
||||
cd %ROOT%boringssl
|
||||
rmdir /s /q lib
|
||||
cmake.exe -G "Ninja" -S . -B lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc.exe
|
||||
ninja.exe -C lib crypto ssl
|
||||
move /y lib\crypto\libcrypto.a lib\libcrypto.a
|
||||
move /y lib\ssl\libssl.a lib\libssl.a
|
||||
|
||||
set IPV6=1
|
||||
|
||||
set ZLIB=1
|
||||
set ZLIB_PATH=zlib_stub
|
||||
|
||||
set ZSTD=1
|
||||
set ZSTD_PATH=zstd_stub
|
||||
|
||||
set BROTLI=1
|
||||
set BROTLI_PATH=brotli_stub
|
||||
set BROTLI_LIBS=-lbrotlidec -lbrotlicommon
|
||||
|
||||
set NGHTTP2=1
|
||||
set NGHTTP2_PATH=nghttp2_stub
|
||||
|
||||
set IDN2=1
|
||||
set LIBIDN2_PATH=idn2_stub
|
||||
|
||||
set SSL=1
|
||||
set OPENSSL_PATH=%ROOT%boringssl
|
||||
set OPENSSL_LIBPATH=%ROOT%boringssl\lib
|
||||
set OPENSSL_LIBS=-lssl -lcrypto
|
||||
|
||||
cd %ROOT%curl
|
||||
mingw32-make mingw32-clean -f Makefile.dist
|
||||
mingw32-make mingw32 -f Makefile.dist -j
|
||||
|
||||
mkdir bin
|
||||
move /y lib\*.dll bin
|
||||
move /y lib\*.a bin
|
||||
move /y src\*.exe bin
|
||||
bin\curl.exe -V
|
||||
|
||||
set MINGW64=c:\msys64\mingw64
|
||||
set GOROOT=%MINGW64%\lib\go
|
||||
set PATH=%MINGW64%\bin;%PATH%
|
||||
set ROOT=%~dp0
|
||||
|
||||
cd %ROOT%boringssl
|
||||
rmdir /s /q lib
|
||||
cmake.exe -G "Ninja" -S . -B lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc.exe
|
||||
ninja.exe -C lib crypto ssl
|
||||
move /y lib\crypto\libcrypto.a lib\libcrypto.a
|
||||
move /y lib\ssl\libssl.a lib\libssl.a
|
||||
|
||||
set CFG=-ipv6 -zlib -zstd -brotli -nghttp2 -idn2 -ssl
|
||||
|
||||
set OPENSSL_PATH=%ROOT%boringssl
|
||||
set OPENSSL_LIBPATH=%ROOT%boringssl\lib
|
||||
set OPENSSL_LIBS=-lssl -lcrypto
|
||||
|
||||
cd %ROOT%curl
|
||||
mingw32-make mingw32-clean -f Makefile.dist
|
||||
mingw32-make mingw32 -f Makefile.dist -j
|
||||
|
||||
rmdir bin /s /q
|
||||
mkdir bin
|
||||
|
||||
move /y lib\*.dll bin
|
||||
move /y lib\*.a bin
|
||||
move /y src\*.exe bin
|
||||
bin\curl.exe -V
|
||||
|
||||
pause
|
||||
+1
-1
Submodule curl_original updated: 45ac4d0194...1561d06752
+726
-463
File diff suppressed because it is too large
Load Diff
+11
-15
@@ -1,16 +1,12 @@
|
||||
set patch=c:\msys64\usr\bin\patch.exe
|
||||
set sed=c:\msys64\usr\bin\sed.exe
|
||||
|
||||
cd %~dp0curl
|
||||
|
||||
%patch% -p1 < %~dp0patch\curl-impersonate.patch
|
||||
%sed% -i 's/-shared/-s -static -shared/g' lib\Makefile.m32
|
||||
%sed% -i 's/-static/-s -static/g' src\Makefile.m32
|
||||
|
||||
%sed% -i 's/-DUSE_NGHTTP2/-DUSE_NGHTTP2 -DNGHTTP2_STATICLIB/g' lib\Makefile.m32
|
||||
%sed% -i 's/-DUSE_NGHTTP2/-DUSE_NGHTTP2 -DNGHTTP2_STATICLIB/g' src\Makefile.m32
|
||||
|
||||
%sed% -i 's/-lidn2/-lidn2 -lunistring -liconv/g' lib\Makefile.m32
|
||||
%sed% -i 's/-lidn2/-lidn2 -lunistring -liconv/g' src\Makefile.m32
|
||||
|
||||
set patch=c:\msys64\usr\bin\patch.exe
|
||||
set sed=c:\msys64\usr\bin\sed.exe
|
||||
|
||||
cd %~dp0curl
|
||||
|
||||
%patch% -p1 < %~dp0patch\curl-impersonate.patch
|
||||
|
||||
%sed% -i 's/-shared/-s -static -shared/g' lib\Makefile.mk
|
||||
%sed% -i 's/-DUSE_NGHTTP2/-DUSE_NGHTTP2 -DNGHTTP2_STATICLIB -DUSE_WEBSOCKETS/g' lib\Makefile.mk
|
||||
%sed% -i 's/-lidn2/-lidn2 -lunistring -liconv/g' lib\Makefile.mk
|
||||
|
||||
cd ..
|
||||
Reference in New Issue
Block a user