[GH-ISSUE #19] 别人知道我的服务器和端口,就能注册设备来使用这个服务了吗 #18

Closed
opened 2026-03-03 11:33:22 +03:00 by kerem · 1 comment
Owner

Originally created by @goodryb on GitHub (Mar 11, 2019).
Original GitHub issue: https://github.com/Finb/Bark/issues/19

自己搭建了服务端,在客户端添加服务器的时候,貌似没有看到特别的鉴权限制,添加的服务器的地址和端口就能添加成功,那这样是不是别人知道我的服务器和端口,就能注册设备来使用这个服务了?

Originally created by @goodryb on GitHub (Mar 11, 2019). Original GitHub issue: https://github.com/Finb/Bark/issues/19 自己搭建了服务端,在客户端添加服务器的时候,貌似没有看到特别的鉴权限制,添加的服务器的地址和端口就能添加成功,那这样是不是别人知道我的服务器和端口,就能注册设备来使用这个服务了?
kerem closed this issue 2026-03-03 11:33:22 +03:00
Author
Owner

@Finb commented on GitHub (Mar 11, 2019):

是没有鉴权限制的

单纯的知道服务器地址和端口,并不能知道这是一个Bark后端服务。
你不宣传一下,估计不会有人用你的服务。

需要鉴权的话,有一些变通方案。

比如可以用类似nginx allow ip 那种方式,只允许你指定的IP访问服务。

或者,利用nginx 重写URL ,在 url 前面加一些类似key的密码,
例如

https://api.day.app/你定义的password/{barkkey}/{body}

这样,别人猜不到你服务的URL是多少, 不知道 URL 自然就用不了你的服务

<!-- gh-comment-id:471460551 --> @Finb commented on GitHub (Mar 11, 2019): 是没有鉴权限制的 单纯的知道服务器地址和端口,并不能知道这是一个Bark后端服务。 你不宣传一下,估计不会有人用你的服务。 需要鉴权的话,有一些变通方案。 比如可以用类似nginx allow ip 那种方式,只允许你指定的IP访问服务。 或者,利用nginx 重写URL ,在 url 前面加一些类似key的密码, 例如 ``` https://api.day.app/你定义的password/{barkkey}/{body} ``` 这样,别人猜不到你服务的URL是多少, 不知道 URL 自然就用不了你的服务
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Bark#18
No description provided.