awesome! General config + theming coming soon.
Discussion
I set the default url to this, it should work in most cases:
`${window.location.protocol === "https:" ? "wss:" : "ws:"}//${window.location.host}`
wanna send a gist or a patch? not parsing well in client?
minus the second "?"
Thanks! While that may appear to support many cases, it doesn't support the case where a relay isn't at root (in a subdirectory). Unset url case is handled here:
https://github.com/sandwichfarm/myrelay.page/blob/main/src/lib/core/MRP.ts#L119-L128
It additionally handles potential issue where someone attempts to connect to `wss` from `http` or vice-versa (would throw client-side errors) by clamping websocket/http SSL in alignment with browser limitations, which is implicitly compatible with onion.
Coracle stripped the line number hash on me `#L119-L128`
Ok, I think I understand. In general, you shouldn't have to set the URL. It handles detection and handles both ws (necessary for edge-cases and onion relays) and wss in the url setter. There's no harm in setting it manually ofc, but it's an unnecessary step.