Skip to content

Commit 3f065ce

Browse files
committed
Remove the prefix and postfix of chrome and ff
1 parent 269e8de commit 3f065ce

42 files changed

Lines changed: 243 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-test-make.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ jobs:
145145
146146
- name: Build the Chrome version of curl-impersonate
147147
run: |
148-
make chrome-build
149-
make chrome-checkbuild
150-
make chrome-install
148+
make build
149+
make checkbuild
150+
make install
151151
152152
- name: Prepare the tests
153153
if: matrix.host == 'x86_64-linux-gnu'
@@ -202,7 +202,7 @@ jobs:
202202
- name: Clean build
203203
run: |
204204
set -e
205-
make chrome-clean
205+
make clean
206206
rm -Rf ${{ runner.temp }}/install
207207
mkdir ${{ runner.temp }}/install
208208
@@ -220,21 +220,21 @@ jobs:
220220
- name: Rebuild statically
221221
run: |
222222
set -e
223-
make chrome-build
224-
make chrome-checkbuild
223+
make build
224+
make checkbuild
225225
if [[ "${{ endsWith(matrix.host, 'musl') }}" == "true" ]]; then
226-
make chrome-install
226+
make install
227227
else
228-
make chrome-install-strip
228+
make install-strip
229229
fi
230230
231231
- name: Create tar release files for curl-impersonate
232232
run: |
233233
cd ${{ runner.temp }}/install/bin
234234
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
235-
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
235+
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate curl_*
236236
else
237-
tar -c -z -f ${{ runner.temp }}/curl-impersonate.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
237+
tar -c -z -f ${{ runner.temp }}/curl-impersonate.${{ matrix.host }}.tar.gz curl-impersonate curl_*
238238
fi
239239
echo "release_file_bin=${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz" >> $GITHUB_ENV
240240
@@ -337,9 +337,9 @@ jobs:
337337
338338
- name: Build the Chrome version of curl-impersonate
339339
run: |
340-
${{ matrix.make }} chrome-build
341-
${{ matrix.make }} chrome-checkbuild
342-
${{ matrix.make }} chrome-install
340+
${{ matrix.make }} build
341+
${{ matrix.make }} checkbuild
342+
${{ matrix.make }} install
343343
344344
- name: Prepare the tests
345345
run: |
@@ -366,7 +366,7 @@ jobs:
366366
- name: Clean build
367367
if: startsWith(github.ref, 'refs/tags/')
368368
run: |
369-
${{ matrix.make }} chrome-clean
369+
${{ matrix.make }} clean
370370
rm -Rf ${{ runner.temp }}/install
371371
mkdir ${{ runner.temp }}/install
372372
@@ -379,15 +379,15 @@ jobs:
379379
- name: Rebuild statically
380380
if: startsWith(github.ref, 'refs/tags/')
381381
run: |
382-
${{ matrix.make }} chrome-build
383-
${{ matrix.make }} chrome-checkbuild
384-
${{ matrix.make }} chrome-install-strip
382+
${{ matrix.make }} build
383+
${{ matrix.make }} checkbuild
384+
${{ matrix.make }} install-strip
385385
386386
- name: Create tar release files for curl-impersonate
387387
if: startsWith(github.ref, 'refs/tags/')
388388
run: |
389389
cd ${{ runner.temp }}/install/bin
390-
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate-chrome curl_*
390+
tar -c -z -f ${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz curl-impersonate curl_*
391391
echo "release_file_bin=${{ runner.temp }}/curl-impersonate-${{ github.ref_name }}.${{ matrix.host }}.tar.gz" >> $GITHUB_ENV
392392
393393
- name: Upload release files

INSTALL.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Configure and compile:
3535
mkdir build && cd build
3636
../configure
3737
# Build and install
38-
make chrome-build
39-
sudo make chrome-install
38+
make build
39+
sudo make install
4040
# You may need to update the linker's cache to find libcurl-impersonate
4141
sudo ldconfig
4242
# Optionally remove all the build files
@@ -54,7 +54,7 @@ curl_chrome119 https://www.wikipedia.org
5454
or run directly with you own flags:
5555

5656
```sh
57-
curl-impersonate-chrome https://www.wikipedia.org
57+
curl-impersonate https://www.wikipedia.org
5858
```
5959

6060
### Red Hat based (CentOS/Fedora/Amazon Linux)
@@ -104,8 +104,8 @@ Configure and compile:
104104
mkdir build && cd build
105105
../configure
106106
# Build and install
107-
gmake chrome-build
108-
sudo gmake chrome-install
107+
gmake build
108+
sudo gmake install
109109
# Optionally remove all the build files
110110
cd ../ && rm -Rf build
111111
```
@@ -135,7 +135,7 @@ sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
135135
--with-ca-path=/etc/ssl/certs \
136136
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
137137

138-
make chrome-build
138+
make build
139139
```
140140

141141
The flags mean as follows:
@@ -149,13 +149,13 @@ The Docker build is a bit more reproducible and serves as the reference implemen
149149
[`chrome/Dockerfile`](chrome/Dockerfile) is a debian-based Dockerfile that will build curl with all the necessary modifications and patches. Build it like the following:
150150

151151
```sh
152-
docker build -t curl-impersonate-chrome chrome/
152+
docker build -t curl-impersonate chrome/
153153
```
154154

155155
The resulting binaries and libraries are in the `/usr/local` directory, which contains:
156156

157-
* `curl-impersonate-chrome`, `curl-impersonate` - The curl binary that can impersonate Chrome/Edge/Safari. It is compiled statically against libcurl, BoringSSL, and libnghttp2 so that it won't conflict with any existing libraries on your system. You can use it from the container or copy it out. Tested to work on Ubuntu 20.04.
157+
* `curl-impersonate`, - The curl binary that can impersonate Chrome/Edge/Safari. It is compiled statically against libcurl, BoringSSL, and libnghttp2 so that it won't conflict with any existing libraries on your system. You can use it from the container or copy it out. Tested to work on Ubuntu 20.04.
158158
* `curl_chrome99`, `curl_chrome100`, `...` - Wrapper scripts that launch `curl-impersonate` with all the needed flags.
159-
* `libcurl-impersonate-chrome.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](README.md#libcurl-impersonate) for more details.
159+
* `libcurl-impersonate.so`, `libcurl-impersonate.so` - libcurl compiled with impersonation support. See [libcurl-impersonate](README.md#libcurl-impersonate) for more details.
160160

161161
You can use them inside the docker, copy them out using `docker cp` or use them in a multi-stage docker build.

Makefile.in

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,60 +59,60 @@ help: ## Show this help message
5959
.PHONY: help
6060
.DEFAULT_GOAL := help
6161

62-
chrome-build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impersonate
62+
build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impersonate
6363
cd $(CURL_VERSION)
6464
# Don't pass this Makefile's MAKEFLAGS
6565
$(MAKE) MAKEFLAGS=-j$(SUBJOBS)
66-
.PHONY: chrome-build
66+
.PHONY: build
6767

68-
chrome-checkbuild: ## Run basic checks on the built binary
68+
checkbuild: ## Run basic checks on the built binary
6969
ifeq ($(host),$(build))
7070
cd $(CURL_VERSION)
7171
# Make sure all needed features were compiled in
72-
./src/curl-impersonate-chrome -V | grep -q zlib
73-
./src/curl-impersonate-chrome -V | grep -q brotli
74-
./src/curl-impersonate-chrome -V | grep -q nghttp2
75-
./src/curl-impersonate-chrome -V | grep -q BoringSSL
72+
./src/curl-impersonate -V | grep -q zlib
73+
./src/curl-impersonate -V | grep -q brotli
74+
./src/curl-impersonate -V | grep -q nghttp2
75+
./src/curl-impersonate -V | grep -q BoringSSL
7676
$(info Build OK)
7777
else
7878
$(info Cross compiling, skipping checkbuild)
7979
endif
80-
.PHONY: chrome-checkbuild
80+
.PHONY: checkbuild
8181

82-
chrome-install: ## Install the Chrome version of curl-impersonate after build
82+
install: ## Install the Chrome version of curl-impersonate after build
8383
cd $(CURL_VERSION)
8484
$(MAKE) install-exec MAKEFLAGS=
8585
# Wrapper scripts for the Chrome version (e.g. 'curl_chrome99')
8686
install $(srcdir)/chrome/curl_* @bindir@
87-
.PHONY: chrome-install
87+
.PHONY: install
8888

89-
chrome-install-strip: ## Like 'chrome-install', but strip binaries for smaller size
89+
install-strip: ## Like 'install', but strip binaries for smaller size
9090
cd $(CURL_VERSION)
9191
$(MAKE) install-exec MAKEFLAGS=
9292
# We could have used 'install-strip' but then the docs would be installed as well.
9393
# Instead strip manually.
94-
$(STRIP) @bindir@/curl-impersonate-chrome
94+
$(STRIP) @bindir@/curl-impersonate
9595
# Wrapper scripts for the Chrome version (e.g. 'curl_chrome99')
9696
install $(srcdir)/chrome/curl_chrome* $(srcdir)/chrome/curl_edge* $(srcdir)/chrome/curl_safari* @bindir@
97-
.PHONY: chrome-install-strip
97+
.PHONY: install-strip
9898

99-
chrome-uninstall: ## Uninstall the Chrome version of curl-impersonate after 'make install'
99+
uninstall: ## Uninstall the Chrome version of curl-impersonate after 'make install'
100100
cd $(CURL_VERSION)
101101
$(MAKE) uninstall MAKEFLAGS=
102102
rm -Rf @bindir@/curl_chrome* @bindir@/curl_edge* @bindir@/curl_safari*
103-
.PHONY: chrome-uninstall
103+
.PHONY: uninstall
104104

105-
chrome-clean: ## Clean build artifacts of the Chrome version. Use after re-running './configure'
106-
cd $(CURL_VERSION)
107-
$(MAKE) clean MAKEFLAGS=
108-
rm -f .chrome
109-
.PHONY: chrome-clean
110-
111-
clean: ## Remove all build artifacts, including dependencies
105+
clean:
106+
## Remove all build artifacts, including dependencies
112107
rm -Rf brotli-$(BROTLI_VERSION).tar.gz brotli-$(BROTLI_VERSION)
113108
rm -Rf boringssl-$(BORING_SSL_COMMIT).zip boringssl-$(BORING_SSL_COMMIT)
114109
rm -Rf $(NGHTTP2_VERSION).tar.bz2 $(NGHTTP2_VERSION)
115110
rm -Rf $(CURL_VERSION).tar.gz $(CURL_VERSION)
111+
## Clean build artifacts of the Chrome version. Use after re-running './configure'
112+
cd $(CURL_VERSION)
113+
rm -f .chrome
114+
.PHONY: clean
115+
116116

117117
brotli-$(BROTLI_VERSION).tar.gz:
118118
curl -L "https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz" \
@@ -231,18 +231,18 @@ $(CURL_VERSION).tar.gz:
231231
-o "$(CURL_VERSION).tar.gz"
232232

233233
# Apply the "Chorme version" patches and mark using a dummy file
234-
$(CURL_VERSION)/.patched-chrome: $(srcdir)/chrome/patches/curl-*.patch
234+
$(CURL_VERSION)/.patched: $(srcdir)/chrome/patches/curl-*.patch
235235
rm -Rf $(CURL_VERSION)
236236
tar -xf $(CURL_VERSION).tar.gz
237237
mv curl-$(CURL_VERSION) $(CURL_VERSION) # fix directory name
238238
cd $(CURL_VERSION)
239239
for p in $^; do patch -p1 < $$p; done
240240
# Re-generate the configure script
241241
autoreconf -fi
242-
touch .patched-chrome
242+
touch .patched
243243

244244
# This is a small hack that flags that curl was patched and configured in the "chrome" version
245-
$(CURL_VERSION)/.chrome: $(chrome_libs) $(CURL_VERSION).tar.gz $(CURL_VERSION)/.patched-chrome
245+
$(CURL_VERSION)/.chrome: $(chrome_libs) $(CURL_VERSION).tar.gz $(CURL_VERSION)/.patched
246246
cd $(CURL_VERSION)
247247

248248
# Set up the configure flags to curl.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Other files of interest:
151151

152152
If you'd like to help, please check out the [open issues in the origional repo](https://github.com/lwthiker/curl-impersonate/issues) and [open issues here](https://github.com/lexiforest/curl-impersonate/issues). You can open a pull request with your changes. Note that some of the upstream issues have been fixed.
153153

154-
This repository contains the build process for `curl-impersonate`. The actual patches to `curl` are maintained in a [separate repository](https://github.com/lexiforest/curl) forked from lwthiker's fork of the upstream curl. The changes are maintained in the [impersonate-firefox](https://github.com/lexiforest/curl/tree/impersonate-firefox) and [impersonate-chrome](https://github.com/lexiforest/curl/tree/impersonate-chrome) branches.
154+
This repository contains the build process for `curl-impersonate`. The actual patches to `curl` are maintained in a [separate repository](https://github.com/lexiforest/curl) forked from lwthiker's fork of the upstream curl. The changes are maintained in the [impersonate-chrome](https://github.com/lexiforest/curl/tree/impersonate-chrome) branch.
155155

156156
You may also need the [forked and patched](https://github.com/lexiforest/boringssl) BoringSSL.
157157

0 commit comments

Comments
 (0)