To use Proxy Saver with HTTPS and SSL connections you need to configure your proxy tool to trust the Scrapfly Proxy Saver TLS certificate
or ignore certificate verification process. Here's how to do it with popular proxy tools:
Download the Certificate
To start you can find the .crt certificate file
in the Proxy Saver dashboard under each proxy profile.
This scrapfly-ca.crt file contains the public key of the Scrapfly Proxy Saver certificate.
The certificate file can be used to configure tools to trust HTTPS connections certified by Proxy Saver.
HTTP Tools
Each CLI tool like curl has a custom certificate option using which we can specify the location of the Proxy Saver scrapfly-ca.cert certificate file:
Alternatively, each tool also provides an ability to ignore certificate verification process
which means the certificate step can be ignored entirely though it's not recommended due to security risks.
Follow the Windows instructions to install the certificate
Reboot your computer
After rebooting, you will be able to connect to Proxy Saver
To verify whether the certificate was installed correctly use this windows command:
curl -v -x \
http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io \
https://httpbin.dev/ip
# if the certificate was not installed correctly you'll see:
# curl: (60) SSL certificate problem: unable to get local issuer certificate
Select "Always Trust" in the "When using this certificate" options dropdown.
Reboot any active programs to be able to connect to Proxy Saver
To verify whether the certificate was installed correctly use this macos command:
curl -v -x \
http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io \
https://httpbin.dev/ip
# if the certificate was not installed correctly you'll see:
# curl: (60) SSL certificate problem: unable to get local issuer certificate
Copy the .crt file to /usr/local/share/ca-certificates/
Run sudo update-ca-certificates
Reboot any active programs to be able to connect to Proxy Saver
To verify whether the certificate was installed correctly use this linux command:
curl -v -x \
http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io \
https://httpbin.dev/ip
# if the certificate was not installed correctly you'll see:
# curl: (60) SSL certificate problem: unable to get local issuer certificate
Web Browsers
Each web browser can also take custom certificates to trust HTTPS connections certified by Proxy Saver.
Go to browser's certificate settings page about:preferences#advanced
Go to the Privacy & Security tab and select View Certificates
Upload your scrapfly-ca.crt file.
When prompted for confirmation select all checkboxes and import
HTTP Client Libraries
Most http client libraries support proxies and can be configured to use custom certificates. Here are some examples for the most popular http client libraries:
import requests
response = requests.get(
"https://httpbin.dev/ip",
proxies={
"https": "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333"
},
# use scrapfly certificate
verify="/path/to/scrapfly-ca.crt",
# or disable verification entirely
# verify=False
)
# or set for entire session
session = requests.Session()
session.verify = "/path/to/scrapfly-ca.crt"
session.verify = False
session.proxies = {
"https": "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333"
}
import httpx
response = httpx.get(
"https://httpbin.dev/ip",
proxies={
"https://": "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333"
},
# Use scrapfly certificate
verify="/path/to/scrapfly-ca.crt",
# Or disable verification entirely
# verify=False
)
# or set for entire session
client = httpx.Client(
verify="/path/to/scrapfly-ca.crt",
# Or disable verification entirely
# verify=False
proxies={
"https://": "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333"
}
)
response = client.get("https://httpbin.dev/ip")
print(response.text)
client.close()
<?php
// URL to request
$url = "https://httpbin.dev/ip";
// Initialize cURL
$ch = curl_init($url);
// Proxy configuration
$proxy = "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333";
// Set cURL options for proxy and custom certificate
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Use the custom certificate
curl_setopt($ch, CURLOPT_CAINFO, "/path/to/scrapfly-ca.crt");
// Disable certificate verification (optional, not recommended for production)
# curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Execute the request
$response = curl_exec($ch);
// Check for errors
if(curl_errno($ch)) {
echo 'Request Error: ' . curl_error($ch);
} else {
echo $response;
}
// Close cURL
curl_close($ch);
?>
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
// Create a new Guzzle client with proxy and custom certificate options
$client = new Client([
// Set the proxy configuration
'proxy' => [
'https' => 'http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333'
],
// Set the path to the custom certificate
'verify' => '/path/to/scrapfly-ca.crt'
// If you want to disable SSL verification entirely, set 'verify' to false
// 'verify' => false
]);
// Send a GET request
$response = $client->get('https://httpbin.dev/ip');
// Print the response body
echo $response->getBody();
?>
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
func main() {
// Load your custom CA certificate
caCertPath := "/path/to/scrapfly-ca.crt"
caCert, err := ioutil.ReadFile(caCertPath)
if err != nil {
fmt.Println("Error loading CA certificate:", err)
return
}
// Create a certificate pool and append the custom CA certificate
caCertPool := tls.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
// Set up a proxy URL
proxyURL, err := url.Parse("http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333")
if err != nil {
fmt.Println("Error parsing proxy URL:", err)
return
}
// Configure HTTP transport to use proxy and custom CA certificate
transport := &http.Transport{
Proxy: http.ProxyURL(proxyURL),
TLSClientConfig: &tls.Config{
RootCAs: caCertPool,
},
}
// Create an HTTP client with the custom transport
client := &http.Client{
Transport: transport,
}
// Make an HTTP GET request
resp, err := client.Get("https://httpbin.dev/ip")
if err != nil {
fmt.Println("Request error:", err)
return
}
defer resp.Body.Close()
// Print the response body
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
use reqwest::Client;
use std::fs;
use reqwest::Proxy;
use tokio;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Load your custom CA certificate
let ca_cert = fs::read_to_string("/path/to/scrapfly-ca.crt")?;
// Create a client with proxy and custom CA certificate
let client = Client::builder()
.proxy(Proxy::https("http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333")?)
.add_root_certificate(reqwest::Certificate::from_pem(ca_cert.as_bytes())?)
.build()?;
// Send a GET request
let response = client.get("https://httpbin.dev/ip").send().await?;
// Print the response body
let body = response.text().await?;
println!("{}", body);
Ok(())
}
require 'typhoeus'
# Set up the request with a proxy and custom certificate
response = Typhoeus.get(
"https://httpbin.dev/ip",
proxy: "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333",
sslcert: "/path/to/scrapfly-ca.crt", # Custom SSL certificate
ssl_verifypeer: true # Enable certificate verification
)
# Print the response body
puts response.body
# If you want to disable SSL verification entirely (not recommended for production)
# response = Typhoeus.get(
# "https://httpbin.dev/ip",
# proxy: "http://proxyId-XXX:API_KEY@proxy-saver.scrapfly.io:3333",
# ssl_verifypeer: false # Disable SSL verification
# )
Selenium
To use the certificate with Selenium you can use the desired_capabilities option to specify the certificate file location:
Ensure you have the required Python packages installed:
Use the following Python code to load the custom certificate into Selenium’s browser session:
import os
import selenium.webdriver as webdriver
from selenium.webdriver.chrome.options import Options
# Create a new ChromeOptions instance
chrome_options = Options()
# You can ignore all certificate errors:
chrome_options.add_argument(f"--ignore-certificate-errors")
# or add proxy saver certificate
cert_path = "/path/to/proxy-saver.crt"
chrome_options.add_argument(f"--ssl-client-certificate-file={cert_path}")
# Initialize WebDriver with the options and test it:
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://httpbin.dev/ip")
# if the certificate was not installed correctly you'll see:
# SSL certificate problem: unable to get local issuer certificate
Run the Python script to start Selenium with the custom certificate and verify the setup.
Playwright
To use the certificate with Playwright you can either disable certificate verification or load the custom certificate into the browser session: