Skip to main content
Code42 Support

Connect to Code42 cloud destinations from a proxy server

Available in:

  • CrashPlan PRO
    • Standard
    • Premium
    • Enterprise
Applies to:

Overview

To connect to a destination from behind a proxy server, you must configure proxy server settings. If you are able to make an initial connection to the destination without connecting through a proxy, configure your proxy settings from the Code42 app. However, if you can only connect through a proxy, then you must configure proxy settings manually. Both processes are described below.

Considerations

  • This article assumes you have permission to manage your proxy settings. Your administrator may prevent changes to your proxy settings.
  • The Code42 app does not support SOCKS-only HTTP proxies.

Recommended solution

If you are able to make an initial connection to the destination without connecting through a proxy, configure proxy settings in the Code42 app:

  1. From Home, click Details.
  2. Select the arrow next to your device name.
  3. Choose Device preferences.
  4. Select Network.
  5. Next to Proxy, click Change.
  6. Select Enable proxy.
  7. If your proxy connection requires a proxy auto-config (PAC) file, select Manual then enter the file URL in PAC URL.
  8. Click Save.

The Code42 app can now detect your proxy settings and connect to the destination, which allows you to begin your backup and modify your settings.

Proxy auto-config (PAC) files

A proxy auto-config (PAC) file defines what proxies the Code42 app should use to connect to its destinations. Use of a PAC file is enabled by a Code42 administrator.

The PAC file specifies whether the Code42 app should connect through a specific proxy, connect directly, or a combination depending on the desired order of failover. The PAC file is JavaScript and implements the FindProxyForURL method that returns the proxies to use for a specified URL and host. The following is an example of a PAC file:

function FindProxyForURL(url, host)
{
return "PROXY fastproxy.example.com:8080; proxy.example.com:8080; DIRECT";
}

The example PAC file directs a Code42 app to first try fastproxy.example.com; if that fails, try proxy.example.com; if that fails, try a direct connection. All proxy servers defined in the PAC file must have a port specified.

Upgrading to 6.0
As of Code42 for Enterprise version 6.0, the PAC file must include the "DIRECT" option. If not, the Code42 app does not attempt a direct connection after the proxies fail. Therefore, if you are upgrading to 6.0, add "DIRECT" to your PAC file and then issue the proxy refresh command in the Code42 app's command-line interface.

CODE42 INTERNAL INFORMATION ONLY
See PL-40081 for more information about Code42 proxy support.

Alternative solution

If you must connect to the destination through a proxy for initial setup, then you must configure your proxy settings on your device (not in the Code42 app) in order to start your backup and modify your settings.

  1. Stop the Code42 service.
  2. Find my.service.xml.
    Default location:
    • Windows: C:\ProgramData\CrashPlan\conf
      To view this hidden folder, open a file browser and paste the path in the address bar. If you installed per user, see the file and folder hierarchy for file locations.
    • OS X: /Library/Application Support/CrashPlan/conf/
      If you installed per user, see the file and folder hierarchy for file locations.
    • Linux: /usr/local/crashplan/conf
  3. Open the file in a text editor as an administrator (Windows) or with an editor that has root permissions (OS X/Linux).
    See External Resources for more information.
  4. Find the section marked by <servicePeerConfig></servicePeerConfig>.
  5. Change the value inside the <useProxy> flag from false to true:
    • Old: <useProxy>false</useProxy>
    • New: <useProxy>true</useProxy>
  6. If your proxy requires a PAC file:
    1. Find the section marked <remotePACFileUrl>.
    2. Change this sections value, depending on your PAC file:
      • Old: <remotePACFileUrl nil="true"/>
      • New: <remotePACFileUrl>proxy.example.com</remotePACFileUrl>
  7. Save your changes.
  8. Start the Code42 service.

Still cannot connect?

If your Code42 app still cannot connect to the destination, add proxy values to default.service.xml.

  1. Stop the Code42 service.
  2. Find default.service.xml
    Default location:
    • Windows: C:\Program Files\CrashPlan\conf\
      If you installed per user, see the file and folder hierarchy for file locations.
    • OS X: /Applications/CrashPlan.app/Contents/Resources/Java/conf/
      If you installed per user, see the file and folder hierarchy for file locations.
    • Linux: /usr/local/crashplan/conf
  3. Open the file in a text editor as an administrator (Windows) or with an editor that has root permissions (OS X/Linux).
    See External Resources for more information.
  4. Find the section marked by <servicePeerConfig></servicePeerConfig>.
  5. Add the following to that section: <useProxy>true</useProxy>
  6. If your proxy requires a PAC file, add: <remotePACFileUrl>proxy.example.com</remotePACFileUrl>
  7. Save your changes.
  8. Start the Code42 service.

Confirm your connection

To confirm that the client is able to connect to the server using the proxy:

  1. Open the Code42 app.
  2. Open Code42 Commands by entering the keyboard shortcut for your operating system:
    • Windows: Ctrl+Shift+C
    • OS X: Option+Command+C
  3. Enter the following command-line command using the server and port for the destination:
    proxy test server:port
    
    • For example:
      proxy test master-server.example.com:443

This will also list the proxies returned by the PAC file that the Code42 app is using.