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.

@link2xt link2xt force-pushed the link2xt/iroh-relay branch from 40bc816 to 89706af Compare October 22, 2024 18:34
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 link2xt force-pushed the link2xt/iroh-relay branch from 89706af to ffb51e7 Compare October 28, 2024 05:46
@link2xt link2xt marked this pull request as ready for review October 28, 2024 07:22
@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 link2xt force-pushed the link2xt/iroh-relay branch from 374b87a to e8abe5a Compare October 28, 2024 08:52
@link2xt link2xt requested review from hpk42 and missytake October 28, 2024 09:56
@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.

@link2xt link2xt force-pushed the link2xt/iroh-relay branch from 565d80a to 2032fac Compare October 28, 2024 17:55
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.

@hpk42 hpk42 force-pushed the link2xt/iroh-relay branch from 2032fac to 221e8c9 Compare October 30, 2024 09:35
@hpk42 hpk42 force-pushed the link2xt/iroh-relay branch from 3da40eb to fd2525d Compare October 30, 2024 11:24
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