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

Implementing authorized_keys function for non-NIP-42 supported clients #8

Closed
wants to merge 4 commits into from
Closed

Implementing authorized_keys function for non-NIP-42 supported clients #8

wants to merge 4 commits into from

Conversation

ftkro
Copy link
Contributor

@ftkro ftkro commented Dec 30, 2023

I expected to start Bostr Relay, which only accepts my public key for reading and writing.
However, I've discovered most iOS clients do not support NIP-42, so I could not make my personal Bostr relay as expected.
Instead, I've added some code in this program to achieve similar goals by checking their public key when they've made writing requests to the Bostr Relay.
Please accept my merge request if you like my idea. Please let me know if you have any suggestions so I can change the code accordingly. If you don't like my idea, please don't hesitate to close this pull request.

@Yonle
Copy link
Owner

Yonle commented Dec 31, 2023

The way i designed to work this way was because the bouncer will only start connect to the relays when it was really you.

Still strange that NIP-42 is not really adopted well yet while it was easy to implement.

@Yonle
Copy link
Owner

Yonle commented Dec 31, 2023

This still works, However user could still do REQ anyway, or even the bouncer autoconnects the relays even for unauthenticated users.

Yonle added a commit that referenced this pull request Jan 1, 2024
Based on: #8
Idea is originally by Takuro Furoda <https://github.com/ftkro>

This feature will only allow transmitting events from specified authors.

Suggested-by: Takuro Furoda
Signed-off-by: Yonle <yonle@lecturify.net>
@Yonle
Copy link
Owner

Yonle commented Jan 1, 2024

Added a feature that work exactly like the code you've write.

You could add your pubkey into approved_publishers array in config.js

@Yonle Yonle closed this Jan 1, 2024
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