Fix two bugs
This commit is contained in:
parent
efd7c287b7
commit
c57bffcae8
@ -198,9 +198,9 @@ class OnionrCommunicate:
|
|||||||
'''We use socks5h to use tor as DNS'''
|
'''We use socks5h to use tor as DNS'''
|
||||||
proxies = {'http': 'socks5h://127.0.0.1:' + str(socksPort), 'https': 'socks5h://127.0.0.1:' + str(socksPort)}
|
proxies = {'http': 'socks5h://127.0.0.1:' + str(socksPort), 'https': 'socks5h://127.0.0.1:' + str(socksPort)}
|
||||||
headers = {'user-agent': 'PyOnionr'}
|
headers = {'user-agent': 'PyOnionr'}
|
||||||
url = 'http://' + peer + '/public/?action=' + urlencode(action)
|
url = 'http://' + peer + '/public/?action=' + self.urlencode(action)
|
||||||
if data != None:
|
if data != None:
|
||||||
url = url + '&data=' + urlencode(data)
|
url = url + '&data=' + self.urlencode(data)
|
||||||
try:
|
try:
|
||||||
r = requests.get(url, headers=headers, proxies=proxies, timeout=(15, 30))
|
r = requests.get(url, headers=headers, proxies=proxies, timeout=(15, 30))
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import sys, os, configparser, base64, random, getpass, shutil, subprocess, requests, time, logger, platform
|
import sys, os, configparser, base64, random, getpass, shutil, subprocess, requests, time, logger, platform
|
||||||
import api, core
|
import api, core, gui
|
||||||
from onionrutils import OnionrUtils
|
from onionrutils import OnionrUtils
|
||||||
from netcontroller import NetController
|
from netcontroller import NetController
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user