Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
a5f42d7f
Commit
a5f42d7f
authored
Aug 12, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server connection hack: try to use tls1.0 when tls 1.2 fails
parent
c7e34cc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
TcpConnectionFactory.cs
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+13
-1
No files found.
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
a5f42d7f
using
System
;
using
System.Collections.Concurrent
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net.Security
;
using
System.Net.Sockets
;
using
System.Security.Authentication
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
@@ -266,6 +268,10 @@ namespace Titanium.Web.Proxy.Network.Tcp
SslApplicationProtocol
negotiatedApplicationProtocol
=
default
;
bool
retry
=
true
;
var
enabledSslProtocols
=
proxyServer
.
SupportedSslProtocols
;
retry
:
try
{
tcpClient
=
new
TcpClient
(
upStreamEndPoint
)
...
...
@@ -365,7 +371,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
ApplicationProtocols
=
applicationProtocols
,
TargetHost
=
remoteHostName
,
ClientCertificates
=
null
,
EnabledSslProtocols
=
proxyServer
.
Support
edSslProtocols
,
EnabledSslProtocols
=
enabl
edSslProtocols
,
CertificateRevocationCheckMode
=
proxyServer
.
CheckCertificateRevocation
};
await
sslStream
.
AuthenticateAsClientAsync
(
options
,
cancellationToken
);
...
...
@@ -380,6 +386,12 @@ namespace Titanium.Web.Proxy.Network.Tcp
}
}
catch
(
IOException
ex
)
when
(
ex
.
HResult
==
unchecked
((
int
)
0x80131620
)
&&
retry
)
{
enabledSslProtocols
=
SslProtocols
.
Tls
;
retry
=
false
;
goto
retry
;
}
catch
(
Exception
)
{
stream
?.
Dispose
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment