Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add localHost option to allow changing of federation host#17222

Open
kenshineto wants to merge 1 commit intomisskey-dev:developfrom
kenshineto:develop
Open

feat: add localHost option to allow changing of federation host#17222
kenshineto wants to merge 1 commit intomisskey-dev:developfrom
kenshineto:develop

Conversation

Copy link

kenshineto commented Mar 6, 2026

What

Add a userHost option in config that allows instances to use a seperate host for their user ids instead of using the host from the instance url.

For #17212

Why

This mirrors a feature that mastodon has with its LOCAL_URL and WEB_URL options. It allows instances to host their instances on any url without having to compromise their user ids. For example I am running this change on my instance social.freya.cat with all user ids @freya.cat.

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

github-project-automation bot moved this to Todo in [Shi Yan Zhong ] Guan Li Yong Mar 6, 2026
dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 6, 2026
github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR labels Mar 6, 2026
Copy link
Contributor

github-actions bot commented Mar 6, 2026 *
edited
Loading

konoPRniyoruapi.jsonnoChai Fen
Chai Fen haarimasen.
Get diff files from Workflow Page

Copy link
Contributor

github-actions bot commented Mar 6, 2026 *
edited
Loading

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 329.23 MB 310.55 MB -18.67 MB -5.67%
VmHWM 329.23 MB 311.15 MB -18.07 MB -5.49%
VmSize 23123.45 MB 23104.70 MB -18.75 MB -0.08%
VmData 1392.72 MB 1375.50 MB -17.22 MB -1.23%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 329.24 MB 310.56 MB -18.68 MB -5.67%
VmHWM 329.24 MB 311.16 MB -18.08 MB -5.49%
VmSize 23123.45 MB 23104.70 MB -18.75 MB -0.08%
VmData 1392.72 MB 1375.50 MB -17.22 MB -1.23%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 329.69 MB 310.99 MB -18.69 MB -5.67%
VmHWM 329.69 MB 311.37 MB -18.31 MB -5.55%
VmSize 23123.53 MB 23104.86 MB -18.66 MB -0.08%
VmData 1392.81 MB 1375.59 MB -17.21 MB -1.23%

See workflow logs for details

Copy link

codecov bot commented Mar 6, 2026 *
edited
Loading

Codecov Report

Patch coverage is 32.60870% with 31 lines in your changes missing coverage. Please review.
Project coverage is 63.56%. Comparing base (9377e94) to head (e0f6535).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/accounts.ts 0.00% 9 Missing
packages/frontend/src/preferences/manager.ts 0.00% 0 Missing and 6 partials
packages/frontend/src/components/MkPostForm.vue 0.00% 1 Missing and 2 partials
...kages/backend/src/server/WellKnownServerService.ts 0.00% 2 Missing
packages/frontend/src/utility/get-note-menu.ts 0.00% 2 Missing
packages/frontend/src/utility/get-user-menu.ts 0.00% 0 Missing and 2 partials
...kages/backend/src/core/RemoteUserResolveService.ts 0.00% 1 Missing
packages/backend/src/core/UtilityService.ts 66.66% 1 Missing
packages/backend/src/server/ServerService.ts 0.00% 1 Missing
packages/backend/src/server/web/FeedService.ts 0.00% 1 Missing
... and 3 more
Additional details and impacted files
@@ Coverage Diff @@
## develop #17222 +/- ##
===========================================
- Coverage 63.57% 63.56% -0.01%
===========================================
Files 1161 1161
Lines 116244 116254 +10
Branches 8371 8365 -6
===========================================
+ Hits 73900 73902 +2
+ Misses 40159 40148 -11
- Partials 2185 2204 +19

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.

Copy link
Author

kenshineto commented Mar 6, 2026

I use to have this setup where config.url was changed to webUrl, and localUrl was the option added. This ended up changing most of the files within the project, which was honestly too many. So this PR as its written now only modifies the places where userHost should be used instead.

I manually went though every use of url, host, and hostname and figured out (to by best judgement) which one should be used (url or userHost). Hopefully I got them all :)

kenshineto force-pushed the develop branch 2 times, most recently from ec29e21 to a730f59 Compare March 6, 2026 23:42
kakkokari-gtyih linked an issue Mar 7, 2026 that may be closed by this pull request
1 task
kenshineto force-pushed the develop branch 2 times, most recently from b5e62b3 to 983f2a0 Compare March 7, 2026 20:12
kenshineto changed the title feat: add userHost option to allow instances to have seperate user ho... feat: add localHost option to allow changing of federation host Mar 7, 2026
kenshineto force-pushed the develop branch 2 times, most recently from 1fc6705 to 8f270a2 Compare March 7, 2026 23:16
Copy link
Author

kenshineto commented Mar 7, 2026

Renamed option form userHost to localHost since userHost is already used in misskey.

kenshineto force-pushed the develop branch 4 times, most recently from fb9f7f7 to cdb6e5f Compare March 10, 2026 00:50
kenshineto force-pushed the develop branch from cdb6e5f to e0f6535 Compare March 10, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Seperate domains for web hosting and user unique identifiers

1 participant