Skip to content

Conversation

olethanh
Copy link
Collaborator

@olethanh olethanh commented Jun 18, 2025

Add domain support via HaProxy

Related ClickUp, GitHub or Jira tickets : ALEPH-565

This PR doesn't handle redirect to the CRN itself at the moment. You need to change the Caddy config to use another port 4443 FIXED

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
  • Documentation has been updated regarding these changes.
  • Dependencies update in the project.toml have been mirrored in the Debian package build script packaging/Makefile

How to test

Setup To test:
On crn

  • Rename /etc/haproxy/haproxy-aleph.cfg to /etc/haproxy/haproxy.cfg to activate it's config
  • Restart haproxy : sudo systemctl restart haproxy

Deploy an instance
Inside instance install nginx .
Choose a domain name. e.g. echo.agot.be
For https Generate a self signed certificate and config nginx to use it.
If you didn't update your dns, force the domain name by update your /etc/hosts

127.0.0.1 localhost echo.agot.be

To test https via curl:
curl -k -v https://echo.agot.be:443

  • -k is to allow the self signed certificate

To test http
curl -v http://echo.agot.be:443

@olethanh olethanh changed the title Ol aleph 565 ipv4 domain support Aleph 565 ipv4 domain support Jun 24, 2025
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 21.07843% with 161 lines in your changes missing coverage. Please review.

Project coverage is 63.90%. Comparing base (e9e6677) to head (cce73ba).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/haproxy.py 18.18% 153 Missing ⚠️
src/aleph/vm/pool.py 42.85% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
- Coverage   65.01%   63.90%   -1.12%     
==========================================
  Files          85       86       +1     
  Lines        7729     7931     +202     
  Branches      670      706      +36     
==========================================
+ Hits         5025     5068      +43     
- Misses       2493     2651     +158     
- Partials      211      212       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@olethanh olethanh force-pushed the ol-aleph-565-ipv4-domain-support branch from 735136f to 7cc688b Compare June 25, 2025 14:03
@olethanh olethanh force-pushed the ol-aleph-565-ipv4-domain-support branch from 4a81d68 to 8d2a0b3 Compare July 10, 2025 20:45
@olethanh olethanh marked this pull request as ready for review July 11, 2025 08:47
@olethanh olethanh force-pushed the ol-aleph-565-ipv4-domain-support branch 2 times, most recently from 6de877c to b68adf5 Compare July 11, 2025 09:51
@olethanh olethanh force-pushed the ol-aleph-565-ipv4-domain-support branch from b68adf5 to ceb85bc Compare July 11, 2025 09:51
Copy link
Member

@nesitor nesitor 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 overall except the 2 comments I added, but I think that we should include also tests for the new class added checking that creates the mapping files well.

@nesitor nesitor self-requested a review July 14, 2025 10:05
@nesitor nesitor merged commit 4512aad into main Jul 14, 2025
20 of 22 checks passed
@nesitor nesitor deleted the ol-aleph-565-ipv4-domain-support branch July 14, 2025 10:05
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