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
bde005da
Commit
bde005da
authored
Nov 21, 2017
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netstandard2 proxy start fix
parent
bfb66f70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+11
-16
No files found.
Titanium.Web.Proxy/ProxyServer.cs
View file @
bde005da
...
...
@@ -34,11 +34,6 @@ namespace Titanium.Web.Proxy
internal
const
string
UriSchemeHttps
=
"https"
;
#endif
/// <summary>
/// Is the proxy currently running
/// </summary>
private
bool
proxyRunning
{
get
;
set
;
}
/// <summary>
/// An default exception log func
/// </summary>
...
...
@@ -225,7 +220,7 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Is the proxy currently running
/// </summary>
public
bool
ProxyRunning
=>
proxyRunning
;
public
bool
ProxyRunning
{
get
;
private
set
;
}
/// <summary>
/// Gets or sets a value indicating whether requests will be chained to upstream gateway.
...
...
@@ -354,7 +349,7 @@ namespace Titanium.Web.Proxy
ProxyEndPoints
.
Add
(
endPoint
);
if
(
p
roxyRunning
)
if
(
P
roxyRunning
)
{
Listen
(
endPoint
);
}
...
...
@@ -374,7 +369,7 @@ namespace Titanium.Web.Proxy
ProxyEndPoints
.
Remove
(
endPoint
);
if
(
p
roxyRunning
)
if
(
P
roxyRunning
)
{
QuitListen
(
endPoint
);
}
...
...
@@ -533,7 +528,7 @@ namespace Titanium.Web.Proxy
/// </summary>
public
void
Start
()
{
if
(
p
roxyRunning
)
if
(
P
roxyRunning
)
{
throw
new
Exception
(
"Proxy is already running."
);
}
...
...
@@ -575,6 +570,8 @@ namespace Titanium.Web.Proxy
}
#endif
ProxyRunning
=
true
;
foreach
(
var
endPoint
in
ProxyEndPoints
)
{
Listen
(
endPoint
);
...
...
@@ -587,8 +584,6 @@ namespace Titanium.Web.Proxy
//clear orphaned windows auth states every 2 minutes
WinAuthEndPoint
.
ClearIdleStates
(
2
);
}
proxyRunning
=
true
;
}
...
...
@@ -597,7 +592,7 @@ namespace Titanium.Web.Proxy
/// </summary>
public
void
Stop
()
{
if
(!
p
roxyRunning
)
if
(!
P
roxyRunning
)
{
throw
new
Exception
(
"Proxy is not running."
);
}
...
...
@@ -623,7 +618,7 @@ namespace Titanium.Web.Proxy
CertificateManager
?.
StopClearIdleCertificates
();
p
roxyRunning
=
false
;
P
roxyRunning
=
false
;
}
/// <summary>
...
...
@@ -653,7 +648,7 @@ namespace Titanium.Web.Proxy
/// </summary>
public
void
Dispose
()
{
if
(
p
roxyRunning
)
if
(
P
roxyRunning
)
{
Stop
();
}
...
...
@@ -683,7 +678,7 @@ namespace Titanium.Web.Proxy
endPoint
.
Port
=
((
IPEndPoint
)
endPoint
.
Listener
.
LocalEndpoint
).
Port
;
while
(
p
roxyRunning
)
while
(
P
roxyRunning
)
{
try
{
...
...
@@ -712,7 +707,7 @@ namespace Titanium.Web.Proxy
throw
new
Exception
(
"Cannot set endPoints not added to proxy as system proxy"
);
}
if
(!
p
roxyRunning
)
if
(!
P
roxyRunning
)
{
throw
new
Exception
(
"Cannot set system proxy settings before proxy has been started."
);
}
...
...
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