mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-09 18:08:00 +00:00
Compare commits
5 commits
7d37ec8145
...
aa8090eebb
Author | SHA1 | Date | |
---|---|---|---|
aa8090eebb | |||
f287b84ea3 | |||
dc74bfb588 | |||
e281a06e7f | |||
8f16cab048 |
|
@ -26,6 +26,13 @@ class Application(web.Application):
|
|||
if not self['config'].load():
|
||||
self['config'].save()
|
||||
|
||||
if self.config.is_docker:
|
||||
self.config.update({
|
||||
'db': '/data/relay.jsonld',
|
||||
'listen': '0.0.0.0',
|
||||
'port': 8080
|
||||
})
|
||||
|
||||
self['workers'] = []
|
||||
self['last_worker'] = 0
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class RelayDatabase(dict):
|
|||
|
||||
if not self['private-key']:
|
||||
logging.info("No actor keys present, generating 4096-bit RSA keypair.")
|
||||
self.signer = aputils.Signer.new(self.config.keyid, 4096)
|
||||
self.signer = aputils.Signer.new(self.config.keyid, size=4096)
|
||||
self['private-key'] = self.signer.export()
|
||||
|
||||
else:
|
||||
|
|
|
@ -159,7 +159,7 @@ class HttpClient:
|
|||
return logging.verbose(await resp.read()) # change this to debug
|
||||
|
||||
except (ClientConnectorError, ServerTimeoutError):
|
||||
logging.verbose(f'Failed to connect to {url.netloc}')
|
||||
logging.verbose(f'Failed to connect to {url}')
|
||||
|
||||
## prevent workers from being brought down
|
||||
except Exception as e:
|
||||
|
@ -174,6 +174,10 @@ class HttpClient:
|
|||
loads = WellKnownNodeinfo.new_from_json
|
||||
)
|
||||
|
||||
if not wk_nodeinfo:
|
||||
logging.verbose(f'Failed to fetch well-known nodeinfo url for domain: {domain}')
|
||||
return False
|
||||
|
||||
for version in ['20', '21']:
|
||||
try:
|
||||
nodeinfo_url = wk_nodeinfo.get_url(version)
|
||||
|
|
|
@ -43,6 +43,7 @@ def cli_setup():
|
|||
|
||||
click.echo('The domain must not be example.com')
|
||||
|
||||
if not app.config.is_docker:
|
||||
app.config.listen = click.prompt('Which address should the relay listen on?', default=app.config.listen)
|
||||
|
||||
while True:
|
||||
|
|
|
@ -28,7 +28,7 @@ install_requires =
|
|||
click >= 8.1.2
|
||||
pycryptodome >= 3.14.1
|
||||
PyYAML >= 5.0.0
|
||||
aputils @ https://git.barkshark.xyz/barkshark/aputils/archive/0.1.2.tar.gz
|
||||
aputils @ git+https://git.barkshark.xyz/barkshark/aputils@2cd1776f12
|
||||
python_requires = >=3.6
|
||||
|
||||
[options.extras_require]
|
||||
|
|
Loading…
Reference in a new issue