i2p uses http prefix

main
Bob Mottram 2020-06-19 22:50:41 +00:00
parent 6610c1a165
commit 1d92aab187
2 changed files with 7 additions and 9 deletions

View File

@ -751,7 +751,7 @@ class PubServer(BaseHTTPRequestHandler):
elif (callingDomain.endswith('.i2p') and
self.server.i2pDomain):
wfResult = \
webfingerMeta('i2p', self.server.i2pDomain)
webfingerMeta('http', self.server.i2pDomain)
else:
wfResult = \
webfingerMeta(self.server.httpPrefix,
@ -772,7 +772,7 @@ class PubServer(BaseHTTPRequestHandler):
elif (callingDomain.endswith('.i2p') and
self.server.i2pDomain):
wfResult = \
webfingerNodeInfo('i2p', self.server.i2pDomain)
webfingerNodeInfo('http', self.server.i2pDomain)
else:
wfResult = \
webfingerNodeInfo(self.server.httpPrefix,
@ -1576,7 +1576,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.onionDomain)
elif (callingDomain.endswith('.i2p') and
self.server.i2pDomain):
msg = htmlTermsOfService(self.server.baseDir, 'i2p',
msg = htmlTermsOfService(self.server.baseDir, 'http',
self.server.i2pDomain)
else:
msg = htmlTermsOfService(self.server.baseDir,
@ -1614,7 +1614,7 @@ class PubServer(BaseHTTPRequestHandler):
None)
elif callingDomain.endswith('.i2p'):
msg = \
htmlAbout(self.server.baseDir, 'i2p',
htmlAbout(self.server.baseDir, 'http',
self.server.i2pDomain,
None)
else:

View File

@ -1651,10 +1651,8 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str,
return 8
withDigest = True
if toDomain.endswith('.onion'):
if toDomain.endswith('.onion') or toDomain.endswith('.i2p'):
httpPrefix = 'http'
elif toDomain.endswith('.i2p'):
httpPrefix = 'i2p'
# sharedInbox = False
if toNickname == 'inbox':
@ -1965,7 +1963,7 @@ def sendToNamedAddresses(session, baseDir: str,
elif i2pDomain:
if toDomain.endswith('.i2p'):
fromDomain = i2pDomain
fromHttpPrefix = 'i2p'
fromHttpPrefix = 'http'
cc = []
sendSignedJson(postJsonObject, session, baseDir,
nickname, fromDomain, port,
@ -2054,7 +2052,7 @@ def sendToFollowers(session, baseDir: str,
elif i2pDomain:
if toDomain.endswith('.i2p'):
fromDomain = i2pDomain
fromHttpPrefix = 'i2p'
fromHttpPrefix = 'http'
if withSharedInbox:
toNickname = followerHandles[index].split('@')[0]