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
1972efac
Commit
1972efac
authored
Sep 05, 2015
by
titanium007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make properties readonly
parent
8fcb1868
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
SessionEventArgs.cs
Titanium.Web.Proxy/Models/SessionEventArgs.cs
+13
-5
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+8
-8
No files found.
Titanium.Web.Proxy/Models/SessionEventArgs.cs
View file @
1972efac
...
@@ -37,12 +37,20 @@ namespace Titanium.Web.Proxy.Models
...
@@ -37,12 +37,20 @@ namespace Titanium.Web.Proxy.Models
internal
HttpWebRequest
proxyRequest
{
get
;
set
;
}
internal
HttpWebRequest
proxyRequest
{
get
;
set
;
}
internal
HttpWebResponse
serverResponse
{
get
;
set
;
}
internal
HttpWebResponse
serverResponse
{
get
;
set
;
}
public
int
ClientPort
{
get
;
set
;
}
internal
bool
isHttps
{
get
;
set
;
}
public
IPAddress
ClientIpAddress
{
get
;
set
;
}
internal
string
requestURL
{
get
;
set
;
}
internal
string
requestHostname
{
get
;
set
;
}
internal
int
clientPort
{
get
;
set
;
}
internal
IPAddress
clientIpAddress
{
get
;
set
;
}
public
int
ClientPort
{
get
{
return
this
.
clientPort
;
}
}
public
IPAddress
ClientIpAddress
{
get
{
return
this
.
clientIpAddress
;
}
}
public
bool
IsHttps
{
get
{
return
this
.
isHttps
;
}
}
public
string
RequestURL
{
get
{
return
this
.
requestURL
;
}
}
public
string
RequestHostname
{
get
{
return
this
.
requestHostname
;
}
}
public
bool
IsHttps
{
get
;
set
;
}
public
string
RequestURL
{
get
;
set
;
}
public
string
RequestHostname
{
get
;
set
;
}
public
string
RequestMethod
{
get
{
return
this
.
proxyRequest
.
Method
;
}
}
public
string
RequestMethod
{
get
{
return
this
.
proxyRequest
.
Method
;
}
}
public
int
RequestContentLength
{
get
{
return
requestContentLength
;
}
}
public
int
RequestContentLength
{
get
{
return
requestContentLength
;
}
}
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
1972efac
...
@@ -191,7 +191,7 @@ namespace Titanium.Web.Proxy
...
@@ -191,7 +191,7 @@ namespace Titanium.Web.Proxy
if
(
splitBuffer
.
Length
!=
3
)
if
(
splitBuffer
.
Length
!=
3
)
{
{
TcpHelper
.
SendRaw
(
httpCmd
,
httpsHostName
,
requestLines
,
args
.
I
sHttps
,
clientStreamReader
.
BaseStream
);
TcpHelper
.
SendRaw
(
httpCmd
,
httpsHostName
,
requestLines
,
args
.
i
sHttps
,
clientStreamReader
.
BaseStream
);
Dispose
(
client
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
args
);
Dispose
(
client
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
args
);
...
@@ -212,7 +212,7 @@ namespace Titanium.Web.Proxy
...
@@ -212,7 +212,7 @@ namespace Titanium.Web.Proxy
if
(
httpsDecoratedHostName
!=
null
)
if
(
httpsDecoratedHostName
!=
null
)
{
{
remoteUri
=
httpsDecoratedHostName
+
remoteUri
;
remoteUri
=
httpsDecoratedHostName
+
remoteUri
;
args
.
I
sHttps
=
true
;
args
.
i
sHttps
=
true
;
}
}
//construct the web request that we are going to issue on behalf of the client.
//construct the web request that we are going to issue on behalf of the client.
...
@@ -234,7 +234,7 @@ namespace Titanium.Web.Proxy
...
@@ -234,7 +234,7 @@ namespace Titanium.Web.Proxy
if
((
header
[
0
]
==
"upgrade"
)
&&
(
header
[
1
]
==
"websocket"
))
if
((
header
[
0
]
==
"upgrade"
)
&&
(
header
[
1
]
==
"websocket"
))
{
{
TcpHelper
.
SendRaw
(
httpCmd
,
httpsHostName
,
requestLines
,
args
.
I
sHttps
,
clientStreamReader
.
BaseStream
);
TcpHelper
.
SendRaw
(
httpCmd
,
httpsHostName
,
requestLines
,
args
.
i
sHttps
,
clientStreamReader
.
BaseStream
);
Dispose
(
client
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
args
);
Dispose
(
client
,
clientStream
,
clientStreamReader
,
clientStreamWriter
,
args
);
...
@@ -246,10 +246,10 @@ namespace Titanium.Web.Proxy
...
@@ -246,10 +246,10 @@ namespace Titanium.Web.Proxy
args
.
proxyRequest
.
AllowAutoRedirect
=
false
;
args
.
proxyRequest
.
AllowAutoRedirect
=
false
;
args
.
proxyRequest
.
AutomaticDecompression
=
DecompressionMethods
.
None
;
args
.
proxyRequest
.
AutomaticDecompression
=
DecompressionMethods
.
None
;
args
.
R
equestHostname
=
args
.
proxyRequest
.
RequestUri
.
Host
;
args
.
r
equestHostname
=
args
.
proxyRequest
.
RequestUri
.
Host
;
args
.
R
equestURL
=
args
.
proxyRequest
.
RequestUri
.
OriginalString
;
args
.
r
equestURL
=
args
.
proxyRequest
.
RequestUri
.
OriginalString
;
args
.
C
lientPort
=
((
IPEndPoint
)
client
.
Client
.
RemoteEndPoint
).
Port
;
args
.
c
lientPort
=
((
IPEndPoint
)
client
.
Client
.
RemoteEndPoint
).
Port
;
args
.
C
lientIpAddress
=
((
IPEndPoint
)
client
.
Client
.
RemoteEndPoint
).
Address
;
args
.
c
lientIpAddress
=
((
IPEndPoint
)
client
.
Client
.
RemoteEndPoint
).
Address
;
args
.
requestHttpVersion
=
version
;
args
.
requestHttpVersion
=
version
;
args
.
requestIsAlive
=
args
.
proxyRequest
.
KeepAlive
;
args
.
requestIsAlive
=
args
.
proxyRequest
.
KeepAlive
;
...
@@ -270,7 +270,7 @@ namespace Titanium.Web.Proxy
...
@@ -270,7 +270,7 @@ namespace Titanium.Web.Proxy
return
;
return
;
}
}
args
.
proxyRequest
.
ConnectionGroupName
=
args
.
R
equestHostname
;
args
.
proxyRequest
.
ConnectionGroupName
=
args
.
r
equestHostname
;
args
.
proxyRequest
.
AllowWriteStreamBuffering
=
true
;
args
.
proxyRequest
.
AllowWriteStreamBuffering
=
true
;
//If request was modified by user
//If request was modified by user
...
...
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