Coder Social home page Coder Social logo

Windows binary! about curl-impersonate HOT 8 CLOSED

depler avatar depler commented on May 22, 2024
Windows binary!

from curl-impersonate.

Comments (8)

depler avatar depler commented on May 22, 2024 19

@squromiv @lwthiker @yuzd @qwerty12 @avently @somini I've done this: https://github.com/depler/curl-impersonate-win. Precompiled binaries is attached in releases. Feel free to use, ask questions and integrate into current project.

from curl-impersonate.

depler avatar depler commented on May 22, 2024 5

@qwerty12 I've updated build pipeline and binaries - it is now only ~5mb single executable. BoringSSL used -ggdb switch, which lead to huge binaries.

from curl-impersonate.

squromiv avatar squromiv commented on May 22, 2024

Check #37

from curl-impersonate.

depler avatar depler commented on May 22, 2024

Curl compilation with all dependencies is not-so-easy. This is exactly why I am asking for ready binaries.

from curl-impersonate.

qwerty12 avatar qwerty12 commented on May 22, 2024

Oh, that's nice work, depler. Thanks.

I built the Chrome version for a project a week ago (shared build, however; WinIDN instead of libidn and no zstd support - I don't think Chrome currently requests zstd-encoded pages, so may as well save space), but given one of my steps was rm -rf /mingw64/include/openssl/ /mingw64/lib/libcrypto.dll.a /mingw64/lib/libcrypto.a /mingw64/lib/libssl.dll.a /mingw64/lib/libssl.a /mingw64/lib/pkgconfig/libcrypto.pc /mingw64/lib/pkgconfig/libssl.pc /mingw64/lib/pkgconfig/openssl.pc, it was probably best to wait for something better to come along...

from curl-impersonate.

depler avatar depler commented on May 22, 2024

@qwerty12 why do you need to remove preinstalled openssl? When building with MSYS2, BoringSSL path is set explicitly - so it will use only source code within project folder.

As for size saving - the main "space consumer" is BoringSSL itself (it takes about ~20mb of binary size), so other libs is just to make curl more functional as generic network tool.

from curl-impersonate.

qwerty12 avatar qwerty12 commented on May 22, 2024

why do you need to remove preinstalled openssl

I'm using curl-impersonate's build system. Despite it passing --with-openssl=$(boringssl_install_dir) and setting -I$(boringssl_install_dir) as a CFLAG, cURL was still trying to use the OpenSSL headers from /mingw64/include. I don't know if it was a pkg-config thing, but honestly, I wasn't interested in finding out. I wasn't worried about doing the right thing, I just wanted to do the quickest thing to get it built so I could move onto the more important part for me: actually using curl-impersonate-chrome.

As for size saving - the main "space consumer" is BoringSSL itself (it takes about ~20mb of binary size), so other libs is just to make curl more functional as generic network tool.

I think that's one of the reasons I prefer a stripped shared build, at 4.4 MB:

-rwxr-xr-x 1 fp None 597K Aug 21 03:07 curl-impersonate-chrome.exe
-rwxr-xr-x 1 fp None 141K Aug 21 03:08 libbrotlicommon.dll
-rwxr-xr-x 1 fp None  51K Aug 21 03:08 libbrotlidec.dll
-rwxr-xr-x 1 fp None 1.7M Aug 21 03:08 libcrypto.dll
-rwxr-xr-x 1 fp None 1.1M Aug 21 03:07 libcurl-impersonate-chrome-4.dll
-rwxr-xr-x 1 fp None 106K Aug 21 03:08 libgcc_s_seh-1.dll
-rwxr-xr-x 1 fp None 186K Aug 21 03:08 libnghttp2-14.dll
-rwxr-xr-x 1 fp None 383K Aug 21 03:08 libssl.dll
-rwxr-xr-x 1 fp None  57K Aug 21 03:08 libwinpthread-1.dll
-rwxr-xr-x 1 fp None 117K Aug 21 03:08 zlib1.dll

(Though my way of finding out the DLLs needed is part Dependency Walker and part guesswork, so I'm not the best advocate for a shared Windows build.)

from curl-impersonate.

depler avatar depler commented on May 22, 2024

Hmm, libcrtpto.dll and libssl.dll are only about 2mb (comparing to 20mb in my build). I will take a look why this happened, probably some debug information inside.

from curl-impersonate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.