mirror of https://gitlab.com/bashrc2/epicyon
Check that original domain is not onion or i2p
parent
c3838367c2
commit
7145900ff9
|
@ -3379,7 +3379,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
curr_http_prefix = http_prefix
|
curr_http_prefix = http_prefix
|
||||||
curr_proxy_type = proxy_type
|
curr_proxy_type = proxy_type
|
||||||
if onion_domain:
|
if onion_domain:
|
||||||
if following_domain.endswith('.onion'):
|
if not curr_domain.endswith('.onion') and \
|
||||||
|
following_domain.endswith('.onion'):
|
||||||
curr_session = self.server.session_onion
|
curr_session = self.server.session_onion
|
||||||
curr_domain = onion_domain
|
curr_domain = onion_domain
|
||||||
curr_port = 80
|
curr_port = 80
|
||||||
|
@ -3387,7 +3388,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
curr_http_prefix = 'http'
|
curr_http_prefix = 'http'
|
||||||
curr_proxy_type = 'tor'
|
curr_proxy_type = 'tor'
|
||||||
if i2p_domain:
|
if i2p_domain:
|
||||||
if following_domain.endswith('.i2p'):
|
if not curr_domain.endswith('.i2p') and \
|
||||||
|
following_domain.endswith('.i2p'):
|
||||||
curr_session = self.server.session_i2p
|
curr_session = self.server.session_i2p
|
||||||
curr_domain = i2p_domain
|
curr_domain = i2p_domain
|
||||||
curr_port = 80
|
curr_port = 80
|
||||||
|
|
8
inbox.py
8
inbox.py
|
@ -4045,7 +4045,9 @@ def _receive_follow_request(session, session_onion, session_i2p,
|
||||||
curr_http_prefix = http_prefix
|
curr_http_prefix = http_prefix
|
||||||
curr_domain = domain
|
curr_domain = domain
|
||||||
curr_port = from_port
|
curr_port = from_port
|
||||||
if onion_domain and domain_to_follow.endswith('.onion'):
|
if onion_domain and \
|
||||||
|
not curr_domain.endswith('.onion') and \
|
||||||
|
domain_to_follow.endswith('.onion'):
|
||||||
curr_session = session_onion
|
curr_session = session_onion
|
||||||
curr_http_prefix = 'http'
|
curr_http_prefix = 'http'
|
||||||
curr_domain = onion_domain
|
curr_domain = onion_domain
|
||||||
|
@ -4053,7 +4055,9 @@ def _receive_follow_request(session, session_onion, session_i2p,
|
||||||
port = 80
|
port = 80
|
||||||
if debug:
|
if debug:
|
||||||
print('Domain switched from ' + domain + ' to ' + curr_domain)
|
print('Domain switched from ' + domain + ' to ' + curr_domain)
|
||||||
elif i2p_domain and domain_to_follow.endswith('.i2p'):
|
elif (i2p_domain and
|
||||||
|
not curr_domain.endswith('.i2p') and
|
||||||
|
domain_to_follow.endswith('.i2p')):
|
||||||
curr_session = session_i2p
|
curr_session = session_i2p
|
||||||
curr_http_prefix = 'http'
|
curr_http_prefix = 'http'
|
||||||
curr_domain = i2p_domain
|
curr_domain = i2p_domain
|
||||||
|
|
|
@ -222,6 +222,7 @@ def manual_approve_follow_request(session, session_onion, session_i2p,
|
||||||
curr_http_prefix = http_prefix
|
curr_http_prefix = http_prefix
|
||||||
curr_proxy_type = proxy_type
|
curr_proxy_type = proxy_type
|
||||||
if onion_domain and \
|
if onion_domain and \
|
||||||
|
not curr_domain.endswith('.onion') and \
|
||||||
approve_domain.endswith('.onion'):
|
approve_domain.endswith('.onion'):
|
||||||
curr_domain = onion_domain
|
curr_domain = onion_domain
|
||||||
curr_port = 80
|
curr_port = 80
|
||||||
|
@ -230,6 +231,7 @@ def manual_approve_follow_request(session, session_onion, session_i2p,
|
||||||
curr_http_prefix = 'http'
|
curr_http_prefix = 'http'
|
||||||
curr_proxy_type = 'tor'
|
curr_proxy_type = 'tor'
|
||||||
elif (i2p_domain and
|
elif (i2p_domain and
|
||||||
|
not curr_domain.endswith('.i2p') and
|
||||||
approve_domain.endswith('.i2p')):
|
approve_domain.endswith('.i2p')):
|
||||||
curr_domain = i2p_domain
|
curr_domain = i2p_domain
|
||||||
curr_port = 80
|
curr_port = 80
|
||||||
|
|
6
posts.py
6
posts.py
|
@ -3115,7 +3115,8 @@ def _send_to_named_addresses(session, session_onion, session_i2p,
|
||||||
from_http_prefix = http_prefix
|
from_http_prefix = http_prefix
|
||||||
curr_session = session
|
curr_session = session
|
||||||
if onion_domain:
|
if onion_domain:
|
||||||
if to_domain.endswith('.onion'):
|
if not from_domain.endswith('.onion') and \
|
||||||
|
to_domain.endswith('.onion'):
|
||||||
from_domain = onion_domain
|
from_domain = onion_domain
|
||||||
from_domain_full = onion_domain
|
from_domain_full = onion_domain
|
||||||
from_http_prefix = 'http'
|
from_http_prefix = 'http'
|
||||||
|
@ -3123,7 +3124,8 @@ def _send_to_named_addresses(session, session_onion, session_i2p,
|
||||||
port = 80
|
port = 80
|
||||||
to_port = 80
|
to_port = 80
|
||||||
if i2p_domain:
|
if i2p_domain:
|
||||||
if to_domain.endswith('.i2p'):
|
if not from_domain.endswith('.i2p') and \
|
||||||
|
to_domain.endswith('.i2p'):
|
||||||
from_domain = i2p_domain
|
from_domain = i2p_domain
|
||||||
from_domain_full = i2p_domain
|
from_domain_full = i2p_domain
|
||||||
from_http_prefix = 'http'
|
from_http_prefix = 'http'
|
||||||
|
|
Loading…
Reference in New Issue