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
08167b4d
Unverified
Commit
08167b4d
authored
Sep 27, 2018
by
Jehonathan Thomas
Committed by
GitHub
Sep 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #496 from justcoding121/master
Dns resolve from code
parents
c3fc1d35
fb33defa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
36 deletions
+61
-36
settings.json
.vscode/settings.json
+2
-2
omnisharp.json
omnisharp.json
+1
-0
TcpConnectionFactory.cs
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+52
-28
ProxyServer.cs
src/Titanium.Web.Proxy/ProxyServer.cs
+1
-3
RequestHandler.cs
src/Titanium.Web.Proxy/RequestHandler.cs
+3
-1
TransparentClientHandler.cs
src/Titanium.Web.Proxy/TransparentClientHandler.cs
+2
-2
No files found.
.vscode/settings.json
View file @
08167b4d
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"**/*.Basic.csproj/"
:
true
,
"**/*.Basic.csproj/"
:
true
,
"**/*.Docs.csproj/"
:
true
,
"**/*.Docs.csproj/"
:
true
,
"**/*.Proxy.csproj/"
:
true
,
"**/*.Proxy.csproj/"
:
true
,
"**/*.
Proxy
.csproj"
:
true
"**/*.
Mono
.csproj"
:
true
},
},
"search.exclude"
:
{
"search.exclude"
:
{
"**/.build"
:
true
,
"**/.build"
:
true
,
...
@@ -32,6 +32,6 @@
...
@@ -32,6 +32,6 @@
"**/*.Basic.csproj/"
:
true
,
"**/*.Basic.csproj/"
:
true
,
"**/*.Docs.csproj/"
:
true
,
"**/*.Docs.csproj/"
:
true
,
"**/*.Proxy.csproj/"
:
true
,
"**/*.Proxy.csproj/"
:
true
,
"**/*.
Proxy
.csproj"
:
true
"**/*.
Mono
.csproj"
:
true
}
}
}
}
\ No newline at end of file
omnisharp.json
View file @
08167b4d
{
{
"fileOptions"
:
{
"fileOptions"
:
{
"excludeSearchPatterns"
:
[
"excludeSearchPatterns"
:
[
"**/*.sln"
,
"**/*.Docs.csproj"
,
"**/*.Docs.csproj"
,
"**/tests/"
,
"**/tests/"
,
"**/Titanium.Web.Proxy.Examples.Wpf/"
,
"**/Titanium.Web.Proxy.Examples.Wpf/"
,
...
...
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
08167b4d
This diff is collapsed.
Click to expand it.
src/Titanium.Web.Proxy/ProxyServer.cs
View file @
08167b4d
...
@@ -94,8 +94,6 @@ namespace Titanium.Web.Proxy
...
@@ -94,8 +94,6 @@ namespace Titanium.Web.Proxy
bool
userTrustRootCertificate
=
true
,
bool
machineTrustRootCertificate
=
false
,
bool
userTrustRootCertificate
=
true
,
bool
machineTrustRootCertificate
=
false
,
bool
trustRootCertificateAsAdmin
=
false
)
bool
trustRootCertificateAsAdmin
=
false
)
{
{
// default values
ConnectionTimeOutSeconds
=
60
;
if
(
BufferPool
==
null
)
if
(
BufferPool
==
null
)
{
{
...
@@ -186,7 +184,7 @@ namespace Titanium.Web.Proxy
...
@@ -186,7 +184,7 @@ namespace Titanium.Web.Proxy
/// This will also determine the pool eviction time when connection pool is enabled.
/// This will also determine the pool eviction time when connection pool is enabled.
/// Default value is 60 seconds.
/// Default value is 60 seconds.
/// </summary>
/// </summary>
public
int
ConnectionTimeOutSeconds
{
get
;
set
;
}
public
int
ConnectionTimeOutSeconds
{
get
;
set
;
}
=
60
;
/// <summary>
/// <summary>
/// Maximum number of concurrent connections per remote host in cache.
/// Maximum number of concurrent connections per remote host in cache.
...
...
src/Titanium.Web.Proxy/RequestHandler.cs
View file @
08167b4d
...
@@ -207,7 +207,7 @@ namespace Titanium.Web.Proxy
...
@@ -207,7 +207,7 @@ namespace Titanium.Web.Proxy
//for connection pool, retry fails until cache is exhausted.
//for connection pool, retry fails until cache is exhausted.
var
result
=
await
retryPolicy
<
ServerConnectionException
>().
ExecuteAsync
(
async
(
serverConnection
)
=>
var
result
=
await
retryPolicy
<
ServerConnectionException
>().
ExecuteAsync
(
async
(
serverConnection
)
=>
{
{
args
.
TimeLine
[
"
Server Connection Created
"
]
=
DateTime
.
Now
;
args
.
TimeLine
[
"
Connection Ready
"
]
=
DateTime
.
Now
;
// if upgrading to websocket then relay the request without reading the contents
// if upgrading to websocket then relay the request without reading the contents
if
(
request
.
UpgradeToWebSocket
)
if
(
request
.
UpgradeToWebSocket
)
...
@@ -369,6 +369,8 @@ namespace Titanium.Web.Proxy
...
@@ -369,6 +369,8 @@ namespace Titanium.Web.Proxy
}
}
}
}
args
.
TimeLine
[
"Request Sent"
]
=
DateTime
.
Now
;
// If not expectation failed response was returned by server then parse response
// If not expectation failed response was returned by server then parse response
if
(!
request
.
ExpectationFailed
)
if
(!
request
.
ExpectationFailed
)
{
{
...
...
src/Titanium.Web.Proxy/TransparentClientHandler.cs
View file @
08167b4d
...
@@ -69,7 +69,7 @@ namespace Titanium.Web.Proxy
...
@@ -69,7 +69,7 @@ namespace Titanium.Web.Proxy
//it could cause floating server connections when client exits
//it could cause floating server connections when client exits
prefetchConnectionTask
=
tcpConnectionFactory
.
GetServerConnection
(
httpsHostName
,
endPoint
.
Port
,
prefetchConnectionTask
=
tcpConnectionFactory
.
GetServerConnection
(
httpsHostName
,
endPoint
.
Port
,
httpVersion
:
null
,
isHttps
:
true
,
applicationProtocols
:
null
,
isConnect
:
false
,
httpVersion
:
null
,
isHttps
:
true
,
applicationProtocols
:
null
,
isConnect
:
false
,
proxyServer
:
this
,
upStreamEndPoint
:
UpStreamEndPoint
,
externalProxy
:
UpStreamHttpsProxy
,
proxyServer
:
this
,
session
:
null
,
upStreamEndPoint
:
UpStreamEndPoint
,
externalProxy
:
UpStreamHttpsProxy
,
noCache
:
false
,
cancellationToken
:
CancellationToken
.
None
);
noCache
:
false
,
cancellationToken
:
CancellationToken
.
None
);
}
}
...
@@ -102,7 +102,7 @@ namespace Titanium.Web.Proxy
...
@@ -102,7 +102,7 @@ namespace Titanium.Web.Proxy
{
{
var
connection
=
await
tcpConnectionFactory
.
GetServerConnection
(
httpsHostName
,
endPoint
.
Port
,
var
connection
=
await
tcpConnectionFactory
.
GetServerConnection
(
httpsHostName
,
endPoint
.
Port
,
httpVersion
:
null
,
isHttps
:
false
,
applicationProtocols
:
null
,
httpVersion
:
null
,
isHttps
:
false
,
applicationProtocols
:
null
,
isConnect
:
true
,
proxyServer
:
this
,
upStreamEndPoint
:
UpStreamEndPoint
,
isConnect
:
true
,
proxyServer
:
this
,
session
:
null
,
upStreamEndPoint
:
UpStreamEndPoint
,
externalProxy
:
UpStreamHttpsProxy
,
noCache
:
true
,
cancellationToken
:
cancellationToken
);
externalProxy
:
UpStreamHttpsProxy
,
noCache
:
true
,
cancellationToken
:
cancellationToken
);
try
try
...
...
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