Search Unity

Network configuration

Discussion in 'Package Manager' started by maximeb_unity, Nov 29, 2018.

Thread Status:
Not open for further replies.
  1. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    117
    This post provides general information about network configuration requirements for the Package Manager (firewall whitelist, proxy settings) in order to help troubleshooting network-related issues.

    Firewall configuration

    The following domain names need to be accessible by the Unity Package Manager process. They are accessed using HTTPS.
    • packages.unity.com
    • download.packages.unity.com
    • dl.bintray.com
    • api.bintray.com
    • akamai.bintray.com
    • upm-cdn.unity.com (or upm-cdn-china.unitychina.cn if you are located in China) (New - July 2019)
    It may be necessary to add the above domain names to the firewall whitelist.

    Proxy configuration

    When using a proxy server, you may need to configure the
    HTTP_PROXY
    and
    HTTPS_PROXY
    environment variables for the Unity Package Manager to use it when it performs requests against the Unity package registry.

    These variables may be set globally (system/user); instructions on how to do that depend on the Operating System. Alternatively, they can be set just for the Unity Editor/Hub when it is launched. See the following section for instructions on creating a wrapper script for the latter.

    Please note that we're investigating easier methods of proxy configuration, including obtaining that information from the system settings. The wrapper scripts below are a proposed workaround until then.

    Setting environment variables for the Unity Hub

    Windows

    1. Open a text editor such as the Notepad program.
    2. Enter the following text, replacing
      proxy-url
      with your proxy server URL, and adjusting the Hub install path as needed:
      Code (csharp):
      1. @echo off
      2. set HTTP_PROXY=proxy-url
      3. set HTTPS_PROXY=proxy-url
      4. start "" "C:\Program Files\Unity Hub\Unity Hub.exe"
    3. Save the file to a location where you can easily find it (e.g. the Desktop), and make sure the file has the
      .cmd
      (e.g.
      launchUnityHub.cmd
      ).
    4. Double-click the file to launch the Hub with the environment variables set, or invoke it from the command prompt for the same effect. These environment variables will be passed on to any Unity Editor process launched from the Hub.
    macOS

    1. Open a Terminal window and enter the following script after replacing
      proxy-url
      with your proxy server URL, and adjusting the Hub install path as needed:
      Code (csharp):
      1. echo '#!/bin/bash
      2. export HTTP_PROXY=proxy-url
      3. export HTTPS_PROXY=proxy-url
      4. nohup "/Applications/Unity Hub.app/Contents/MacOS/Unity Hub" &>/dev/null &' > launchUnityHub.command
      5. chmod +x launchUnityHub.command
    2. This create the
      launchUnityHub.command
      file, which you can move to a convenient location (e.g. the Desktop).
    3. Double-click the file to launch the Hub with the environment variables set, or invoke it from the terminal for the same effect. These environment variables will be passed on to any Unity Editor process launched from the Hub.
    Remarks
    • If the Hub is already running, the script will just bring it into focus without relaunching it, so it will not re-apply the proxy settings if you change them. You need to shut down the Hub completely first.
    • You may change the path to the Unity Editor program if you prefer to launch the Editor directly, or do not have the Hub installed.
    • The double quotes around the path to the program are required if there are spaces in the path.
    • (macOS only) Double-clicking the script will open a Terminal window or tab and leave it open, even after the script finishes. This can be changed in the Terminal.app preferences.

    Troubleshooting
    • Proxy server using a self-signed certificate: There have been issues reported with using a self-signed certificate for the proxy. These certificates are considered insecure and will be rejected by the underlying HTTPS layer used by the Package Manager.
     
    Last edited: Jul 17, 2019
    gamefish, nirvanajie, Mauri and 2 others like this.
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    540
    mranuproy likes this.
Thread Status:
Not open for further replies.