Skip to content

Comments

Feature/add tls support#855

Open
BeigeBox wants to merge 5 commits intoEFForg:mainfrom
BeigeBox:feature/add-tls-support
Open

Feature/add tls support#855
BeigeBox wants to merge 5 commits intoEFForg:mainfrom
BeigeBox:feature/add-tls-support

Conversation

@BeigeBox
Copy link
Contributor

@BeigeBox BeigeBox commented Feb 5, 2026

Pull Request Checklist

  • The Rayhunter team has recently expressed interest in reviewing a PR for this.
    • It wasn't particularly recent, although there's been interest about adding TLS in the past discussions, folks just didn't want to spend the time to implement it.
  • Added or updated any documentation as needed to support the changes in this PR.
  • Code has been linted and run through cargo fmt.
  • If any new functionality has been added, unit tests were also added.
  • CONTRIBUTING.md has been read.

Tested on Orbic, tests on other hardware are dependent on that hardware availability.

@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 5, 2026

Reference discussion in #849

Copy link
Collaborator

@untitaker untitaker left a comment

Choose a reason for hiding this comment

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

this looks somewhat correct but tls.rs is a lot to review. are you sure that's all necessary? I can't help but notice it's also AI

@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 9, 2026

this looks somewhat correct but tls.rs is a lot to review. are you sure that's all necessary? I can't help but notice it's also AI

It looks long, mostly because I wanted to make sure that this wasn't going to lead to anyone getting locked out due to the feature. There's several things that it does. It sets the IP of the CN based on the IP the device is reporting, and if that fails it uses the device default (192.168.1.1 for orbic, etc). That way the IP at least matches the IP you're connecting to over wifi. The cert may not be validated through the trust chain in the browser, but it's CN at least matches.

It always checks the certificate is not junk, and if it is corrupted or bad in some way it attempts to regenerate the certificate up to 3 times. Failing that it shows a clear message to the user and falls back to HTTP mode. This means nobody getting stuck with HTTPS broken.

We're also setting the permissions for the key to make it secure as possible (I know the device is vulnerable af but we may as well stick to best practices where possible).

The rest of the length of tls.rs is just the tests, I shouldn't have them in that file that's my bad and I'll remove that. I did use Claude to help write some of this, although it was an actual collaboration not just a 'go do this'. I've also tested on actual hardware as well.

@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 9, 2026

Now that I'm on lunch, let me see if I can simplify this a bit.

…issues. Replaced aws-lc-rs with less heavy dep which didn't require cmake for build.
@BeigeBox BeigeBox force-pushed the feature/add-tls-support branch from c818496 to d2e0e57 Compare February 9, 2026 22:44
@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 9, 2026

I did a rebase so it's cleaner; removed the code to dynamically get the IP, simplified the tests a bit.

@BeigeBox BeigeBox force-pushed the feature/add-tls-support branch from d2e0e57 to c359d1a Compare February 9, 2026 22:47
@BeigeBox BeigeBox force-pushed the feature/add-tls-support branch from c359d1a to 65e00df Compare February 9, 2026 23:23
Add null guard in tls_hosts oninput handler to satisfy TypeScript strict null checks.
@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 9, 2026

The automated checks are acting up, I need to figure a way to get these to run locally.

@BeigeBox
Copy link
Contributor Author

BeigeBox commented Feb 9, 2026

Gah, don't have time for this now. I'll install act and run the pipelines locally when I can. Sorry about that folks.

@BeigeBox BeigeBox marked this pull request as draft February 9, 2026 23:31
@BeigeBox BeigeBox marked this pull request as ready for review February 10, 2026 00:01
@BeigeBox
Copy link
Contributor Author

Checks should all pass now

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.

2 participants