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
b7b7adc9
Commit
b7b7adc9
authored
Sep 23, 2020
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
4843bceb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
TcpConnectionFactory.cs
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+3
-4
No files found.
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
b7b7adc9
...
...
@@ -287,7 +287,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
CancellationToken
cancellationToken
)
{
// deny connection to proxy end points to avoid infinite connection loop.
if
(
Server
.
ProxyEndPoints
.
Any
(
x
=>
x
.
Port
==
remotePort
)
if
(
Server
.
ProxyEndPoints
.
Any
(
x
=>
x
.
Port
==
remotePort
)
&&
NetworkHelper
.
IsLocalIpAddress
(
remoteHostName
))
{
throw
new
Exception
(
$"A client is making HTTP request to one of the listening ports of this proxy
{
remoteHostName
}
:
{
remotePort
}
"
);
...
...
@@ -334,7 +334,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
bool
retry
=
true
;
var
enabledSslProtocols
=
sslProtocol
;
retry
:
retry
:
try
{
bool
socks
=
externalProxy
!=
null
&&
externalProxy
.
ProxyType
!=
ExternalProxyType
.
Http
;
...
...
@@ -807,8 +807,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
return
((
ProxySocket
.
ProxySocket
)
state
).
BeginConnect
(
address
,
port
,
requestCallback
,
state
);
}
static
IAsyncResult
beginConnect
(
string
hostName
,
int
port
,
AsyncCallback
requestCallback
,
object
state
)
static
IAsyncResult
beginConnect
(
string
hostName
,
int
port
,
AsyncCallback
requestCallback
,
object
state
)
{
return
((
ProxySocket
.
ProxySocket
)
state
).
BeginConnect
(
hostName
,
port
,
requestCallback
,
state
);
}
...
...
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