mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-22 09:32:36 -05:00
[PR #501] [MERGED] Add option to customise TLS server name in resource settings #7104
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/501
Author: @achtnullzwei
Created: 4/9/2025
Status: ✅ Merged
Merged: 4/20/2025
Merged by: @miloschwartz
Base:
dev← Head:customize-tls-server-name📝 Commits (4)
674316aadd option to set TLS Server Name517bc7fadded table change to new migration script64a2cc2adjusting field description; fix migration script; trying to resolve conflict in updateResource.ts25c125badded advanced section to general page & custom host header field📊 Changes
8 files changed (+267 additions, -7 deletions)
View changed files
📝
server/db/schemas/schema.ts(+3 -1)📝
server/lib/schemas.ts(+7 -0)📝
server/routers/resource/listResources.ts(+6 -2)📝
server/routers/resource/updateResource.ts(+22 -1)📝
server/routers/traefik/getTraefikConfig.ts(+42 -1)📝
server/setup/migrations.ts(+3 -1)➕
server/setup/scripts/1.3.0.ts(+26 -0)📝
src/app/[orgId]/settings/resources/[resourceId]/general/page.tsx(+158 -1)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Added an option to set a custom TLS Server Name to solve the issue with strict SNI checks. I have added it to the "General" page in Resource settings. Couldn't rly think of a better place, and didn't want to create a new section for it. Also it doesn't make sense to set this on target level. Happy to adjust if needed.
Usage:
Value is stored in the resource table in a new column names tlsServerName. Hence, this would require to be covered in the migration scripts. I added a draft migration for future version 1.3.0 as a suggestion.
Screenshot:
Notes:
This is my very first contribution to any project on Github. I usually just work on my own project, but I felt I would like to contribute and get this feature implemented. In any case, I am kindly asking for some patience, if I did sth wrong. I am not rly used to write TS, but it was a lot of fun trying to understand the language a bit more, the code you created and add a feature to it. With respect to the pull request, I saw in the contribution guidelines, that contributions are supposed to be added to main branch. However, my changes would probably break without altering the database and having migration scripts properly added. I added a draft for that at least. Furthermore, I saw some recent pull requests made against dev branch. I hope that's ok. Otherwise, I can change it to the main branch.
How to test?
Build from sources and use docker image. I did test this as extensively as I could and can validate it works, at least in my homelab. I did test it on a live VPS with whoami containers and multiple levels of cascaded reverse-proxies. Also checked for UI issues as much as I can.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.