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
c525dda7
Commit
c525dda7
authored
Jun 03, 2016
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
let users change timeout minutes
parent
e4dfa442
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
CertificateManager.cs
Titanium.Web.Proxy/Helpers/CertificateManager.cs
+1
-1
TcpConnectionManager.cs
Titanium.Web.Proxy/Network/TcpConnectionManager.cs
+1
-1
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+13
-1
No files found.
Titanium.Web.Proxy/Helpers/CertificateManager.cs
View file @
c525dda7
...
@@ -235,7 +235,7 @@ namespace Titanium.Web.Proxy.Helpers
...
@@ -235,7 +235,7 @@ namespace Titanium.Web.Proxy.Helpers
try
try
{
{
var
cutOff
=
DateTime
.
Now
.
Add
Seconds
(-
60
);
var
cutOff
=
DateTime
.
Now
.
Add
Minutes
(-
1
*
ProxyServer
.
CertificateCacheTimeOutMinutes
);
var
outdated
=
certificateCache
var
outdated
=
certificateCache
.
Where
(
x
=>
x
.
Value
.
LastAccess
<
cutOff
)
.
Where
(
x
=>
x
.
Value
.
LastAccess
<
cutOff
)
...
...
Titanium.Web.Proxy/Network/TcpConnectionManager.cs
View file @
c525dda7
...
@@ -206,7 +206,7 @@ namespace Titanium.Web.Proxy.Network
...
@@ -206,7 +206,7 @@ namespace Titanium.Web.Proxy.Network
await
connectionAccessLock
.
WaitAsync
();
await
connectionAccessLock
.
WaitAsync
();
try
try
{
{
var
cutOff
=
DateTime
.
Now
.
Add
Seconds
(-
60
);
var
cutOff
=
DateTime
.
Now
.
Add
Minutes
(-
1
*
ProxyServer
.
ConnectionCacheTimeOutMinutes
);
connectionCache
connectionCache
.
SelectMany
(
x
=>
x
.
Value
)
.
SelectMany
(
x
=>
x
.
Value
)
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
c525dda7
...
@@ -22,6 +22,8 @@ namespace Titanium.Web.Proxy
...
@@ -22,6 +22,8 @@ namespace Titanium.Web.Proxy
static
ProxyServer
()
static
ProxyServer
()
{
{
ProxyEndPoints
=
new
List
<
ProxyEndPoint
>();
ProxyEndPoints
=
new
List
<
ProxyEndPoint
>();
ConnectionCacheTimeOutMinutes
=
3
;
CertificateCacheTimeOutMinutes
=
60
;
}
}
private
static
CertificateManager
CertManager
{
get
;
set
;
}
private
static
CertificateManager
CertManager
{
get
;
set
;
}
...
@@ -33,6 +35,16 @@ namespace Titanium.Web.Proxy
...
@@ -33,6 +35,16 @@ namespace Titanium.Web.Proxy
public
static
string
RootCertificateName
{
get
;
set
;
}
public
static
string
RootCertificateName
{
get
;
set
;
}
public
static
bool
Enable100ContinueBehaviour
{
get
;
set
;
}
public
static
bool
Enable100ContinueBehaviour
{
get
;
set
;
}
/// <summary>
/// Minutes TCP connection cache to servers to be kept alive when in idle state
/// </summary>
public
static
int
ConnectionCacheTimeOutMinutes
{
get
;
set
;
}
/// <summary>
/// Minutes certificates should be kept in cache when not used
/// </summary>
public
static
int
CertificateCacheTimeOutMinutes
{
get
;
set
;
}
public
static
event
Func
<
object
,
SessionEventArgs
,
Task
>
BeforeRequest
;
public
static
event
Func
<
object
,
SessionEventArgs
,
Task
>
BeforeRequest
;
public
static
event
Func
<
object
,
SessionEventArgs
,
Task
>
BeforeResponse
;
public
static
event
Func
<
object
,
SessionEventArgs
,
Task
>
BeforeResponse
;
...
...
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