Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy iroh relay #434

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Deploy iroh relay #434

merged 5 commits into from
Oct 30, 2024

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Oct 22, 2024

No description provided.

server.shell(
name="Download iroh-relay",
commands=[
"(echo '8af7f6d29d17476ce5c3053c3161db5793cb2ac49057d0bcaf689436cdccbeab /usr/local/bin/iroh-relay' | sha256sum -c) || curl -L https://github.com/n0-computer/iroh/releases/download/v0.27.0/iroh-relay-v0.27.0-x86_64-unknown-linux-musl.tar.gz | gunzip | tar -x -f - ./iroh-relay -O >/usr/local/bin/iroh-relay",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the checksum check really doing? the check does not happen after the file is downloaded -- so we are basically running an unchecked binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just an update mechanism to avoid downloading if the file is already here and has expected checksum.

@link2xt
Copy link
Contributor Author

link2xt commented Oct 28, 2024

I had to add iroh CNAME manually on the staging NS server because otherwise initial checks failed before new DNS zone file is deployed.

@link2xt
Copy link
Contributor Author

link2xt commented Oct 28, 2024

Can also wait for n0-computer/iroh#2847 so we don't need a writable config.

http_bind_addr = "[::]:3340"
enable_stun = true
enable_metrics = false
metrics_bind_addr = "127.0.0.1:9092"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this address must be set even if "enable_metrics" is false?

Copy link
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. But i'd keep an opt-out iroh_relay setting. i.e. upgrading automatically uses iroh.{mail_domain} but if you set iroh_relay = to anything that the systemd-service is not enabled, and Delta Chat users see this setting if it contains something not-empty.

Copy link
Contributor

@missytake missytake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One thing:

mail_domain = remote_data["mail_domain"]
if not remote_data["A"] and not remote_data["AAAA"]:
print(f"Missing A and/or AAAA DNS records for {mail_domain}!")
elif remote_data["MTA_STS"] != f"{mail_domain}.":
print("Missing MTA-STS CNAME record:")
print(f"mta-sts.{mail_domain}. CNAME {mail_domain}.")
elif require_iroh and remote_data["IROH"] != f"{mail_domain}.":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elif require_iroh and remote_data["IROH"] != f"{mail_domain}.":
elif require_iroh and remote_data["IROH"] != f"iroh.{mail_domain}.":

This needs to compare against the DNS record being iroh.example.org, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is CNAME record, it should point from iroh.example.org to just example.org.

@missytake
Copy link
Contributor

Can also wait for n0-computer/iroh#2847 so we don't need a writable config.

I think this is not so important. I'll set myself a reminder to chmod -w in 2 months or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants