현재 CNN.com을 가로 채기 위해 로컬 컴퓨터에 설치되어있는 사용자 지정 프록시를 만들고 있습니다. 브라우저에 성공적으로 프록시가 적용되고 요청이 전송되면 응답을받으며 올바른 HTML 페이로드로 완료된 200 OK 응답입니다. 나는 요청을 확인하기 위해 Wireshark를 사용했다.> CNN과 초기 응답은 프록시를 켰을 때와 내가 사이트를 직접 때릴 때와 동일하다.프록시를 설정하려고했지만 브라우저에서 500 오류가 발생했습니다.
의 HttpWebRequest가 전송되기 전에 같은과 같습니다
2016-06-30 20:23:11.7870 INFO Getting response for request
2016-06-30 20:23:11.7870 DEBUG this.AllowAutoRedirect = True
2016-06-30 20:23:11.7870 DEBUG this.AllowWriteStreamBuffering = True
2016-06-30 20:23:11.7870 DEBUG this.AllowReadStreamBuffering = False
2016-06-30 20:23:11.7960 DEBUG this.HaveResponse = False
2016-06-30 20:23:11.7960 DEBUG this.KeepAlive = True
2016-06-30 20:23:11.7960 DEBUG this.Pipelined = True
2016-06-30 20:23:11.7960 DEBUG this.PreAuthenticate = False
2016-06-30 20:23:11.7960 DEBUG this.UnsafeAuthenticatedConnectionSharing = False
2016-06-30 20:23:11.7960 DEBUG this.SendChunked = False
2016-06-30 20:23:11.7960 DEBUG this.AutomaticDecompression = None
2016-06-30 20:23:11.7960 DEBUG this.DefaultCachePolicy.Level = BypassCache
2016-06-30 20:23:11.7960 DEBUG this.DefaultMaximumResponseHeadersLength = 64
2016-06-30 20:23:11.7960 DEBUG this.DefaultMaximumErrorResponseLength = 64
2016-06-30 20:23:11.7960 DEBUG this.MaximumResponseHeadersLength = 64
2016-06-30 20:23:11.7960 DEBUG this.ClientCertificates.Capacity = 4
2016-06-30 20:23:11.7960 DEBUG this.ClientCertificates.Count = 1
2016-06-30 20:23:11.7960 DEBUG this.CookieContainer.Capacity = 300
2016-06-30 20:23:11.7960 DEBUG this.CookieContainer.Count = 14
2016-06-30 20:23:11.7960 DEBUG this.CookieContainer.MaxCookieSize = 4096
2016-06-30 20:23:11.7960 DEBUG this.CookieContainer.PerDomainCapacity = 20
2016-06-30 20:23:11.7960 DEBUG this.SupportsCookieContainer = True
2016-06-30 20:23:11.7960 DEBUG this.RequestUri.AbsolutePath =/
2016-06-30 20:23:11.7960 DEBUG this.RequestUri.AbsoluteUri = http://151.101.44.73/
2016-06-30 20:23:11.7960 DEBUG this.RequestUri.LocalPath =/
2016-06-30 20:23:11.7960 DEBUG this.RequestUri.Authority = 151.101.44.73
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.HostNameType = IPv4
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.IsDefaultPort = True
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.IsFile = False
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.IsLoopback = False
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.PathAndQuery =/
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Segments[0] =/
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.IsUnc = False
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Host = 151.101.44.73
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Port = 80
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Query =
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Fragment =
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.Scheme = http
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.OriginalString = http://151.101.44.73/
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.DnsSafeHost = 151.101.44.73
2016-06-30 20:23:11.8120 DEBUG this.RequestUri.IdnHost = 151.101.44.73
2016-06-30 20:23:11.8290 DEBUG this.RequestUri.IsAbsoluteUri = True
2016-06-30 20:23:11.8290 DEBUG this.RequestUri.UserEscaped = False
2016-06-30 20:23:11.8290 DEBUG this.RequestUri.UserInfo =
2016-06-30 20:23:11.8290 DEBUG this.ContentLength = 0
2016-06-30 20:23:11.8290 DEBUG this.Timeout = 100000
2016-06-30 20:23:11.8290 DEBUG this.ReadWriteTimeout = 300000
2016-06-30 20:23:11.8290 DEBUG this.ContinueTimeout = 350
2016-06-30 20:23:11.8290 DEBUG this.Address.AbsolutePath =/
2016-06-30 20:23:11.8290 DEBUG this.Address.AbsoluteUri = http://151.101.44.73/
2016-06-30 20:23:11.8290 DEBUG this.Address.LocalPath =/
2016-06-30 20:23:11.8290 DEBUG this.Address.Authority = 151.101.44.73
2016-06-30 20:23:11.8290 DEBUG this.Address.HostNameType = IPv4
2016-06-30 20:23:11.8290 DEBUG this.Address.IsDefaultPort = True
2016-06-30 20:23:11.8290 DEBUG this.Address.IsFile = False
2016-06-30 20:23:11.8290 DEBUG this.Address.IsLoopback = False
2016-06-30 20:23:11.8290 DEBUG this.Address.PathAndQuery =/
2016-06-30 20:23:11.8290 DEBUG this.Address.Segments[0] =/
2016-06-30 20:23:11.8290 DEBUG this.Address.IsUnc = False
2016-06-30 20:23:11.8431 DEBUG this.Address.Host = 151.101.44.73
2016-06-30 20:23:11.8431 DEBUG this.Address.Port = 80
2016-06-30 20:23:11.8431 DEBUG this.Address.Query =
2016-06-30 20:23:11.8431 DEBUG this.Address.Fragment =
2016-06-30 20:23:11.8431 DEBUG this.Address.Scheme = http
2016-06-30 20:23:11.8431 DEBUG this.Address.OriginalString = http://151.101.44.73/
2016-06-30 20:23:11.8431 DEBUG this.Address.DnsSafeHost = 151.101.44.73
2016-06-30 20:23:11.8431 DEBUG this.Address.IdnHost = 151.101.44.73
2016-06-30 20:23:11.8431 DEBUG this.Address.IsAbsoluteUri = True
2016-06-30 20:23:11.8431 DEBUG this.Address.UserEscaped = False
2016-06-30 20:23:11.8431 DEBUG this.Address.UserInfo =
2016-06-30 20:23:11.8431 DEBUG this.ContinueDelegate = null
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.BindIPEndPointDelegate = null
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.ConnectionLeaseTimeout = -1
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.Address.AbsolutePath =/
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.Address.AbsoluteUri = http://151.101.44.73/
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.Address.LocalPath =/
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.Address.Authority = 151.101.44.73
2016-06-30 20:23:11.8431 DEBUG this.ServicePoint.Address.HostNameType = IPv4
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IsDefaultPort = True
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IsFile = False
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IsLoopback = False
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.PathAndQuery =/
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Segments[0] =/
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IsUnc = False
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Host = 151.101.44.73
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Port = 80
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Query =
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Fragment =
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.Scheme = http
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.OriginalString = http://151.101.44.73/
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.DnsSafeHost = 151.101.44.73
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IdnHost = 151.101.44.73
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.IsAbsoluteUri = True
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.UserEscaped = False
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Address.UserInfo =
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.MaxIdleTime = 100000
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.UseNagleAlgorithm = True
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.ReceiveBufferSize = -1
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.Expect100Continue = True
2016-06-30 20:23:11.8591 DEBUG this.ServicePoint.IdleSince = 6/30/2016 8:23:11 PM
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.ProtocolVersion = 1.1
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.ConnectionName = http
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.ConnectionLimit = 2147483647
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.CurrentConnections = 0
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.Certificate = null
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.ClientCertificate = null
2016-06-30 20:23:11.8741 DEBUG this.ServicePoint.SupportsPipelining = True
2016-06-30 20:23:11.8741 DEBUG this.Host = www.cnn.com
2016-06-30 20:23:11.8741 DEBUG this.MaximumAutomaticRedirections = 50
2016-06-30 20:23:11.8741 DEBUG this.Method = GET
2016-06-30 20:23:11.8741 DEBUG this.Credentials.UserName =
2016-06-30 20:23:11.8741 DEBUG this.Credentials.Password =
2016-06-30 20:23:11.8741 DEBUG this.Credentials.SecurePassword = System.Security.SecureString
2016-06-30 20:23:11.8741 DEBUG this.Credentials.Domain =
2016-06-30 20:23:11.8741 DEBUG this.UseDefaultCredentials = True
2016-06-30 20:23:11.8741 DEBUG this.ConnectionGroupName = null
2016-06-30 20:23:11.8741 DEBUG this.Headers.Count = 4
2016-06-30 20:23:11.8741 DEBUG this.Headers.Keys.Count = 4
2016-06-30 20:23:11.8741 DEBUG this.Headers.AllKeys[0] = Accept
2016-06-30 20:23:11.8741 DEBUG this.Headers.AllKeys[1] = User-Agent
2016-06-30 20:23:11.8741 DEBUG this.Headers.AllKeys[2] = Accept-Encoding
2016-06-30 20:23:11.8741 DEBUG this.Headers.AllKeys[3] = Accept-Language
2016-06-30 20:23:11.8901 DEBUG this.Proxy.Credentials = null
2016-06-30 20:23:11.8901 DEBUG this.ProtocolVersion = 1.1
2016-06-30 20:23:11.8901 DEBUG this.ContentType = null
2016-06-30 20:23:11.8901 DEBUG this.MediaType = null
2016-06-30 20:23:11.8901 DEBUG this.TransferEncoding = null
2016-06-30 20:23:11.8901 DEBUG this.Connection = null
2016-06-30 20:23:11.8901 DEBUG this.Accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2016-06-30 20:23:11.8901 DEBUG this.Referer = null
2016-06-30 20:23:11.8901 DEBUG this.UserAgent = Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
2016-06-30 20:23:11.8901 DEBUG this.Expect = null
2016-06-30 20:23:11.8901 DEBUG this.IfModifiedSince = 1/1/0001 12:00:00 AM
2016-06-30 20:23:11.8901 DEBUG this.Date = 1/1/0001 12:00:00 AM
2016-06-30 20:23:11.8901 DEBUG this.ServerCertificateValidationCallback = null
2016-06-30 20:23:11.8901 DEBUG this.CachePolicy.Level = BypassCache
2016-06-30 20:23:11.8901 DEBUG this.AuthenticationLevel = None
2016-06-30 20:23:11.8901 DEBUG this.ImpersonationLevel = Delegation
내가 번역 등과 같은 응답 쓰고 있어요 : 그러나,이 내가 프록시를 사용하고 때
2016-06-30 20:04:01.3221 INFO Sending the following response headers to the host
x-servedByHost => prd-10-60-165-23.nodes.56m.dmtio.net
X-XSS-Protection => 1; mode=block
Content-Security-Policy => default-src 'self' http://*.cnn.com:* https://*.cnn.com:* *.cnn.net:* *.turner.com:* *.ugdturner.com:* *.vgtf.net:*; script-src 'unsafe-inline' 'unsafe-eval' 'self' *; style-src 'unsafe-inline' 'self' *; frame-src 'self' *; object-src 'self' *; img-src 'self' * data: blob:; media-src 'self' *; font-src 'self' *; connect-src 'self' *;
Access-Control-Allow-Origin => *
Fastly-Debug-Digest => 1e206303e0672a50569b0c0a29903ca81f3ef5033de74682ce90ec9d13686981
Accept-Ranges => bytes
Cache-Control => max-age=60
Content-Type => text/html; charset=utf-8
Date => Thu, 30 Jun 2016 23:47:34 GMT
Via => 1.1 varnish,1.1 varnish
Age => 261
Connection => keep-alive
Set-Cookie => countryCode=US; Domain=.cnn.com
X-Served-By => cache-iad2133-IAD, cache-ord1732-ORD
X-Cache => HIT, HIT
X-Cache-Hits => 1, 246
X-Timer => S1467330454.559495,VS0,VE0
Vary => Accept-Encoding
Transfer-Encoding => chunked
2016-06-30 20:05:20.3758 INFO Writing response to outbound stream
2016-06-30 20:05:29.1606 INFO Request and response complete
2016-06-30 20:05:29.7949 DEBUG this.HeadersWritten = True
2016-06-30 20:05:29.7959 DEBUG this.SupportsAsyncFlush = True
2016-06-30 20:05:29.7959 DEBUG this.Cookies = System.Web.HttpCookieCollection
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[0] = x-servedByHost
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[1] = X-XSS-Protection
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[2] = Content-Security-Policy
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[3] = Access-Control-Allow-Origin
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[4] = Fastly-Debug-Digest
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[5] = Accept-Ranges
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[6] = Cache-Control
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[7] = Content-Type
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[8] = Date
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[9] = Via
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[10] = Age
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[11] = Connection
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[12] = Set-Cookie
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[13] = X-Served-By
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[14] = X-Cache
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[15] = X-Cache-Hits
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[16] = X-Timer
2016-06-30 20:05:29.7959 DEBUG this.Headers.AllKeys[17] = Vary
2016-06-30 20:05:29.8119 DEBUG this.Headers.AllKeys[18] = Transfer-Encoding
2016-06-30 20:05:29.8119 DEBUG this.Headers.AllKeys[19] = X-AspNet-Version
2016-06-30 20:05:29.8119 DEBUG this.Headers.Count = 20
2016-06-30 20:05:29.8119 DEBUG this.Headers.Keys.Count = 20
2016-06-30 20:05:29.8119 DEBUG this.StatusCode = 200
2016-06-30 20:05:29.8119 DEBUG this.SubStatusCode = 0
2016-06-30 20:05:29.8119 DEBUG this.StatusDescription = OK
2016-06-30 20:05:29.8119 DEBUG this.TrySkipIisCustomErrors = False
2016-06-30 20:05:29.8119 DEBUG this.SuppressFormsAuthenticationRedirect = False
2016-06-30 20:05:29.8119 DEBUG this.SuppressDefaultCacheControlHeader = False
2016-06-30 20:05:29.8119 DEBUG this.BufferOutput = True
2016-06-30 20:05:29.8119 DEBUG this.ContentType = text/html
2016-06-30 20:05:29.8119 DEBUG this.Charset = utf-8
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.BodyName = utf-8
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.EncodingName = Unicode (UTF-8)
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.HeaderName = utf-8
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.WebName = utf-8
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.WindowsCodePage = 1200
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.IsBrowserDisplay = True
2016-06-30 20:05:29.8119 DEBUG this.ContentEncoding.IsBrowserSave = True
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.IsMailNewsDisplay = True
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.IsMailNewsSave = True
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.IsSingleByte = False
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.EncoderFallback = System.Text.EncoderReplacementFallback
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.DecoderFallback = System.Text.DecoderReplacementFallback
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.IsReadOnly = True
2016-06-30 20:05:29.8279 DEBUG this.ContentEncoding.CodePage = 65001
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.BodyName = utf-8
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.EncodingName = Unicode (UTF-8)
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.HeaderName = utf-8
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.WebName = utf-8
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.WindowsCodePage = 1200
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsBrowserDisplay = True
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsBrowserSave = True
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsMailNewsDisplay = True
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsMailNewsSave = True
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsSingleByte = False
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.EncoderFallback = System.Text.EncoderReplacementFallback
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.DecoderFallback = System.Text.DecoderReplacementFallback
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.IsReadOnly = True
2016-06-30 20:05:29.8279 DEBUG this.HeaderEncoding.CodePage = 65001
2016-06-30 20:05:29.8279 DEBUG this.Cache = System.Web.HttpCachePolicy
2016-06-30 20:05:29.8434 DEBUG this.IsClientConnected = True
2016-06-30 20:05:29.8434 DEBUG this.ClientDisconnectedToken = System.Threading.CancellationToken
2016-06-30 20:05:29.8434 DEBUG this.IsRequestBeingRedirected = False
2016-06-30 20:05:29.8434 DEBUG this.RedirectLocation = null
2016-06-30 20:05:29.8434 DEBUG this.Output = System.Web.HttpWriter
2016-06-30 20:05:29.8434 DEBUG this.OutputStream.CanRead = False
2016-06-30 20:05:29.8434 DEBUG this.OutputStream.CanSeek = False
2016-06-30 20:05:29.8434 DEBUG this.OutputStream.CanWrite = True
을 받은 모든 헤더는 다음과 같습니다.
Date: Fri, 01 Jul 2016 00:11:44 GMT
Server: Microsoft-IIS/10.0
Transfer-Encoding: chunked
이것은 내가 어떻게 hostin g 내 프록시. HttpModule을 사용하는 IIS를 통해 실행되며 요청시 관리되는 모든 모듈을 실행하도록 사이트가 구성됩니다. 브라우저가이 응답을 받아들이도록하려면 어떻게해야합니까?