Skip to content

Commit

Permalink
Update TunnaClient.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nvssks authored Oct 7, 2016
1 parent ed9bee4 commit 305d31d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/TunnaClient.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tunna v1.1a
import select
import urllib2
import urllib2, ssl
import cookielib
import gzip, zlib, StringIO
from time import time, sleep, asctime
Expand Down Expand Up @@ -229,7 +229,13 @@ def buildOpener(self):
handler.append(urllib2.ProxyHandler({'http':self.options['upProxy']}))
else:
handler.append(urllib2.ProxyHandler({'https':self.options['upProxy']}))


if self.options['ignoreServerCert']:
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
handler.append(urllib2.HTTPSHandler(context=ctx))

opener = urllib2.build_opener(*handler)

opener.addheaders = [('Accept-encoding', 'gzip')]
Expand Down

0 comments on commit 305d31d

Please sign in to comment.