You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.
I'm trying to create a local proxy service based on the WindowsService example to overcome limitations in my company.
Every PC is set up with a PAC URL that contains what proxy to use for each destination. This is what a correct request to the outside world looks like:
Based on the example provided, this is what I've written:
protectedoverridevoidOnStart(string[]args){proxyServerInstance=new(userTrustRootCertificate:false){CheckCertificateRevocation=X509RevocationMode.NoCheck,ConnectionTimeOutSeconds=30,Enable100ContinueBehaviour=true,EnableConnectionPool=true,EnableTcpServerConnectionPrefetch=true,EnableWinAuth=true,ForwardToUpstreamGateway=true,MaxCachedConnections=2,ReuseSocket=true,TcpTimeWaitSeconds=30,EnableHttp2=true,NoDelay=true,ThreadPoolWorkerThread=Environment.ProcessorCount,ExceptionFunc=ProxyException,};proxyServerInstance.CertificateManager.SaveFakeCertificates=false;varexplicitEndPointV4=newExplicitProxyEndPoint(IPAddress.Loopback,ListeningPort,false);proxyServerInstance.AddEndPoint(explicitEndPointV4);varexplicitEndPointV6=newExplicitProxyEndPoint(IPAddress.IPv6Loopback,ListeningPort,false);proxyServerInstance.AddEndPoint(explicitEndPointV6);proxyServerInstance.Start();
#if DEBUGConsole.WriteLine($"Service Listening on port {ListeningPort}");
#else
ProxyServiceEventLog.WriteEntry($"Service Listening on port {ListeningPort}",EventLogEntryType.Information);
#endif
}
However the exception Upstream proxy failed to create a secure tunnel is raised.
I guess the problem here is the upstream proxy replying with 407 rather then 401, but I have limited debugging capabilities (work PC) and it's hard to investigate further.
Can someone please help me troubleshoot this? I'm using .NET Core 6 (can't install full Visual Studio) and Titanium 3.2.0.
The text was updated successfully, but these errors were encountered:
As you can see the proxy server itself replies with supported authentication mechanisms and I've seen some RetryLogic in the code base, but it would be much easier to implement with a few hints on how to do it.
SamuelePilleri
changed the title
EnableWinAuth 407 ProxyAuthenticationRequired
Support NTLM/Kerberos upstream proxy authentication
Jan 5, 2023
I'm trying to create a local proxy service based on the WindowsService example to overcome limitations in my company.
Every PC is set up with a PAC URL that contains what proxy to use for each destination. This is what a correct request to the outside world looks like:
Based on the example provided, this is what I've written:
However the exception
Upstream proxy failed to create a secure tunnel
is raised.titanium-web-proxy/src/Titanium.Web.Proxy/Network/TcpConnection/TcpConnectionFactory.cs
Line 519 in 902504a
Looking at the code it may depend on how Windows authentication is handled.
titanium-web-proxy/src/Titanium.Web.Proxy/ResponseHandler.cs
Lines 40 to 47 in 902504a
I guess the problem here is the upstream proxy replying with 407 rather then 401, but I have limited debugging capabilities (work PC) and it's hard to investigate further.
Can someone please help me troubleshoot this? I'm using .NET Core 6 (can't install full Visual Studio) and Titanium 3.2.0.
The text was updated successfully, but these errors were encountered: