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
b1aea826
Commit
b1aea826
authored
Jul 31, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#466 disable socket reuse for linux
parent
51a8e576
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
RunTime.cs
Titanium.Web.Proxy/Helpers/RunTime.cs
+9
-0
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+8
-2
No files found.
Titanium.Web.Proxy/Helpers/RunTime.cs
View file @
b1aea826
...
...
@@ -23,6 +23,9 @@ namespace Titanium.Web.Proxy.Helpers
/// <returns></returns>
private
static
readonly
Lazy
<
bool
>
isRunningOnWindows
=
new
Lazy
<
bool
>(()
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Windows
));
private
static
readonly
Lazy
<
bool
>
isRunningOnLinux
=
new
Lazy
<
bool
>(()
=>
RuntimeInformation
.
IsOSPlatform
(
OSPlatform
.
Linux
));
#endif
/// <summary>
...
...
@@ -30,6 +33,12 @@ private static readonly Lazy<bool> isRunningOnWindows
/// </summary>
internal
static
bool
IsRunningOnMono
=>
isRunningOnMono
.
Value
;
#if NETSTANDARD2_0
internal
static
bool
IsLinux
=>
isRunningOnLinux
.
Value
;
#else
internal
static
bool
IsLinux
=>
!
IsWindows
;
#endif
#if NETSTANDARD2_0
internal
static
bool
IsWindows
=>
isRunningOnWindows
.
Value
;
#else
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
b1aea826
...
...
@@ -109,6 +109,12 @@ namespace Titanium.Web.Proxy
systemProxySettingsManager
=
new
SystemProxyManager
();
}
//linux have bug with socket reuse
if
(!
RunTime
.
IsLinux
)
{
ReuseSocket
=
true
;
}
CertificateManager
=
new
CertificateManager
(
rootCertificateName
,
rootCertificateIssuerName
,
userTrustRootCertificate
,
machineTrustRootCertificate
,
trustRootCertificateAsAdmin
,
ExceptionFunc
);
}
...
...
@@ -194,9 +200,9 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Should we resues client/server tcp sockets.
/// Default is true.
/// Default is true
(false for linux due to bug in .Net core)
.
/// </summary>
public
bool
ReuseSocket
{
get
;
set
;
}
=
true
;
public
bool
ReuseSocket
{
get
;
set
;
}
/// <summary>
/// Total number of active client connections.
...
...
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