Search Unity

UWP Unity Engine WWW proxy.

Discussion in 'Windows' started by BorisMulev, May 23, 2017.

  1. BorisMulev

    BorisMulev

    Joined:
    May 23, 2017
    Posts:
    15
    How to set proxy settings WWW ?
    Sample does not work:
    1. IEnumerator checkInternetConnection(Action<bool> action)
    2. {
    3. WWW www = new WWW("http://google.com");
    4. yield return www;
    5. if (www.error != null) {
    6. action (false);
    7. } else {
    8. action (true);
    9. }
    10. }
    Sample work fine:
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
    request.Timeout = 5000;
    request.Credentials = CredentialCache.DefaultNetworkCredentials;
    ....


    Or I can not use WWW
    how it will look like checkInternetConnection ?
    Interested in the line yield return www;
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Proxies are not supported in WWW on UWP platform.
     
  3. BorisMulev

    BorisMulev

    Joined:
    May 23, 2017
    Posts:
    15
    Why doesn't it take the default proxy settings (Like any Internet (Client) in the UWP)?

    Many of games are used in schools where participates proxy settings.(it is very important for me)

    On android and IOS, there is no such problem, they are working normally with proxy settings, this bug WWW in UWP..

    This problem will be solved in the future?
     
  4. BorisMulev

    BorisMulev

    Joined:
    May 23, 2017
    Posts:
    15
    Example Internet (Client) in the UWP:

    HttpClientHandler handler = new HttpClientHandler();
    handler.UseDefaultCredentials = true;
    HttpClient client = new HttpClient(handler);

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
    request.Credentials = CredentialCache.DefaultNetworkCredentials;
     
  5. BorisMulev

    BorisMulev

    Joined:
    May 23, 2017
    Posts:
    15
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I agree we should support this. Could you file a bug report so it doesn't get lost?
     
  7. soundscouts

    soundscouts

    Joined:
    Apr 6, 2016
    Posts:
    7
    Greetings, wondering if a bug report was filed for this, and if so, where can I vote and track it?

    My initial trials seemed to indicate that UnityWebRequest does actually use the device proxy by default, so does this mean that it fails only with WWW or when using UWP ?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I don't believe we ever received a bug report. Could you file one?