mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2026-10-10 19:36:32 +00:00
Add missing Dockerfile dependencies
* Install 'xxd', needed for the wrapper curl_ff95 script. * Add curl_ff95 and not curl_ff97 (typo). * Change binary name to 'curl-impersonate'
This commit is contained in:
+10
-7
@@ -42,11 +42,6 @@ RUN cd ${NGHTTP2_VERSION} && \
|
||||
./configure && \
|
||||
make && make install
|
||||
|
||||
# curl tries to load the CA certificates for libnss.
|
||||
# It loads them from /usr/lib/x86_64-linux-gnu/nss/libnssckbi.so,
|
||||
# which is supplied by libnss3 on Debian/Ubuntu
|
||||
RUN apt-get install -y libnss3
|
||||
|
||||
# Download curl and compile it with nss
|
||||
ARG CURL_VERSION=curl-7.81.0
|
||||
RUN curl -o ${CURL_VERSION}.tar.xz https://curl.se/download/${CURL_VERSION}.tar.xz
|
||||
@@ -65,10 +60,18 @@ RUN cd ${CURL_VERSION} && \
|
||||
./configure --with-nss=/build/${NSS_VERSION}/dist/Release --enable-static --disable-shared CFLAGS="-I/build/${NSS_VERSION}/dist/public/nss -I/build/${NSS_VERSION}/dist/Release/include/nspr" --with-nghttp2=/usr/local && \
|
||||
make
|
||||
|
||||
# curl tries to load the CA certificates for libnss.
|
||||
# It loads them from /usr/lib/x86_64-linux-gnu/nss/libnssckbi.so,
|
||||
# which is supplied by libnss3 on Debian/Ubuntu
|
||||
RUN apt-get install -y libnss3
|
||||
|
||||
# 'xxd' is needed for the wrapper curl_ff95 script
|
||||
RUN apt-get install -y xxd
|
||||
|
||||
RUN mkdir out && \
|
||||
cp ${CURL_VERSION}/src/curl out/curl-nss
|
||||
cp ${CURL_VERSION}/src/curl out/curl-impersonate
|
||||
|
||||
# Wrapper script
|
||||
COPY curl_ff97 out/
|
||||
COPY curl_ff95 out/
|
||||
|
||||
RUN chmod +x out/*
|
||||
|
||||
@@ -9,7 +9,7 @@ exec 5<>pipe 3>pipe 4<pipe 5>&-
|
||||
# The list of ciphers can be obtained by looking at the Client Hello message in
|
||||
# Wireshark, then converting it using the cipherlist array at
|
||||
# https://github.com/curl/curl/blob/master/lib/vtls/nss.c
|
||||
"$dir/curl-nss" \
|
||||
"$dir/curl-impersonate" \
|
||||
--ciphers aes_128_gcm_sha_256,chacha20_poly1305_sha_256,aes_256_gcm_sha_384,ecdhe_ecdsa_aes_128_gcm_sha_256,ecdhe_rsa_aes_128_gcm_sha_256,ecdhe_ecdsa_chacha20_poly1305_sha_256,ecdhe_rsa_chacha20_poly1305_sha_256,ecdhe_ecdsa_aes_256_gcm_sha_384,ecdhe_rsa_aes_256_gcm_sha_384,ecdhe_ecdsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha,ecdhe_rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,rsa_aes_128_gcm_sha_256,rsa_aes_256_gcm_sha_384,rsa_aes_128_sha,rsa_aes_256_sha \
|
||||
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0' \
|
||||
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
|
||||
|
||||
Reference in New Issue
Block a user