Coder Social home page Coder Social logo

Comments (15)

lwthiker avatar lwthiker commented on May 22, 2024 7

I'm working on a Makefile-based build that will compile curl-impersonate natively, without the Docker containers. Once this is up and working it'll be possible to add GitHub Action to automatically compile to MacOS and Linux and add the binaries to the releases

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024 2

Thanks for the suggestions.

I agree about libcurl, I believe many would find it useful. If we "bake in" all the settings directly it would result in many copies of libcurl, one for each browser version. If we support 10 Chrome versions then we'll have 10 different libcurls. Maybe a better solution would be to add a function to libcurl that configures everything the right way? But then LD_LIBRARY_PATH wouldn't work as you suggested.

I used GitHub Actions for small projects only; I don't know if it supports our heavy builds for free. Worth a try I guess. Would be good to have it to automatically check PRs, together with the new testing infra (#9).

About publishing, I'm not sure whether the binaries would be useful by themselves, as they are compiled for a specific Ubuntu/Debian and have external dependencies. Maybe publishing a .deb/.rpm package? I'm really not a packaging expert though.

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024 1

I see, so one possibility is to set all the command line parameters and headers in one of libcurl's initialization functions. It could depend on some env var so that we don't need different libcurl compilations for different browser versions (the cipher list, the user agents, etc. are changing every version). Then it might be possible to just replace libcurl for an existing application using LD_LIBRARY_PATH. Worth a try.

from curl-impersonate.

jlarmstrongiv avatar jlarmstrongiv commented on May 22, 2024 1

As far as I’m aware, there’s no limit on Github Actions for public repos, so it’d be worthwhile to use the use the CI to automatically build and release binaries.

The only limiting factor with GitHub actions that I have found is Dockerhub pull rate limiting, but I never bothered to setup sign-ins, though even that may not be necessary anymore.

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024 1

Binaries for Linux & macOS are now automatically built and distributed in the GitHub release page. You can find the latest binaries in release v0.4.1.

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024 1

libcurl-impersonate binaries are also added right now to the release page.

from curl-impersonate.

somini avatar somini commented on May 22, 2024

Maybe a better solution would be to add a function to libcurl that configures everything the right way?

Of course, this is the end game. This is really a stop-gap solution. My usecase is really other applications that link directly to libcurl. Even if libcurl includes these changes, it might not be immediate to update.

About publishing, I'm not sure whether the binaries would be useful by themselves, as they are compiled for a specific Ubuntu/Debian and have external dependencies.

Each distro has it's own package, so the dependencies would be installed automatically. Compiling the curl binaries would still be useful, since most dependencies are statically compiled.
The missing dependencies can be solved by installing the distro curl.

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024

@somini You can check out #13, it's still WIP but it's in a good shape. I'm curious to know whether it works for you.

from curl-impersonate.

somini avatar somini commented on May 22, 2024

Sorry for disappearing, this notification got lost in a sea of other notifications, I only had time to get back to this now.
I'm still very much interested.

#13 sounds perfect, I'm still working on building this and test it with a proper application (RSS Bridge, in this case).
I'm trying to build the AUR package and hit a snag: https://aur.archlinux.org/packages/curl-impersonate-firefox#comment-859457

from curl-impersonate.

somini avatar somini commented on May 22, 2024

Finally got to test this and it very much works as intended, thanks. The AUR packages can be built without errors.

Any progress on getting something like this upstreamed on cURL? I think NSS is being dropped from curl, so once that hits, impersonating firefox is out of the question.

from curl-impersonate.

jlarmstrongiv avatar jlarmstrongiv commented on May 22, 2024

GitHub Actions can also build on different platforms, e.g. MacOS and Windows, which would help solve issues like #24

from curl-impersonate.

izzues avatar izzues commented on May 22, 2024

Sorry for the dumb question, but am I missing something or is libcurl not being automatically built despite this issue being closed?

from curl-impersonate.

lwthiker avatar lwthiker commented on May 22, 2024

You are right, only the static binary is currently being built automatically. Do you need a pre-built libcurl in addition?

from curl-impersonate.

momala454 avatar momala454 commented on May 22, 2024

personally I do for ease of updating

from curl-impersonate.

izzues avatar izzues commented on May 22, 2024

You are right, only the static binary is currently being built automatically. Do you need a pre-built libcurl in addition?

It would be very useful, yes! It's also in the title and description of this issue, hence why I assumed it would have been done.

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.