Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Configure cURL options for improved security and performance #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 30 additions & 34 deletions config/.curlrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,51 @@
# .curlrc - Configuration file for cURL

# Output and Logging
progress-bar
verbose = off
silent
output = ~/Downloads/curl.log
create-dirs
progress-bar # Show progress bar when downloading
output = ~/Downloads/curl.log # Redirect output to a log file
create-dirs # Automatically create necessary directories

# Security Options
proto = https
fail-with-body
ssl-reqd
ssl-verify-peer
ssl-verify-host
ciphers = HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4
curves = X25519:P-521:P-384:P-256
proto = https # Restrict protocol to HTTPS for security
ssl-reqd # Require SSL/TLS for connections
ssl-verify-peer # Verify the peer's SSL certificate
ssl-verify-host # Verify the host in SSL certificate
ssl-verify-status # Ensure certificate status check with OCSP Stapling
ciphers = HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4 # Secure cipher suites
curves = X25519:P-521:P-384:P-256 # Elliptic curves for ECDHE

# HTTP Options
referer = ";auto"
connect-timeout = 30
max-time = 120
retry = 3
retry-delay = 5
retry-max-time = 60
referer = ";auto" # Automatically set the HTTP Referer header
connect-timeout = 30 # Set timeout for connection (seconds)
max-time = 120 # Maximum time for entire operation (seconds)
retry = 3 # Set number of retries on transient errors
retry-delay = 5 # Set delay between retries (seconds)
retry-max-time = 60 # Maximum time summarise all retries (seconds)
retry-connrefused # Retry if connection is refused

# User Agent
user-agent = "curl/7.75.0 (darwin20.3.0)"
user-agent = "curl/7.75.0 (darwin20.3.0)" # Custom user-agent string

# Cookies
cookie = ~/.curl-cookies.txt
cookie-jar = ~/.curl-cookies.txt
cookiefile = ~/.curl-cookies.txt
cookie-jar = ~/.curl-cookies.txt # Path to file where cookies are stored and read

# Compression
compressed
compressed # Request compressed content where possible

# Redirection
location-trusted
max-redirs = 5
max-redirs = 5 # Maximum number of redirections to follow

# Etiquette
limit-rate = 1M
parallel = 4
parallel-max = 8
remote-time
limit-rate = 1M # Limit rate of data transfer to 1 Megabyte per second
parallel = 4 # Allow up to 4 parallel transfers per single command line
parallel-max = 8 # Allow up to 8 parallel transfers globally
remote-time # Use remote's timestamp for downloaded files

# Proxy Configuration
# proxy = http://proxy.example.com:8080
# proxy-user = "username:password"
# proxy = http://proxy.example.com:8080 # Uncomment to use proxy
# proxy-user = "username:password" # Uncomment to set proxy username and password

# Custom Headers
header = "Accept-Language: en-US,en;q=0.9"
header = "Accept-Encoding: gzip, deflate"
header = "Cache-Control: no-cache"
header = "Accept-Language: en-US,en;q=0.9" # Preferred languages
header = "Accept-Encoding: gzip, deflate" # Accepted encodings
header = "Cache-Control: no-cache" # Disable caching