Comments (7)
Hi,
Thanks for this, and for the recent switch to an autotools-based system. I managed to build the Firefox variant of this (curl-impersonate-ff.exe and libcurl-impersonate-ff-4.dll) on 64-bit Windows 11 with MSYS 2. The way I did it has some problems, though:
-
not at all suited for automationsomewhat true currently -
for the life of me, I could not build NSS statically, so this relies on a bunch of DLLs in the same folder
- NSS being ancient doesn't help; I bet BoringSSL is more amenable to this.
-
relies on MSYS-provided libraries, and NSS to be built with its packaging
I wonder if it would be easier to build everything with MSVC/VS. I might try at some point, but I doubt I'll be successful. In any case, I hope this helps someone while waiting for something better to come along.
I've updated the instructions and placed them here: https://github.com/qwerty12/subliminal/wiki/Building-curl-impersonate-Firefox-for-Windows-x64
from curl-impersonate.
@avently There is no progress unfortunately, my windows knowledge is extremely lacking and this seems like quite some work in order to make it part of the regular build process. It is still in the project's priorities though. Any external help in this regard would be highly appreciated as well.
from curl-impersonate.
Regarding statically linking with NSS, I found this reference in Mozilla's application-services code. It shows the needed static libraries and their order according to os and arch. I'll try this as well for the macOS version (to support M1 processors).
from curl-impersonate.
nice future
from curl-impersonate.
@qwerty12 Thank you for the thorough work and documentation.
What parts are not suited for automation? If it's changing the patches, then of course we can upload patches that will fit both Linux and Windows (maybe by checking the host OS)
from curl-impersonate.
I appear to have been exaggerating. By automation, I tend to mean in the CI/GitHub Actions sense, but I guess that could also mean someone running a script after preparing the MSYS environment. My steps as I've written them aren't really automation friendly but, as you say, there's nothing stopping the existing patches etc. from being integrated with your work and adapting anything else.
Only one pressing issue comes to mind:
-
in MSYS2, the initial upgrade requires you to close MSYS2 and start it again
-
this might not always be the case with a newer shipped base from the MSYS2 team
-
MSYS2 might not even be needed in the CI sense: the MinGW toolchains can be found in some Linux distros. I believe the curl-for-win project does that. Though cross-compiling NSS doesn't sound fun...
-
-
Not really an issue, but something to be aware of:
nsinstall.exe
needs to be present in a folder in$PATH
, or the NSPR & NSS build scripts fail. Mozilla provide a binary here but because it has "install.exe" in the filename and lacks a manifest telling Windows it's UAC-aware, Windows thinks it's an installer and asks for elevation interactively-
the MSYS2 team work around that by putting a manifest next to the binary
-
export __COMPAT_LAYER=RunAsInvoker
also works
-
From what I can see, for building NSPR in MSYS2, all of the patches are needed.
For NSS, I think nss-build.patch is the most important one. I don't know if every change in there is needed, but I do know L54 and L91 are required changes. L43 too, so it can find MSYS2's libraries. Not sure if the other modifications (patched nss-config
and pkg-config
definition) are absolutely needed for cURL's build process to find NSS, though I had them applied as part of using MSYS2's PKGBUILDs to install NSS and NSPR.
EDIT: I can't get NSS to build with MSVC, even when using the MozillaBuild environment. At this point, I'm just going to suck it up and stick with dynamically-linked cURL built in MSYS 2. Right, after seeing Has the time come to drop NSS?, I'm definitely going to cut my losses and stick with what I have currently.
from curl-impersonate.
@lwthiker is there a progress regarding building firefox version for windows?
If you're unable to build nss there is a "solution". We can just use prebuilt libraries downloaded using this method: https://github.com/mozilla/application-services/blob/main/libs/build-nss-desktop.sh#L71
from curl-impersonate.
Related Issues (20)
- Homebrew recipe? HOT 1
- JA4+ HOT 2
- Homebrew unofficial receipt available HOT 1
- Ubuntu 22:04 libcurl-impersonate-chrome.so cannot be preloaded HOT 3
- Websocket on Windows HOT 6
- Pre shared key extension
- make chrome-build fails HOT 1
- Fiddler Intergration / Cloudfare bypass
- WS/WSS Protocol in Docker Image HOT 3
- compile error on boringssl - [-Werror,-Wunused-but-set-variable] HOT 3
- Content-Encoding may be gzip but the response body is uncompressed
- Safari http2 fingerprints are not correct
- make chrome-build failed HOT 7
- Bypassing Cloudflare HOT 6
- Impersonation no longer good enough?
- recompile php with curl-impersonate HOT 1
- curl: (56) HTTP/2 stream 1 was reset
- Namespace wrapping for firefox and chrome in one?
- Use Different browsers, ... , But get same fingerprints
- Precompiled binary doesn't work, but docker version works well for chatGPT.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-impersonate.