Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using Unity when behind a proxy

Discussion in 'Editor & General Support' started by GFX47, Dec 7, 2010.

  1. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Hi everyone, happy to join this great community!

    Here is my first question : can we configure somewhere in Unity the proxy settings to be able to access online features of the editor (updates check and assets store in particular)?
    I'm using Unity at work, where network is filtered and we need to use a proxy to go outside...

    When checking for updates, I get this message : "Connection to the update server failed" (console saying "Couldn't connect to server url: https://kharma.unity3d.com/").

    When trying to access Asset Store, I get this message : "You are currently offline. You must be online in order to download content from Asset Store. Existing downloaded content may still imported into your current Project.".

    If it is not possible to configure proxy settings, could someone please give me the ports used by Unity so I can ask our admins to open it?

    Thanks a lot by advance.
     
  2. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Am I really the only one having this kind of issue? :D
     
  3. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Well I finally got a partial solution : directly access https://kharma.unity3d.com from my browser... but I can't download packages :(
     
    Last edited: Dec 23, 2010
  4. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Doesn't work anymore... ;___;
    It's really annoying not being able to access Asset Store (which is a huge feature of Unity)... especially when you bought a pro version!
     
  5. Rob Rolleston

    Rob Rolleston

    Joined:
    Sep 28, 2010
    Posts:
    3
    I agree and we are having the same issues.
    There must be some simple solution to this. Aside from waiting until I am home and thus having no firewall...
     
  6. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Helllllooooo support? XD
     
  7. Rob Rolleston

    Rob Rolleston

    Joined:
    Sep 28, 2010
    Posts:
    3
    I was hoping maybe the latest 3.2 release would fix things, but alas....no.
     
  8. benblo

    benblo

    Joined:
    Aug 14, 2007
    Posts:
    476
    +1... ideally Unity would use IE's proxy data, the way Google Chrome does on Windows (dunno if the same goes for Safari on the Mac).
     
  9. Rob Rolleston

    Rob Rolleston

    Joined:
    Sep 28, 2010
    Posts:
    3
    I was finally able to solve this by setting the user ENV Variable HTTPS_proxy to http://www{my own proxy}:8000. This was instead of the HTTP_proxy. It was confusing, because apparently the "Check of Updates" does not use a secure conneciton (so it worked with HTTP_proxy), but the Assett Store does require a secrue connection.
     
  10. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    Man, you rock so much! :cool:
    Worked for me too (don't forget to restart Unity after setting user environment variables).
     
    wileymab, pzohner and faisalKhan like this.
  11. PaulStarkey

    PaulStarkey

    Joined:
    Nov 2, 2010
    Posts:
    5
    Hi I am having this same issue at uni. Could you please specify in more detail where you did this (unity files/window files/web files) and if possible give me a quick guide on how to do this.

    I am concerned that if I edit the wrong file I could cause major problems.

    Thanks for the help :)
     
  12. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
  13. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Thanks a lot, Rob!!!
     
  14. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
  15. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,910
    Anyone know how to fix this if you're not behind a proxy?

    I get "Connecting to asset store", then "You Are Currently Offline".

    In the console it reads "Couldn't connect to server url: https://kharma.unity3d.com"

    I also couldn't use Internet Activation when registering, if that helps.
     
  16. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    You must have some kind of network problem on the machine you're using.
    Can you browse internet from it? If yes, check your browser's settings.
     
  17. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,910
    EDIT: It was Comodo firewall. Doh.

    I disabled it and it works.
     
  18. asmith2306

    asmith2306

    Joined:
    Mar 14, 2012
    Posts:
    13
    Thank you! The HTTPS_proxy works.
     
  19. BeHappy

    BeHappy

    Joined:
    Jun 6, 2012
    Posts:
    2
    I tried all this options but nothing seems to work for me :-( Am able to browse all the sites, only update and asset store is not working.....

    If i have one @ symbol in my password, then how to proceed for the suggested value given below ?
    http://username: password@example.com:8080
     
    Last edited: Jun 6, 2012
  20. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    I fixed this on one of my machines by uninstalling *everything* related to Unity - i.e. all folders and registry settings, then doing a fresh install - HOWEVER - what I would recommend trying *first* is to go to your Windows Firewall and deleting all the rules related to Unity, restarting, and then having Unity ask again how you want to handle it connecting to the internet. When I went from 3.5.6 to 4.0, I lost my ability to connect to the Asset Server and Asset Store - but cleaning everything out and reinstalling fixed it. I wish I could be more specific, but when settings are kept in any number of places, it's hard to troubleshoot and it's sometimes better to just start with a clean sheet of paper ;)
     
  21. Cecilie

    Cecilie

    Unity Technologies

    Joined:
    Jul 6, 2012
    Posts:
    83
    For future reference, with non pass through proxies, manual activation usually works. This is prompted by disconnecting from internet before launching Unity.
     
  22. hellcaller

    hellcaller

    Joined:
    May 19, 2010
    Posts:
    381
    Works for me !!! THANX!
     
  23. DryTear

    DryTear

    Joined:
    Nov 30, 2012
    Posts:
    312
    look up "hma" on google
     
  24. Glenn Jennings

    Glenn Jennings

    Joined:
    Jan 31, 2013
    Posts:
    1
  25. maydayn

    maydayn

    Joined:
    Jan 11, 2012
    Posts:
    3
    for another reference, if you have character "@" in your username or password, you should replace it with "%40", because the path will read the first "@" it find.
    and don't forget to restart your computer (not only unity).

    mine was like (username = myusername@mhs.ee.its.ac.id) :
    http_proxy
    http://myusername@mhs.ee.its.ac.id:password@proxyurl:8080

    it works for me (windows 7)
    thanks GFX47, this really saved me :D

    ps: sorry for bad english
     
    bandem13 likes this.
  26. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Thank you for this post and info. It helped me connect to the app store through a proxy.

    To those wondering how to use this and a proxy.pac, put the location of the proxy.pac in the browser. It will open the .pac file, which is basically a text file, and find which proxy you’re using. Use that proxy.

    Windows 7 at least, no need to reboot machine. Just restart Unity, attempt to connect to asset store.
     
    maxinoRoma likes this.
  27. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    Because it took me hours to find out, how this is working on the Mac, I want to share my solution. Maybe it will help someone else:

    I installed a preference pane called "RCEnvironment", which allows the user to add environment variables via a GUI inside the OSX system settings. There you can add variables. But here is the trick: variable names are case sensitive, so if you enter HTTP_proxy, which I did, it will not work. Instead, type in http_proxy.
     
  28. jsnoop

    jsnoop

    Joined:
    Aug 2, 2013
    Posts:
    2
    Hello,

    I am new to Unity and trying to get through the issue of downloading assets from the Asset Store.

    To deal with “You are currently offline” and “Couldn’t connect to server url,” I tried to change the proxy settings as follows:

    -Google chrome internet settings > advanced settings > change proxy settings > LAN settings > Proxy server advanced settings > Servers > Secure:
    At this point, I inserted my own ip address and port 8000 -> <myIPaddress>:8000

    I’m getting the same errors in Unity after restarting the program.

    Can someone walk me through the steps in getting this problem fixed?

    Thanks :) .
     
  29. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
  30. jsnoop

    jsnoop

    Joined:
    Aug 2, 2013
    Posts:
    2
    Thanks, mgear. Just to double-check, I go to:

    Control panel > System properties > Advanced > Environment variables > add new user variable> insert...
    Variable: HTTPS_proxy
    Value: http://www123.123.123.1:8000
    ?

    (assuming my ip address is 123.123.123.1)
     
  31. maddehaan

    maddehaan

    Joined:
    Apr 8, 2014
    Posts:
    1
    Sorry, this not an efficient way. For people having problems with connecting to the License Server, the first thing to do (in Windows) is to go to the Environment Variables and add HTTPS_proxy with value of http://{yourproxy}:{proxyport} (NOT HTTPS://). I added HTTP_proxy with the same values too. After that starting Unity simply worked.

    If you have further problems (you might have had Unity on your system already for some time and it suddenly stopped connecting), you can try the options from jwilliamsen (try them 1 at the time, testing your connection with each change).
     
  32. RobertWPL

    RobertWPL

    Joined:
    Aug 12, 2014
    Posts:
    3
    Super simple and noninvasive solution working inside complicated corporate firewall: create bat file:
    Code (JavaScript):
    1. set HTTP_PROXY="http://user:password@domain.com:port"
    2. set HTTPS_PROXY="http://user:password@domain.com:port"
    3. unity.exe
     
    Last edited: Aug 12, 2014
  33. jcalvert1983

    jcalvert1983

    Joined:
    Aug 13, 2013
    Posts:
    1
    Hi guys,

    please could some one explain to me in very simple terms how i add the environment variables please. I know how to get the the environment variables screen but then im stuck, do i add new variables or do i edit an existing one. Also if i am adding a new variable what do i use as the Variable Name and Variable Value

    Thanks
     
  34. RobertWPL

    RobertWPL

    Joined:
    Aug 12, 2014
    Posts:
    3
    Variables are in window .bat script format. Just literally set HTT... are written in bat file.
     
  35. davidguaita

    davidguaita

    Joined:
    Apr 20, 2013
    Posts:
    6
    Using "set" will only work for that cmd window. If you want to add the variable permanently to the environment, use "setx" instead of set.

    The crucial differences between set and setx are:
    • set takes effect in local cmd context. Meaning once you exit or close the cmd window, you lose the environment variable.
    • setx takes effect in future cmd context. So you won't see the environment variable and its value in the current cmd. You need to open a new cmd window to see it.
     
  36. debashishdeka

    debashishdeka

    Joined:
    Dec 10, 2014
    Posts:
    1
    HIFi method !!!
     
  37. charan

    charan

    Joined:
    Dec 15, 2014
    Posts:
    1
    I Can't able to use assest store after setting up ENV...Please help me to solve this problem.
     
  38. CarlB

    CarlB

    Joined:
    Jan 26, 2015
    Posts:
    6
    When I open a browser, I have to enter a user name, and a password. I connect through VPN and my IP address changes regularlly. It's a set of numbers. If my user name was "FRED", my password was "hello", my IP adress was "123.123.123.123" and my port "11111", would I enter? :
    set HTTP_PROXY=http://FRED:hello@123.123.123.123:11111
    set HTTPS_PROXY=http://FRED:hello@123.123.123.123:11111
    unity.exe

    ...or is the domain different from the IP address? and if so, is the IP adddress no longer needed?
    Also,that would be exposing my password in an unprotected file. Seems like if a password is needed, I should be prompted for it, yes?
     
  39. PostierFou

    PostierFou

    Joined:
    Jan 14, 2015
    Posts:
    2
    Hi all,
    I'm behind a corporate proxy, too, so I've created the two environment variables (I've tried the XXX.XXX.XXX.X:8080 syntax with my IP adress' proxy and his port 8080 and the username:pswd@XXX.XXX.XXX.X:8080) but it doesn't work : I can access to the Asset Store content from Unity but when I try to download something, it only write "Error" with a red background on the progress bar :-\
    It isn't the same error message I have found on the other thread (like your are "offline") so perhaps it's another problem, I really don't know.
    I'm with Unity 5.1 and my technical staff has already opened the com port 80 and 443 for the web site https://kharma.unity3d.com/
    They don't have any clue neither :-/
    So if anyone has encountered the same problem, please help me.

    Thanks :)
     
  40. PostierFou

    PostierFou

    Joined:
    Jan 14, 2015
    Posts:
    2
    Hi,
    I'm still unable to connect to Asset Store from my proxy :-\

    Now I know that my corporate proxy is an old NTLM proxy so does anyone know if it's possible to use this old school proxy with Unity?
    I tried to use a local ntlm proxy named CNTLM.exe and so after I launched it, I changed my two environment variables to point to "127.0.0.1:3128" but it kicked me when I tried to connect :-\


    The log message is a barbarous one:

    Response: 'A0BF3B5CFCFF4CBC9E2586AD5A1BFA09010100000000000080FBE6568
    6C002E006C006F00630061006C00030026006700700072006F00780079002E0070006F0073007
    Response: 'F5EC78D1DCDC35958C520A8335453D5FF11AB90889F73C01' (24)
    Sending headers (5)...
    User-Agent => Unity PackageManager v5.0.1
    Proxy-Connection => keep-alive
    Host => update.unity3d.com
    Proxy-Authorization => NTLM TlRMTVNTUAADAAAAGAAYAGQAAACaAJoAfAAAAA
    fc8AaC/O1z8/0y8niWGrVob+gkBAQAAAAAAAID75laNjNAB8Rq5CIn3PAEAAAAAAgAMAFAATwBTAF
    AAAAAAAAAA=
    No body.

    ******* Round 2 C: 4, S: 5 (authok=0, noauth=0) *******
    Reading headers (5)...
    HEAD: HTTP/1.1 404 Not Found
    Date => Tue, 12 May 2015 08:26:27 GMT
    Server => Apache/2
    Content-Length => 277
    Content-Type => text/html; charset=iso-8859-1
    Via => 1.1 gproxy.postal.local:8080
    Accept-Ranges => none
    Keep-Alive => timeout=5, max=99
    Connection => Keep-Alive
    X-Pad => avoid browser bug
    Sending headers (4)...
    Body included. Length: 277
    data_send: read 277 of 277 / 277 of 277 (errno = ok)
    data_send: wrote 277 of 277
    Body sent.
    PROXY CLOSING CONNECTION
    forward_request: palive=0, authok=1, ntlm=0, closed=0

    Thread finished.
    proxy_thread: request rc = 0xffffffff
    Joining thread 537273752; rc: 0


    Can anyone help me, please? :)

    Thanks a lot!
     
  41. KazYamof

    KazYamof

    Joined:
    Jun 26, 2015
    Posts:
    59
    I can't use unity behind proxy too. I'm got stuck on the login form. Can not connect to server, can not set manual activation, can not open the Editor... I'm using version 5.1.
    Help pls!
     
  42. DrYSG

    DrYSG

    Joined:
    Aug 31, 2015
    Posts:
    2
    I am using 5.1, I am also stuck. Box is windows 7, I have the HTTPS_PROXY envirornment variable set. I am trying to see what the error is, but I cannot watch the traffic with Fiddler (http://www.telerik.com/fiddler) Which tells me you are probably not using WinHTTP. It would be a lot easier for all if you did, then you could pick up the proxy info (and also the user-agent needs to be set for our firewall).
     
  43. kiso19

    kiso19

    Joined:
    Sep 7, 2015
    Posts:
    1
    Environment variables registered, other applications see them.
    5.1 does not see them at all.
    With utilities (wireshark) looked at communications with the proxy server.
    The first is a GET request to Google Analytics.
    Proxy returns a 407 code - a request for proxy authorization.
    The application must take the environment variable and carry authorization. Under normal circumstances, there is an additional attribute GET request - Proxy-Authorization. I tested this by writing additional program that connects to googl.com. The program took http proxy value of the environment variable (http_proxy).
    In my case, it seems that Unity does not see the environment variables.
    Because the application simply repeats GET request without adding Proxy-Authorization attribute.

    Operation system is Win 7 32 bit proff.
     
  44. Scoobaru

    Scoobaru

    Joined:
    Aug 29, 2013
    Posts:
    7
    I also can't use the asset store behind my corporate firewall. Tried the BAT method, no luck.
     
  45. RyanPaul1234

    RyanPaul1234

    Joined:
    Jul 20, 2015
    Posts:
    2
    It worked for me.
    Just Create New ENV Variable like this;
    Open "Control Panel"
    Goto "System and Security"
    Goto "System"
    Click on "Advanced system setting"
    In the "Advanced" tab click "Environment Variables"
    At the top section which contains something like, "User Variables for [your Username]"
    click "New" which is right below it.
    Then set "Variable name" to "HTTPS_proxy"
    while the "Variable Value" should be in this format "http://"Your Proxy Ip/Url:"proxy port"
    WITHOUT THE QUOTES!!!!!
    Restart Unity........That's it
     
    KronosInformatica likes this.
  46. andrew_moran

    andrew_moran

    Joined:
    Jan 2, 2013
    Posts:
    2
    Here is my Mac equivalent (running Yosemite 10.10),
    You need to also setup user environment variables for your login session (look at Environment variables in Yosemite):
    - Edit "~/.MacOSX/environment.plist" (Note that .MacOSX is hidden and located at root of login user)
    - Add corresponding key, value pair as mentioned in the previous post:
    - My plist file looks like the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>HTTPS_proxy</key>
    <string>http://"proxy_ip":"proxy_port"</string>
    </dict>
    </plist>
    Where the quoted placeholders should be your correct proxy ip and port.
    - Restart user session by logging out and/or restarting computer
    - Start Unity
     
  47. Gorgoth

    Gorgoth

    Joined:
    Jul 20, 2015
    Posts:
    8
    Actually i have the same problem with the proxy. But for me it seems like the asset stores "forgets" to make the proxy auth calls: HTTP 305 CONNECT core.cloud.unity3d.com:443 HTTP/1.1 and HTTP/1.1 407 Proxy Authentication Required (text/html) and thats it. The connect request misses the proxy basic auth completely.
     
  48. nVinyl

    nVinyl

    Joined:
    Jul 20, 2016
    Posts:
    1
    Unity connects through our proxy fine with the above measures but errors whenever trying to download anything from the store. Through packet captures the download is trying to go direct over 80 to a random address (the one in our capture is 54.231.82.66).

    Is there another step we can take to make the downloads go through the proxy? As already stated, have tried all suggestions in this thread.
     
  49. hsousa

    hsousa

    Joined:
    Mar 1, 2017
    Posts:
    1

    ATTENTION!!

    I lost a lot of time trying to figure out why this wasn't working... turns out I had to REMOVE the "" or it would NOT work!

    Code (JavaScript):
    1. set HTTP_PROXY=http://user:password@domain.com:port
    2. set HTTPS_PROXY=http://user:password@domain.com:port
    3. unity.exe
     
  50. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
    Unity has not fixed this since forever. This makes working with Unity on a corporate network hell. This needs to be fixed asap! Is there any official bug report on this? Surely this cannot be by design. Unity should be agnostic to which network interface it uses. Jesus... unbelievable..
     
    ariyuan, valvestater65 and pjw_unity like this.