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-----
|
||||
MIID+DCCAuCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJDTjEX
|
||||
MBUGA1UEChMOUHJveEhUVFBTUHJveHkxEjAQBgNVBAsTCXB5T3BlblNTTDEaMBgG
|
||||
A1UEAxMRUHJveEhUVFBTUHJveHkgQ0EwHhcNMTQwNzI1MDI0NjM1WhcNMjQwNzI0
|
||||
MDI0NjM1WjBWMQswCQYDVQQGEwJDTjEXMBUGA1UEChMOUHJveEhUVFBTUHJveHkx
|
||||
EjAQBgNVBAsTCXB5T3BlblNTTDEaMBgGA1UEAxMRUHJveEhUVFBTUHJveHkgQ0Ew
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDu5tWlBhw7kJ4aqv+Uc/Cy
|
||||
TDNYvE5SV54vjJp7VwU1mVq/VUrcmSsNySrput4fc2jIYs98XH0IWRnEVSqbbtVg
|
||||
tYKbMODRF2DTtdtfGrxjvPW1CJZTGPV8rln1dSTp1ZPOp9n3fHXRRjRyHTOFw+gs
|
||||
0PorxQSEHZNtLQfpXD+ou5PL14hE3f/nO227eFsDR9QJGo14U610U+0T1bMX/7mc
|
||||
0gbLiXoPqQKVFqBCD1Zsq/ZKbHf2jDkg5wjaK6vfGSUEyFaeYWnTVeUDdGy74XRO
|
||||
ZDVLW1lDJM2glZ7I0s6WcgRrrYoDKWkAl/X+SeFkTQuikoUXU8JXGeWuul6p5RjT
|
||||
MIID+DCCAuCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEX
|
||||
MBUGA1UECgwOUHJveEhUVFBTUHJveHkxEjAQBgNVBAsMCXB5T3BlblNTTDEaMBgG
|
||||
A1UEAwwRUHJveEhUVFBTUHJveHkgQ0EwHhcNMTUxMDAxMDc0MDI1W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-----
|
||||
|
@ -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"keyUsage", False, b"keyCertSign, cRLSign"),
|
||||
OpenSSL.crypto.X509Extension(b"subjectKeyIdentifier", False, b"hash", subject=ca)])
|
||||
ca.sign(key, 'sha1')
|
||||
ca.sign(key, 'sha256')
|
||||
with open(capath, 'wb') as fp:
|
||||
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, ca))
|
||||
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.set_serial_number(int(time.time()*10000))
|
||||
cert.set_pubkey(ca.get_pubkey())
|
||||
cert.sign(key, "sha1")
|
||||
cert.sign(key, "sha256")
|
||||
with open(certfile, 'wb') as fp:
|
||||
fp.write(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, cert))
|
||||
fp.write(OpenSSL.crypto.dump_privatekey(OpenSSL.crypto.FILETYPE_PEM, key))
|
||||
|
@ -1,6 +1,17 @@
|
||||
ProxHTTPSProxyMII
|
||||
=================
|
||||
|
||||
Version 1.3.1 (20151001)
|
||||
--------------
|
||||
|
||||
* Certifications are now signed via SHA256 instead of SHA1
|
||||
|
||||
Version 1.3 (20150114)
|
||||
--------------
|
||||
|
||||
+ 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
|
||||
|
||||
Version 1.2 (20141221)
|
||||
--------------
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
_name = 'ProxHTTPSProxyMII'
|
||||
__author__ = 'phoenix'
|
||||
__version__ = 'v1.3a'
|
||||
__version__ = 'v1.3.1'
|
||||
|
||||
CONFIG = "config.ini"
|
||||
CA_CERTS = "cacert.pem"
|
||||
@ -205,11 +205,23 @@ class FrontRequestHandler(ProxyRequestHandler):
|
||||
# Remove hop-by-hop headers
|
||||
self.purge_headers(self.headers)
|
||||
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:
|
||||
# Sometimes 302 redirect would fail with "BadStatusLine" exception, and IE11 doesn't restart the request.
|
||||
# retries=1 instead of retries=False fixes it.
|
||||
#! 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)
|
||||
if not self.ssltunnel:
|
||||
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.purge_headers(self.headers)
|
||||
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:
|
||||
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)
|
||||
if proxy:
|
||||
logger.debug('Using Proxy - %s' % proxy)
|
||||
@ -353,7 +377,7 @@ try:
|
||||
for worker in (frontserver.serve_forever, rearserver.serve_forever,
|
||||
pools.reloadConfig):
|
||||
thread = threading.Thread(target=worker)
|
||||
thread.dameon = True
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
print("=" * 76)
|
||||
@ -364,5 +388,7 @@ try:
|
||||
print(' ParentServer : %s' % config.DEFAULTPROXY)
|
||||
print(' Proxomitron : ' + config.PROXADDR)
|
||||
print("=" * 76)
|
||||
while True:
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
print("Quitting...")
|
||||
|
1635
cacert.pem
1635
cacert.pem
File diff suppressed because it is too large
Load Diff
@ -22,8 +22,8 @@ LogLevel =
|
||||
# [!seq] matches any character not in seq
|
||||
|
||||
[PROXY http://192.168.178.8:8123]
|
||||
duckduckgo.com
|
||||
*.s3.amazonaws.com
|
||||
#duckduckgo.com
|
||||
#*.s3.amazonaws.com
|
||||
|
||||
[PROXY http://192.168.178.8:8124]
|
||||
test.com
|
||||
@ -57,6 +57,9 @@ secure.informaction.com
|
||||
### Bypass Proxomitron and the Rear Server, Proxy setting still effective
|
||||
### This section supports URL matching
|
||||
[BYPASS URL]
|
||||
http://www.abc.com/*
|
||||
https://bcd.net/*
|
||||
*://feedly.com/*
|
||||
*.zip
|
||||
*.rar
|
||||
*.exe
|
||||
|
Loading…
Reference in New Issue
Block a user