mirror of
https://github.com/cs01/termpair.git
synced 2026-04-27 05:25:53 +03:00
[GH-ISSUE #39] Unable to connect to session if not served by localhost #13
Labels
No labels
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termpair#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @0xphk on GitHub (Jun 1, 2021).
Original GitHub issue: https://github.com/cs01/termpair/issues/39
Hi,
if I start the server with
termpair serve --host 192.168.x.x --port 8000it successfully binds to the correct interface.The shared session is successful initiated with
termpair share --host "http://192.168.x.x/" --port 8000Browser opens session and server sends HTTP 200 ok (304 for png & js) for every request but the session is always in "connection-pending" state.
If served/shared using localhost instead, it works without issue.
Do I miss something here? Any help appreciated.
@boroveen commented on GitHub (Jun 1, 2021):
As I understand it, this is a software problem and it is a bug. I tried it, and I can say that on one device, for example, the iPhone 6c, it works fine, without problems, but on another phone, corn is the same problem, and from any computer from any browser and distro the same problem. sorry for the mistakes, I am a Russian user and I use a translator
@boroveen commented on GitHub (Jun 1, 2021):
@cs01 commented on GitHub (Jun 2, 2021):
I was able to reproduce this. The problem here is the browser is using window.crypto to access AES encryption/decryption libraries, which are only available in secure contexts. localhost is a secure context, but ip addresses are not necessarily secure. I will improve the error message, but this is a legitimate error you need to fix.
You will need to run the server with an ssl certificate. TermPair supports this:
see
termpair serve --helpfor more details.Alternatively, you can run it behind a proxy running https, as is done at https://grassfedcode.com/termpair, for example