Use cURL command to test download speeds
search cancel

Use cURL command to test download speeds

book

Article ID: 170090

calendar_today

Updated On:

Products

Web Security.cloud

Issue/Introduction

Capture information about download speeds via the Web Security.cloud service using cURL command in a Windows Operating Systems

Environment

Web Security.cloud

Resolution

Install cURL on Windows


cURL is not installed by default in Windows Operating systems. To install cURL follow these steps:

  1. Open Windows Explorer and create a new folder called curl in your C:\ drive. e.g: C:\curl
  2. Go to http://curl.haxx.se/download.html to download cURL.
  3. Select cURL version for the specific Windows OS environment.
Win32 - Generic > Filename: Win32 zip with SSL support
Win64 - Generic > Filename: Win64 x86_64 zip with SSL support
  1. Click on the cURL version to start the download.
  2. Unzip the downloaded file and move the curl.exe file to your C:\curl folder.
  3. Go to http://curl.haxx.se/docs/caextract.html to download the digital certificate file named cacert.pem
    This file contains a bundle of valid digital certificates, It allows cURL to connect securely to web sites using the Secure Sockets Layer (SSL) protocol.
     
  4. Move the cacert.pem file to your C:\curl folder.
  5. Rename cacert.pem file to curl-ca-bundle.crt
     

Find the assigned proxy


The Assigned Proxy is the proxy hostname that our infrastructure assigns to your infrastructure after hitting our load balancer e.g: proxy1.us.webscanningservice.com.

To obtain the assigned proxy hostname

  1. Open a web browser on the test machine LAN/DMZ
  2. Go to http://ip.symanteccloud.com/

This should display the proxy server currently assigned to your infrastructure. Make note of the hostname as this would be used to run the curl.e.g.:

C:\curl> curl -x http://proxy53.messagelabs.net:3128

 

Find the web server


The table below would help to choose the location of the web server, in order to download the 100 Mbs file or 1 Gb file for testing in the cURL command.

-L http://prprobeaz1001.messagelabs.com/100M > C:\curl\nul
  1. To find out what is the upstream proxy hostname that your infrastructure is routing through, check your system configuration under:
     
    • Browser LAN Settings
    • PAC File - proxy.pac file
    • CSP - squid.conf file
    • Smart Connect - agentconfigure.xml file

      Once you know which upstream proxy hostname is being used by your infrastructure, cross-reference the web server on the table below. e.g.: Upstream Proxy hostname: proxy1.us.webscanningservice.com equals to Web Server: http://prprobeaz1001.messagelabs.com/100M
       
      Region Location Upstream Proxy Hostname Web Server
      NAM Arizona proxy1.us.webscanningservice.com http://prprobeaz1001.messagelabs.com/100M
      NAM Washington proxy2.us.webscanningservice.com http://prprobeva1001.messagelabs.com/100M
      EMEA Frankfurt proxy1.de.webscanningservice.com http://prprobeff1001.messagelabs.com/100M
      EMEA Hayes proxy1.uk.webscanningservice.com http://prprobelh1001.messagelabs.com/100M
      EMEA Europe proxy1.eu.webscanningservice.com http://prprobeam1001.messagelabs.com/100M
      EMEA Amsterdam proxy1.nl.webscanningservice.com http://prprobeam1001.messagelabs.com/100M
      APAC Kitakyushu proxy1.jp.webscanningservice.com http://prprobeki1001.messagelabs.com/100M
      APAC Tokyo proxy1.jp.webscanningservice.com http://prprobetk1001.messagelabs.com/100M
      APAC Singapore proxy1.sg.webscanningservice.com http://prprobesg2001.messagelabs.com/100M
      APAC Syndey 1 proxy1.ap.webscanningservice.com http://prprobesy1001.messagelabs.com/100M
      APAC Syndey 2 proxy1.ap.webscanningservice.com http://prprobesy2001.messagelabs.com/100M
      APAC Hong Kong proxy1.hk.webscanningservice.com http://prprobehk1001.messagelabs.com/100M

Note: To change the file size to 1 Gb, simply change the filename from 100M to 1G. e.g.: http://prprobeaz1001.messagelabs.com/1G
 

Using cURL to test download speeds


Before starting to test download speeds using cURL command, the following information is needed to run the curl:

It is important to run this cURL test from a test machine from within the corporate network (LAN) as well as running the same test on a test machine on the DMZ or outside any firewalls. This information will help you to compare the download speeds when going through the proxy on a Test Machine (Corporate Network) vs.Test Machine (DMZ).

  1. Open Command Prompt (cmd)
  2. Go to the folder called curl in your C:\ drive.
C:\users\username> cd c:\curl
  1. Type the curl command to download a 100 Mbs text file from a Symantec web server. e.g.
curl -x http://proxy53.messagelabs.net:3128 -L http://prprobeaz1001.messagelabs.com/100M > C:\curl\null
  • -x, --proxy [PROTOCOL://]HOST[:PORT]  Use proxy on given port
  • -L, --location      Follow redirects (H)
  1. Once the download is completed, the results should show as follow:
C:\curl> curl -x http://proxy53.messagelabs.net:3128 -L http://prprobeaz1001.messagelabs.com/100M > C:\curl\null

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  100M  100  100M    0     0  9297k      0  0:00:11  0:00:11 --:--:-- 9920k
  1. Units of speed measurement must be recorded/communicated in megabits per second (Mbps). cURL displays the output in bytes second. This must be converted to bits per second by simply multiplying by 8. e.g. 9297k * 8 = 74.376 Mbps
     
      Assigned Proxy Web Server Average Download Speed (bytes) Average Download Speed (Mbps) Download Time Total
    Test machine(LAN) proxy53 prprobeaz1001 9297k 74.37 0:00:11
    Test machine (DMZ) proxy53 prprobeaz1001 1250k 100.00 0:00:08

If further help is required, the Symantec technical support can be contacted via phone or by opening a support case.