version 1.3.1
This commit is contained in:
parent
7023994cd1
commit
132f51e0a5
88
CA.crt
88
CA.crt
@ -1,52 +1,52 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIID+DCCAuCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJDTjEX
|
MIID+DCCAuCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEX
|
||||||
MBUGA1UEChMOUHJveEhUVFBTUHJveHkxEjAQBgNVBAsTCXB5T3BlblNTTDEaMBgG
|
MBUGA1UECgwOUHJveEhUVFBTUHJveHkxEjAQBgNVBAsMCXB5T3BlblNTTDEaMBgG
|
||||||
A1UEAxMRUHJveEhUVFBTUHJveHkgQ0EwHhcNMTQwNzI1MDI0NjM1WhcNMjQwNzI0
|
A1UEAwwRUHJveEhUVFBTUHJveHkgQ0EwHhcNMTUxMDAxMDc0MDI1WhcNMjUwOTMw
|
||||||
MDI0NjM1WjBWMQswCQYDVQQGEwJDTjEXMBUGA1UEChMOUHJveEhUVFBTUHJveHkx
|
MDc0MDI1WjBWMQswCQYDVQQGEwJDTjEXMBUGA1UECgwOUHJveEhUVFBTUHJveHkx
|
||||||
EjAQBgNVBAsTCXB5T3BlblNTTDEaMBgGA1UEAxMRUHJveEhUVFBTUHJveHkgQ0Ew
|
EjAQBgNVBAsMCXB5T3BlblNTTDEaMBgGA1UEAwwRUHJveEhUVFBTUHJveHkgQ0Ew
|
||||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDu5tWlBhw7kJ4aqv+Uc/Cy
|
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9mQTpJlPDjEqLnovcT/AL
|
||||||
TDNYvE5SV54vjJp7VwU1mVq/VUrcmSsNySrput4fc2jIYs98XH0IWRnEVSqbbtVg
|
YwjoP2Siowor2yeEKaGKJjBamu3OkYhS+2kzJhcii705uTCal/f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jcKAwQGCWCGSAGG+EIEATALBgNVHQ8EBAMCAQYwHQYDVR0O
|
||||||
BBYEFCs59meqNHm2h0jDlW5BvWu6gnkuMA0GCSqGSIb3DQEBBQUAA4IBAQAib4M1
|
BBYEFKPBao+B+YH0tMNHNGoLv/3ncZyvMA0GCSqGSIb3DQEBCwUAA4IBAQCFZOPd
|
||||||
QIJoRs0cLQRn8HGVXB3OVYTRp5e+GIdEkxRb69/mOJT6e1rqlk86OkVakK083E2B
|
SldrKkekP/tO/WnGgXEus8z4Ei7TEAm6qkSJ/r0ZaTKmGek370xvVG4myl0Hngr+
|
||||||
a3Vhl4XIW7HhnIPhH/ZjZcwZ/MDiSvpkJVcmWjEeA6PxSpjqgl1bxMlJhbY1e3Bo
|
F6blIUzGi8e9mp/2vONhPYKTAg+Y4h5tKz9S6SyvbypBMa4YNZw8DNfd4uVLL/b6
|
||||||
ps3rE40vH9+Hq3ps3FCUGAhTnXGA42L//JgU3N2XTWQXfdkoi4eVsIaf4obQT5wD
|
psQcYfMPMpRdM7GlLZbxY9AHyCaHZszc3bSBM/lIhLWJH0pR7QSZZ+cJUHYKODZ8
|
||||||
ThmuTZNLTkJOzFxFqHpuxUHO1BMgKgHirul8Fy9ydj75MJfUCCQh7Prjqf0ch5Ou
|
Cs8goAcA/mJ4h1g63EP1Snlw4U3vMJ8ZQRAeg46FAZATwte9SaahAq1kLql/P8jg
|
||||||
LlwRF70nULYJ6KXIaPM9icT/Wo1jWsTT+FJlXj27esuLpth7DjunWZQRjKsg3p0/
|
A4gM9xvfRgVOIrfxSHDlnw6gVK6u/WhD4SWIsS2JfNljgUmrcMWB37kNdT3i0yO7
|
||||||
DiaGIm0JYJEoRH+u
|
Vydw/UIJw1pqktqz
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
-----BEGIN PRIVATE KEY-----
|
-----BEGIN PRIVATE KEY-----
|
||||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQ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cYIItIW1npsSeM45x+6Blit74LuleE9UYoN8j
|
||||||
H/cjK5ckO6R2iFc1wtsJ4GZkNj+TdOy7l+G4dZq5dECon41SdhKD3hvjYtuZdADS
|
BC8ADhYN7ywb0juCnpLrKuWl/3XNg3wREhvhHfEK1agEysVFUohFwdtfyW4gNWia
|
||||||
NgbKfrz5Q13KcUB7jrOFevXD
|
wli1LGvTwY1aFj8K29VKvkE=
|
||||||
-----END PRIVATE KEY-----
|
-----END PRIVATE KEY-----
|
||||||
|
@ -38,7 +38,7 @@ def create_CA(capath):
|
|||||||
OpenSSL.crypto.X509Extension(b"extendedKeyUsage", True, b"serverAuth,clientAuth,emailProtection,timeStamping,msCodeInd,msCodeCom,msCTLSign,msSGC,msEFS,nsSGC"),
|
OpenSSL.crypto.X509Extension(b"extendedKeyUsage", True, b"serverAuth,clientAuth,emailProtection,timeStamping,msCodeInd,msCodeCom,msCTLSign,msSGC,msEFS,nsSGC"),
|
||||||
OpenSSL.crypto.X509Extension(b"keyUsage", False, b"keyCertSign, cRLSign"),
|
OpenSSL.crypto.X509Extension(b"keyUsage", False, b"keyCertSign, cRLSign"),
|
||||||
OpenSSL.crypto.X509Extension(b"subjectKeyIdentifier", False, b"hash", subject=ca)])
|
OpenSSL.crypto.X509Extension(b"subjectKeyIdentifier", False, b"hash", subject=ca)])
|
||||||
ca.sign(key, 'sha1')
|
ca.sign(key, 'sha256')
|
||||||
with open(capath, 'wb') as fp:
|
with open(capath, 'wb') as fp:
|
||||||
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, ca))
|
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, ca))
|
||||||
fp.write(OpenSSL.crypto.dump_privatekey(OpenSSL.crypto.FILETYPE_PEM, key))
|
fp.write(OpenSSL.crypto.dump_privatekey(OpenSSL.crypto.FILETYPE_PEM, key))
|
||||||
@ -77,7 +77,7 @@ def dummy_cert(cafile, certfile, commonname):
|
|||||||
cert.get_subject().CN = '*' + commonname if commonname.startswith('.') else commonname
|
cert.get_subject().CN = '*' + commonname if commonname.startswith('.') else commonname
|
||||||
cert.set_serial_number(int(time.time()*10000))
|
cert.set_serial_number(int(time.time()*10000))
|
||||||
cert.set_pubkey(ca.get_pubkey())
|
cert.set_pubkey(ca.get_pubkey())
|
||||||
cert.sign(key, "sha1")
|
cert.sign(key, "sha256")
|
||||||
with open(certfile, 'wb') as fp:
|
with open(certfile, 'wb') as fp:
|
||||||
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, cert))
|
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, cert))
|
||||||
fp.write(OpenSSL.crypto.dump_privatekey(OpenSSL.crypto.FILETYPE_PEM, key))
|
fp.write(OpenSSL.crypto.dump_privatekey(OpenSSL.crypto.FILETYPE_PEM, key))
|
||||||
|
@ -1,22 +1,33 @@
|
|||||||
ProxHTTPSProxyMII
|
ProxHTTPSProxyMII
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Version 1.2 (20141221)
|
Version 1.3.1 (20151001)
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
+ Content is streamed to client, while not cached before sending
|
* Certifications are now signed via SHA256 instead of SHA1
|
||||||
* Fix config auto reload
|
|
||||||
* Less exception traceback dumped
|
Version 1.3 (20150114)
|
||||||
* Tagged header changed from "Tagged:Proxomitron FrontProxy/*" to "Tagged:ProxHTTPSProxyMII FrontProxy/*"
|
--------------
|
||||||
|
|
||||||
Version 1.1 (20141024)
|
+ Each request has a number ranged from 001 to 999 for reference. 000 is reserved for SSL requests not MITMed like those in [BLACKLIST] and [SSL Pass-Thru] sections.
|
||||||
--------------
|
+ Log window now displays the length of the bytes submitted in POST method
|
||||||
|
|
||||||
+ Support URL bypass
|
Version 1.2 (20141221)
|
||||||
+ Handle both HTTP and HTTPS
|
--------------
|
||||||
+ Auto reload config upon chagnes
|
|
||||||
|
+ Content is streamed to client, while not cached before sending
|
||||||
Version 1.0 (20140729)
|
* Fix config auto reload
|
||||||
--------------
|
* Less exception traceback dumped
|
||||||
|
* Tagged header changed from "Tagged:Proxomitron FrontProxy/*" to "Tagged:ProxHTTPSProxyMII FrontProxy/*"
|
||||||
|
|
||||||
|
Version 1.1 (20141024)
|
||||||
|
--------------
|
||||||
|
|
||||||
|
+ Support URL bypass
|
||||||
|
+ Handle both HTTP and HTTPS
|
||||||
|
+ Auto reload config upon chagnes
|
||||||
|
|
||||||
|
Version 1.0 (20140729)
|
||||||
|
--------------
|
||||||
|
|
||||||
Initial release
|
Initial release
|
238
Docs/readme.txt
238
Docs/readme.txt
@ -1,119 +1,119 @@
|
|||||||
ProxHTTPSProxyMII
|
ProxHTTPSProxyMII
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Created to provide modern nag-free HTTPS connections for an HTTP proxy.
|
Created to provide modern nag-free HTTPS connections for an HTTP proxy.
|
||||||
|
|
||||||
How it works
|
How it works
|
||||||
----
|
----
|
||||||
|
|
||||||
![how it works](http://www.proxfilter.net/proxhttpsproxy/HowItWorks.gif)
|
![how it works](http://www.proxfilter.net/proxhttpsproxy/HowItWorks.gif)
|
||||||
|
|
||||||
Eligible HTTP Proxies
|
Eligible HTTP Proxies
|
||||||
----
|
----
|
||||||
|
|
||||||
* The [Proxomitron](http://www.proxomitron.info), for which ProxHTTPSProxy was created :)
|
* The [Proxomitron](http://www.proxomitron.info), for which ProxHTTPSProxy was created :)
|
||||||
* Any that have the ability to forward all requests with a "Tagged:ProxHTTPSProxyMII FrontProxy/*" header to the ProxHTTPSProxyMII rear server.
|
* Any that have the ability to forward all requests with a "Tagged:ProxHTTPSProxyMII FrontProxy/*" header to the ProxHTTPSProxyMII rear server.
|
||||||
* Any that can be ran as two instances, one for true http and another for "tagged" http
|
* Any that can be ran as two instances, one for true http and another for "tagged" http
|
||||||
* Any that will only be used to monitor https traffic
|
* Any that will only be used to monitor https traffic
|
||||||
|
|
||||||
Install
|
Install
|
||||||
----
|
----
|
||||||
|
|
||||||
* ProxHTTPSProxy's "CA.crt" to the Client's store of trusted certificate authorities.
|
* ProxHTTPSProxy's "CA.crt" to the Client's store of trusted certificate authorities.
|
||||||
|
|
||||||
Configure
|
Configure
|
||||||
----
|
----
|
||||||
|
|
||||||
* The Client to use the ProxHTTPSProxy front server at 127.0.0.1 on port 8079 for secure connections.
|
* The Client to use the ProxHTTPSProxy front server at 127.0.0.1 on port 8079 for secure connections.
|
||||||
* The HTTP proxy to receive requests at 127.0.0.1 on port 8080.
|
* The HTTP proxy to receive requests at 127.0.0.1 on port 8080.
|
||||||
* The HTTP proxy to forward requests to the ProxHTTPSProxy rear server at 127.0.0.1 on port 8081.
|
* The HTTP proxy to forward requests to the ProxHTTPSProxy rear server at 127.0.0.1 on port 8081.
|
||||||
* Edit "Config.ini" to change these requirements.
|
* Edit "Config.ini" to change these requirements.
|
||||||
|
|
||||||
Execute
|
Execute
|
||||||
----
|
----
|
||||||
|
|
||||||
ProxHTTPSProxy.exe to start.
|
ProxHTTPSProxy.exe to start.
|
||||||
|
|
||||||
Remember
|
Remember
|
||||||
----
|
----
|
||||||
|
|
||||||
Be aware and careful! Use a direct connection when you don't want any mistakes made.
|
Be aware and careful! Use a direct connection when you don't want any mistakes made.
|
||||||
|
|
||||||
Use at your own risk!
|
Use at your own risk!
|
||||||
|
|
||||||
Have fun!
|
Have fun!
|
||||||
|
|
||||||
Discuss
|
Discuss
|
||||||
----
|
----
|
||||||
|
|
||||||
<http://prxbx.com/forums/showthread.php?tid=2172>
|
<http://prxbx.com/forums/showthread.php?tid=2172>
|
||||||
|
|
||||||
Author
|
Author
|
||||||
----
|
----
|
||||||
|
|
||||||
* phoenix (aka whenever)
|
* phoenix (aka whenever)
|
||||||
* JJoe (test and doc)
|
* JJoe (test and doc)
|
||||||
|
|
||||||
Proxomitron Tips
|
Proxomitron Tips
|
||||||
================
|
================
|
||||||
|
|
||||||
To use
|
To use
|
||||||
----
|
----
|
||||||
|
|
||||||
* Add the ProxHTTPSProxy rear server to the Proxomitron's list of external proxies
|
* Add the ProxHTTPSProxy rear server to the Proxomitron's list of external proxies
|
||||||
|
|
||||||
`127.0.0.1:8081 ProxHTTPSProxyMII`
|
`127.0.0.1:8081 ProxHTTPSProxyMII`
|
||||||
|
|
||||||
* Add to Proxomitron's "Bypass URLs that match this expression" field if it is empty
|
* Add to Proxomitron's "Bypass URLs that match this expression" field if it is empty
|
||||||
|
|
||||||
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SETPROXY(127.0.0.1:8081)(^)`
|
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SETPROXY(127.0.0.1:8081)(^)`
|
||||||
|
|
||||||
* Add to the beginning of the entry in Proxomitron's "Bypass URLs that match this expression" field if it is **not** empty
|
* Add to the beginning of the entry in Proxomitron's "Bypass URLs that match this expression" field if it is **not** empty
|
||||||
|
|
||||||
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SETPROXY(127.0.0.1:8081)(^)|`
|
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SETPROXY(127.0.0.1:8081)(^)|`
|
||||||
|
|
||||||
Tips
|
Tips
|
||||||
----
|
----
|
||||||
|
|
||||||
* Proxomitron always executes some commands in "Bypass URLs that match this expression" field. Adding the entry there allows the Proxomitron to use the rear server when in Bypass mode.
|
* Proxomitron always executes some commands in "Bypass URLs that match this expression" field. Adding the entry there allows the Proxomitron to use the rear server when in Bypass mode.
|
||||||
|
|
||||||
This undocumented feature brings many possibilities but remember, an actual match triggers bypass of filtering!
|
This undocumented feature brings many possibilities but remember, an actual match triggers bypass of filtering!
|
||||||
|
|
||||||
- `$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)` checks for the header that indicates an https request.
|
- `$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)` checks for the header that indicates an https request.
|
||||||
- `$SETPROXY(127.0.0.1:8081)` is executed when found.
|
- `$SETPROXY(127.0.0.1:8081)` is executed when found.
|
||||||
- `(^)` expression never matches.
|
- `(^)` expression never matches.
|
||||||
|
|
||||||
* Identify https connections by testing for the "Tagged" request header that the ProxHTTPSProxy front server adds to the request.
|
* Identify https connections by testing for the "Tagged" request header that the ProxHTTPSProxy front server adds to the request.
|
||||||
|
|
||||||
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)`
|
`$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)`
|
||||||
|
|
||||||
* For local file requests, use an expression like
|
* For local file requests, use an expression like
|
||||||
|
|
||||||
`$USEPROXY(false)$RDIR(http://local.ptron/killed.gif)`
|
`$USEPROXY(false)$RDIR(http://local.ptron/killed.gif)`
|
||||||
|
|
||||||
* Before redirecting "Tagged" connections to external resources consider removing the "Tagged" header.
|
* Before redirecting "Tagged" connections to external resources consider removing the "Tagged" header.
|
||||||
|
|
||||||
* If needed, the Proxomitron can still do https. After adding the ssl files to the Proxomitron, use a header filter like
|
* If needed, the Proxomitron can still do https. After adding the ssl files to the Proxomitron, use a header filter like
|
||||||
|
|
||||||
```
|
```
|
||||||
[HTTP headers]
|
[HTTP headers]
|
||||||
In = FALSE
|
In = FALSE
|
||||||
Out = TRUE
|
Out = TRUE
|
||||||
Key = "Tagged: Use Proxomitron for https://badcert.com"
|
Key = "Tagged: Use Proxomitron for https://badcert.com"
|
||||||
URL = "badcert.com$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$USEPROXY(false)$RDIR(https://badcert.com)"
|
URL = "badcert.com$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$USEPROXY(false)$RDIR(https://badcert.com)"
|
||||||
```
|
```
|
||||||
This filter also removes the "Tagged" header.
|
This filter also removes the "Tagged" header.
|
||||||
|
|
||||||
For the current sidki set
|
For the current sidki set
|
||||||
----
|
----
|
||||||
|
|
||||||
1. Add the following two lines to Exceptions-U
|
1. Add the following two lines to Exceptions-U
|
||||||
|
|
||||||
```
|
```
|
||||||
$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SET(keyword=$GET(keyword)i_proxy:3.)(^)
|
$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SET(keyword=$GET(keyword)i_proxy:3.)(^)
|
||||||
~(^$TST(keyword=i_proxy:[03].))$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SET(keyword=$GET(keyword)i_proxy:3.)(^)
|
~(^$TST(keyword=i_proxy:[03].))$OHDR(Tagged:ProxHTTPSProxyMII FrontProxy/*)$SET(keyword=$GET(keyword)i_proxy:3.)(^)
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Redirect connections to http resources with an expression like
|
2. Redirect connections to http resources with an expression like
|
||||||
|
|
||||||
`$USEPROXY(false)$SET(keyword=i_proxy:0.)$RDIR(http://local.ptron/killed.gif)`
|
`$USEPROXY(false)$SET(keyword=i_proxy:0.)$RDIR(http://local.ptron/killed.gif)`
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
_name = 'ProxHTTPSProxyMII'
|
_name = 'ProxHTTPSProxyMII'
|
||||||
__author__ = 'phoenix'
|
__author__ = 'phoenix'
|
||||||
__version__ = 'v1.3a'
|
__version__ = 'v1.3.1'
|
||||||
|
|
||||||
CONFIG = "config.ini"
|
CONFIG = "config.ini"
|
||||||
CA_CERTS = "cacert.pem"
|
CA_CERTS = "cacert.pem"
|
||||||
@ -205,11 +205,23 @@ class FrontRequestHandler(ProxyRequestHandler):
|
|||||||
# Remove hop-by-hop headers
|
# Remove hop-by-hop headers
|
||||||
self.purge_headers(self.headers)
|
self.purge_headers(self.headers)
|
||||||
r = None
|
r = None
|
||||||
|
|
||||||
|
# Below code in connectionpool.py expect the headers to has a copy() and update() method
|
||||||
|
# That's why we can't use self.headers directly when call pool.urlopen()
|
||||||
|
#
|
||||||
|
# Merge the proxy headers. Only do this in HTTP. We have to copy the
|
||||||
|
# headers dict so we can safely change it without those changes being
|
||||||
|
# reflected in anyone else's copy.
|
||||||
|
# if self.scheme == 'http':
|
||||||
|
# headers = headers.copy()
|
||||||
|
# headers.update(self.proxy_headers)
|
||||||
|
headers = urllib3._collections.HTTPHeaderDict(self.headers)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Sometimes 302 redirect would fail with "BadStatusLine" exception, and IE11 doesn't restart the request.
|
# Sometimes 302 redirect would fail with "BadStatusLine" exception, and IE11 doesn't restart the request.
|
||||||
# retries=1 instead of retries=False fixes it.
|
# retries=1 instead of retries=False fixes it.
|
||||||
#! Retry may cause the requests with the same reqNum appear in the log window
|
#! Retry may cause the requests with the same reqNum appear in the log window
|
||||||
r = pool.urlopen(self.command, url, body=self.postdata, headers=self.headers,
|
r = pool.urlopen(self.command, url, body=self.postdata, headers=headers,
|
||||||
retries=1, redirect=False, preload_content=False, decode_content=False)
|
retries=1, redirect=False, preload_content=False, decode_content=False)
|
||||||
if not self.ssltunnel:
|
if not self.ssltunnel:
|
||||||
if self.command in ("GET", "HEAD"):
|
if self.command in ("GET", "HEAD"):
|
||||||
@ -278,8 +290,20 @@ class RearRequestHandler(ProxyRequestHandler):
|
|||||||
self.postdata = self.rfile.read(int(data_length)) if data_length else None
|
self.postdata = self.rfile.read(int(data_length)) if data_length else None
|
||||||
self.purge_headers(self.headers)
|
self.purge_headers(self.headers)
|
||||||
r = None
|
r = None
|
||||||
|
|
||||||
|
# Below code in connectionpool.py expect the headers to has a copy() and update() method
|
||||||
|
# That's why we can't use self.headers directly when call pool.urlopen()
|
||||||
|
#
|
||||||
|
# Merge the proxy headers. Only do this in HTTP. We have to copy the
|
||||||
|
# headers dict so we can safely change it without those changes being
|
||||||
|
# reflected in anyone else's copy.
|
||||||
|
# if self.scheme == 'http':
|
||||||
|
# headers = headers.copy()
|
||||||
|
# headers.update(self.proxy_headers)
|
||||||
|
headers = urllib3._collections.HTTPHeaderDict(self.headers)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = pool.urlopen(self.command, url, body=self.postdata, headers=self.headers,
|
r = pool.urlopen(self.command, url, body=self.postdata, headers=headers,
|
||||||
retries=1, redirect=False, preload_content=False, decode_content=False)
|
retries=1, redirect=False, preload_content=False, decode_content=False)
|
||||||
if proxy:
|
if proxy:
|
||||||
logger.debug('Using Proxy - %s' % proxy)
|
logger.debug('Using Proxy - %s' % proxy)
|
||||||
@ -353,7 +377,7 @@ try:
|
|||||||
for worker in (frontserver.serve_forever, rearserver.serve_forever,
|
for worker in (frontserver.serve_forever, rearserver.serve_forever,
|
||||||
pools.reloadConfig):
|
pools.reloadConfig):
|
||||||
thread = threading.Thread(target=worker)
|
thread = threading.Thread(target=worker)
|
||||||
thread.dameon = True
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
print("=" * 76)
|
print("=" * 76)
|
||||||
@ -364,5 +388,7 @@ try:
|
|||||||
print(' ParentServer : %s' % config.DEFAULTPROXY)
|
print(' ParentServer : %s' % config.DEFAULTPROXY)
|
||||||
print(' Proxomitron : ' + config.PROXADDR)
|
print(' Proxomitron : ' + config.PROXADDR)
|
||||||
print("=" * 76)
|
print("=" * 76)
|
||||||
|
while True:
|
||||||
|
time.sleep(1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Quitting...")
|
print("Quitting...")
|
||||||
|
1635
cacert.pem
1635
cacert.pem
File diff suppressed because it is too large
Load Diff
127
config.ini
127
config.ini
@ -1,63 +1,66 @@
|
|||||||
### The parent proxy has to support CONNECT method, if you want to proxy HTTPS requests
|
### The parent proxy has to support CONNECT method, if you want to proxy HTTPS requests
|
||||||
###
|
###
|
||||||
### Proxy setting applies to HTTPS requests only, as it is applied by the Rear Server
|
### Proxy setting applies to HTTPS requests only, as it is applied by the Rear Server
|
||||||
### HTTP requests are passed to and handled by Proxomitron, please set up Proxomitron for proxy
|
### HTTP requests are passed to and handled by Proxomitron, please set up Proxomitron for proxy
|
||||||
###
|
###
|
||||||
### Socks proxy support
|
### Socks proxy support
|
||||||
### https://github.com/shazow/urllib3/pull/284
|
### https://github.com/shazow/urllib3/pull/284
|
||||||
|
|
||||||
[GENERAL]
|
[GENERAL]
|
||||||
ProxAddr = http://localhost:8080
|
ProxAddr = http://localhost:8080
|
||||||
FrontPort = 8079
|
FrontPort = 8079
|
||||||
RearPort = 8081
|
RearPort = 8081
|
||||||
# DefaultProxy = http://127.0.0.1:8118
|
# DefaultProxy = http://127.0.0.1:8118
|
||||||
|
|
||||||
# Proper values for LogLevel are ERROR, WARNING, INFO, DEBUG
|
# Proper values for LogLevel are ERROR, WARNING, INFO, DEBUG
|
||||||
# Default is INFO if unset
|
# Default is INFO if unset
|
||||||
LogLevel =
|
LogLevel =
|
||||||
|
|
||||||
# * matches everything
|
# * matches everything
|
||||||
# ? matches any single character
|
# ? matches any single character
|
||||||
# [seq] matches any character in seq
|
# [seq] matches any character in seq
|
||||||
# [!seq] matches any character not in seq
|
# [!seq] matches any character not in seq
|
||||||
|
|
||||||
[PROXY http://192.168.178.8:8123]
|
[PROXY http://192.168.178.8:8123]
|
||||||
duckduckgo.com
|
#duckduckgo.com
|
||||||
*.s3.amazonaws.com
|
#*.s3.amazonaws.com
|
||||||
|
|
||||||
[PROXY http://192.168.178.8:8124]
|
[PROXY http://192.168.178.8:8124]
|
||||||
test.com
|
test.com
|
||||||
|
|
||||||
### Ignore SSL certificate verify, Use at your own risk!!!
|
### Ignore SSL certificate verify, Use at your own risk!!!
|
||||||
### Proxy setting still effective
|
### Proxy setting still effective
|
||||||
[SSL No-Verify]
|
[SSL No-Verify]
|
||||||
*.12306.cn
|
*.12306.cn
|
||||||
|
|
||||||
[BLACKLIST]
|
[BLACKLIST]
|
||||||
*.doubleclick.net
|
*.doubleclick.net
|
||||||
*.google-analytics.com
|
*.google-analytics.com
|
||||||
|
|
||||||
### Bypass Proxomitron and the Rear Server, Proxy setting still effective
|
### Bypass Proxomitron and the Rear Server, Proxy setting still effective
|
||||||
### SSL certificate verify will be done by the browser
|
### SSL certificate verify will be done by the browser
|
||||||
[SSL Pass-Thru]
|
[SSL Pass-Thru]
|
||||||
pypi.python.org
|
pypi.python.org
|
||||||
www.gstatic.com
|
www.gstatic.com
|
||||||
watson.telemetry.microsoft.com
|
watson.telemetry.microsoft.com
|
||||||
*.sync.services.mozilla.com
|
*.sync.services.mozilla.com
|
||||||
*.mega.co.nz
|
*.mega.co.nz
|
||||||
|
|
||||||
# Microsoft SmartScreen Filter Service
|
# Microsoft SmartScreen Filter Service
|
||||||
*.smartscreen.microsoft.com
|
*.smartscreen.microsoft.com
|
||||||
urs.microsoft.com
|
urs.microsoft.com
|
||||||
|
|
||||||
# NoScript uses https://secure.informaction.com/ipecho to detect the WAN IP
|
# NoScript uses https://secure.informaction.com/ipecho to detect the WAN IP
|
||||||
# https://addons.mozilla.org/en-US/firefox/addon/noscript/privacy/
|
# https://addons.mozilla.org/en-US/firefox/addon/noscript/privacy/
|
||||||
secure.informaction.com
|
secure.informaction.com
|
||||||
|
|
||||||
### Bypass Proxomitron and the Rear Server, Proxy setting still effective
|
### Bypass Proxomitron and the Rear Server, Proxy setting still effective
|
||||||
### This section supports URL matching
|
### This section supports URL matching
|
||||||
[BYPASS URL]
|
[BYPASS URL]
|
||||||
*.zip
|
http://www.abc.com/*
|
||||||
*.rar
|
https://bcd.net/*
|
||||||
*.exe
|
*://feedly.com/*
|
||||||
|
*.zip
|
||||||
|
*.rar
|
||||||
|
*.exe
|
||||||
*.pdf
|
*.pdf
|
Loading…
Reference in New Issue
Block a user