Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with a proxy #495

Open
wightwhale opened this issue Feb 6, 2023 · 2 comments
Open

Doesn't work with a proxy #495

wightwhale opened this issue Feb 6, 2023 · 2 comments

Comments

@wightwhale
Copy link

I can't get this plugin to work behind a proxy. I've tried changing the config files to use the proxy but it doesn't seem to make a difference. Visual Studio has a popup that lets you enter username and password to bypass the proxy.

@JoC0de
Copy link
Collaborator

JoC0de commented Feb 7, 2023

Hi, what type of proxy do you try to use? We are simply using Unity's web request classes that should respect your system proxy settings. Also things like the HTTP_PROXY environment variable should be considered. Currently we don't support changing the proxy inside the NuGet.config file.

@wightwhale
Copy link
Author

wightwhale commented Feb 7, 2023

I receive the following error when trying to use the plugin through the proxy here at work.
Curl error 56: Received HTTP code 407 from proxy after CONNECT

I have the http_proxy and https_proxy environment variables set and they work with the unity package manager. The proxy here requires a user and pw to bypass it. ex. http://username:[email protected]:8080

On some packages when I hit install nothing happens while on others I get this error message.

Unable to install package DotNetCross.Memory.Unsafe 0.3.1
System.Net.WebException: (407) Proxy Authentication Required
at System.Net.WebConnectionTunnel.Initialize (System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) [0x004a3] in :0
at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x00207] in :0
at System.Net.WebConnection.InitConnection (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x00141] in :0
at System.Net.WebOperation.Run () [0x0009a] in :0
at System.Net.WebCompletionSource1[T].WaitForCompletion () [0x00094] in <bbae6af52a2a4bd982f8fde9721d2c3b>:0 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <bbae6af52a2a4bd982f8fde9721d2c3b>:0 at System.Net.HttpWebRequest.GetResponse () [0x00016] in <bbae6af52a2a4bd982f8fde9721d2c3b>:0 at NugetForUnity.NugetHelper.RequestUrl (System.String url, System.String userName, System.String password, System.Nullable1[T] timeOut) [0x000c0] in <52f11524b7d74432afd0486e05bd92cc>:0
at NugetForUnity.NugetHelper.Install (NugetForUnity.NugetPackage package, System.Boolean refreshAssets) [0x00336] in <52f11524b7d74432afd0486e05bd92cc>:0
UnityEngine.Debug:LogErrorFormat (string,object[])
NugetForUnity.NugetHelper:Install (NugetForUnity.NugetPackage,bool)
NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool)
NugetForUnity.NugetWindow:DrawPackage (NugetForUnity.NugetPackage,UnityEngine.GUIStyle,UnityEngine.GUIStyle)
NugetForUnity.NugetWindow:DrawPackages (System.Collections.Generic.List`1<NugetForUnity.NugetPackage>)
NugetForUnity.NugetWindow:DrawOnline ()
NugetForUnity.NugetWindow:OnGUI ()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

k6a added a commit to k6a/NuGetForUnity that referenced this issue Jan 28, 2024
* addresses proxy connection issue GlitchEnzo#495
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants