Using WWW with a Proxy

  • I want to use WWW with a Proxy in players (runtime), but it does not work. (Not WebPlayer)
If you use WWW with a Proxy in players (runntime, not WebPlayer) it may fail.
WebPlayer takes the Proxy settings from the browser automatically. Other players (runtime) work differently and cannot use a Proxy. Therefore you can use this workaround with the WebClient and WebProxy classes and still use the Proxy:
string yourURL = "";
WebClient client = new WebClient();

WebProxy proxy = new WebProxy(""); // you can use
// check proxy.Credentials property and NetworkCredential class if you proxy uses user/password

client.Proxy = proxy;

With this code, you can use WebProxy.Credentials and the NetworkCredential class to set user/password info.

More Information
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


  • 1

    My situation is similar to yours. Tell me, my provider ( is suitable for solving problems, or needs a specific service provider?

  • 1
    Juan Diego Uran

    Hi Mirokia, you could use any proxy provider, so it should work with your provider.

  • 0
    Bruno Gonçalves Corte

    Doesn't work when building for Windows Holographic.

    I get the error:

    The type or namespace name 'WebClient' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

    Any other options?

Please sign in to leave a comment.