Search Unity

Unity, UnityWebRequest and Proxies

Discussion in 'Editor & General Support' started by NeonOby, Mar 14, 2019.

  1. NeonOby

    NeonOby

    Joined:
    Mar 9, 2018
    Posts:
    2
    It seems like nobody really solved the problems described in this thread:
    https://forum.unity.com/threads/make-web-requests-with-a-proxy.550813/
    And crol got ignored.

    How can you override or set the proxy when using UnityWebRequest?
    If we can't, why?

    How can you set the proxy credentials when using UnityWebRequest?
    Setting "Proxy-Authentication" header does not work, you will get:
    InvalidOperationException: Cannot override system-specified headers

    How can you set the proxy credentials for Unity services?
    User reporting and analytics do not work behind a proxy because we can't set the credentials.

    Thanks for any help
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Which platform is this on?
    Proxy settings are supposed to be configured on OS and Unity should pick them. Weirdly, it is not documented...
    I don't know the exact reason for this, but my guess it is to prevent people from shoot themselves in the foot.
    If you can provide a good use case, this restriction could be removed.
     
  3. NeonOby

    NeonOby

    Joined:
    Mar 9, 2018
    Posts:
    2
    Currently we are testing this on Windows 10 Standalone. But iOS and Android are a prioritity as well.

    Our apps are mostly used in a business environment, inside a corporate network often with proxy.
    These proxies often require some kind of authentication.
    Some clients might add whitelists for our apps some don't.

    The problem isn't that proxies aren't used, but that we can not set the credentials.
    Services like user reporting, unitywebrequest etc. break if authentication is required.
    For this situations we added a form where the user can enter his or her proxy credentials.
    This works for our own requests to our backend, but we can't forward this information to unity.
    This seems to be normal behaviour as you can see in other apps like
    • Chrome or other browsers: Credential popup if needed
    • Adobe Creative Cloud: Asks for proxy credentials if needed
    Default Credentials do not work in every situation.


    If this is not considered best-practice, what is?
    How are we supposed to get our apps to work in a network environment where users have to
    specify proxy credentials?
     
    mowax74 and StefanNetzler like this.
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Please report this as a bug.
     
  5. Banglemoose

    Banglemoose

    Joined:
    Dec 9, 2014
    Posts:
    9
    @NeonOby Was there ever a follow up to this?
     
    mowax74 likes this.
  6. chris_hull

    chris_hull

    Joined:
    Mar 13, 2020
    Posts:
    2
    was this ever resolved or whats the work around for this, similar proxy issue
     
    mowax74 likes this.
  7. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    Is there any progress on this?

    Bye,

    Jean
     
    mowax74 likes this.
  8. javier-next

    javier-next

    Joined:
    Mar 30, 2021
    Posts:
    6
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I believe the request was to submit a bug. Then post the BugID here.
     
  10. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    javier-next likes this.
  11. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    This is not the case for major corporates and their IT strategies, we made several requests to explain how their proxies was setup, and took pleasure in never telling us, probably for security reasons...

    I am surprised that we all the new clients in automotive you have, you did not get any feedback for this. if you ask some of your fields engineers to check on that when thy have a chance, you will get to the same conclusion. Or Maybe these clients make applications that never really needs/can't access online data ( rules made up by the same security guys who setup the proxies and responsible for security).

    So UnityHttpRequest should provide proxy support inside its class.

    Bye,

    Jean
     
    Zaicheg, chrismarch and javier-next like this.