我没写这么复杂的逻辑😂 有可能是 Safari 不允许 https 网页访问本地服务
Discussion
0xchat也不行,不行的都没要求本地网络设备权限。
换PC试试😂
电脑浏览器 inspect看到的error
DOMException: The operation is insecure.inspect
index-dPzpIWUu.js:1662:15898
使用 jumble.social 浏览本地中继器报的错?
嗯,就加局域网中继一个,发布失败的error
火狐浏览器
确实,我试了火狐和 chrome 都不行,浏览 https 网页时无法发起 ws:// 连接,除非是 localhost。
Mixed Content: The page at 'https://jumble.social/settings/relays' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://192.168.1.105:4869/'. This request has been blocked; this endpoint must be available over WSS.

可以考虑使用 pigeon 做个反向代理,然后就可以通过互联网访问。不过这个只是一个 demo,还存在一些小问题,完整版集成进了 nostr-relay-tray。你如果要用的话我可以完善一下。
https://github.com/CodyTseng/pigeon/blob/master/pigeon/README.md