Set both ports when sending to non-clearnet instances

main
Bob Mottram 2022-03-13 13:02:53 +00:00
parent b676a15f77
commit f1c2ea7002
3 changed files with 6 additions and 0 deletions

View File

@ -3381,6 +3381,7 @@ class PubServer(BaseHTTPRequestHandler):
curr_session = self.server.session_onion
curr_domain = onion_domain
curr_port = 80
following_port = 80
curr_http_prefix = 'http'
curr_proxy_type = 'tor'
if i2p_domain:
@ -3388,6 +3389,7 @@ class PubServer(BaseHTTPRequestHandler):
curr_session = self.server.session_i2p
curr_domain = i2p_domain
curr_port = 80
following_port = 80
curr_http_prefix = 'http'
curr_proxy_type = 'i2p'

View File

@ -4023,11 +4023,13 @@ def _receive_follow_request(session, session_onion, session_i2p,
curr_http_prefix = 'http'
curr_domain = onion_domain
curr_port = 80
port = 80
elif i2p_domain and domain_to_follow.endswith('.i2p'):
curr_session = session_i2p
curr_http_prefix = 'http'
curr_domain = i2p_domain
curr_port = 80
port = 80
# is the actor sending the request valid?
if not valid_sending_actor(curr_session, base_dir,

View File

@ -222,12 +222,14 @@ def manual_approve_follow_request(session, session_onion, session_i2p,
approve_domain.endswith('.onion'):
curr_domain = onion_domain
curr_port = 80
approve_port = 80
curr_session = session_onion
curr_http_prefix = 'http'
elif (i2p_domain and
approve_domain.endswith('.i2p')):
curr_domain = i2p_domain
curr_port = 80
approve_port = 80
curr_session = session_i2p
curr_http_prefix = 'http'