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
2a7c1f91
Commit
2a7c1f91
authored
May 19, 2017
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#242 correctly disallow connecting to external proxy via external proxy
parent
a3562f03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
ProxyTestController.cs
.../Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
+2
-2
TcpConnectionFactory.cs
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+5
-5
No files found.
Examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
View file @
2a7c1f91
...
...
@@ -79,8 +79,8 @@ namespace Titanium.Web.Proxy.Examples.Basic
};
proxyServer
.
AddEndPoint
(
transparentEndPoint
);
//
P
roxyServer.UpStreamHttpProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 };
//
P
roxyServer.UpStreamHttpsProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 };
//
p
roxyServer.UpStreamHttpProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 };
//
p
roxyServer.UpStreamHttpsProxy = new ExternalProxy() { HostName = "localhost", Port = 8888 };
foreach
(
var
endPoint
in
proxyServer
.
ProxyEndPoints
)
Console
.
WriteLine
(
"Listening on '{0}' endpoint at Ip {1} and port: {2} "
,
...
...
Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
2a7c1f91
...
...
@@ -39,12 +39,11 @@ namespace Titanium.Web.Proxy.Network.Tcp
TcpClient
client
;
CustomBufferedStream
stream
;
bool
useHttpProxy
=
false
;
bool
useHttpProxy
=
false
;
//check if external proxy is set for HTTP
if
(!
isHttps
&&
externalHttpProxy
!=
null
&&
externalHttpProxy
.
HostName
!=
remoteHostName
)
&&
!(
externalHttpProxy
.
HostName
==
remoteHostName
&&
externalHttpProxy
.
Port
==
remotePort
))
{
useHttpProxy
=
true
;
...
...
@@ -59,7 +58,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
bool
useHttpsProxy
=
false
;
//check if external proxy is set for HTTPS
if
(
isHttps
&&
externalHttpsProxy
!=
null
&&
externalHttpsProxy
.
HostName
!=
remoteHostName
)
&&
!(
externalHttpsProxy
.
HostName
==
remoteHostName
&&
externalHttpsProxy
.
Port
==
remotePort
))
{
useHttpsProxy
=
true
;
...
...
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