[PR #49] [MERGED] allow frontend to be served statically #61

Closed
opened 2026-03-03 01:21:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cs01/termpair/pull/49
Author: @cs01
Created: 6/3/2021
Status: Merged
Merged: 8/6/2021
Merged by: @cs01

Base: masterHead: cs01/standalone-frontend


📝 Commits (7)

  • 3bd3c3f statically hosted page works
  • 1bc68d8 fix lint error
  • ca9790b css updates; doc updates; allow terminal id to be entered on regular server
  • 0093b9f update noxfile
  • a84079b add link to static site in readme
  • b8bdf0f fix typos
  • 68479ff put inputs in a form so they are remembered

📊 Changes

10 files changed (+422 additions, -114 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 CONTRIBUTING.md (+14 -4)
📝 README.md (+25 -11)
📝 docs/termpair_architecture.excalidraw (+5 -5)
📝 docs/termpair_architecture.png (+0 -0)
📝 noxfile.py (+18 -0)
📝 termpair/frontend_src/package.json (+0 -1)
📝 termpair/frontend_src/src/App.tsx (+307 -69)
📝 termpair/server.py (+15 -0)
📝 termpair/share.py (+32 -24)

📄 Description

This implements a static frontend as suggested in #36.

background

Currently, the browser contains decrypted data and the encryption key. If the browser's JavaScript were modified to be malicious and a malicious server were created, it would be hard to detect.

this pr

This PR allows the backend to accept cross origin requests, and the frontend to be served statically on GitHub pages, Vercel, or a local static server, which can be manually built. The static page still routes the terminal traffic through a (potentially) untrusted server, but that is okay since the traffic is encrypted before going over the wire.

Changes

  • Accept cross origin requests on backend
  • Create script to publish built frontend to https://cs01.github.io/termpair/connect/
  • Make UI to define url of TermPair server where encrypted terminal data should be sent via websocket
  • Also added UI to let regular server specify Terminal ID on the landing page instead of requiring it in the URL
  • Update docs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cs01/termpair/pull/49 **Author:** [@cs01](https://github.com/cs01) **Created:** 6/3/2021 **Status:** ✅ Merged **Merged:** 8/6/2021 **Merged by:** [@cs01](https://github.com/cs01) **Base:** `master` ← **Head:** `cs01/standalone-frontend` --- ### 📝 Commits (7) - [`3bd3c3f`](https://github.com/cs01/termpair/commit/3bd3c3f68b67b82942ce89390de91bdeb8ecc5b5) statically hosted page works - [`1bc68d8`](https://github.com/cs01/termpair/commit/1bc68d83d5b7080b757760b051329ecd0ca16f53) fix lint error - [`ca9790b`](https://github.com/cs01/termpair/commit/ca9790bb849071cd8ff2bbb26e51beba1893f20e) css updates; doc updates; allow terminal id to be entered on regular server - [`0093b9f`](https://github.com/cs01/termpair/commit/0093b9f9403a7b65a824081fb909b6331bc4b586) update noxfile - [`a84079b`](https://github.com/cs01/termpair/commit/a84079b5e4c8245a678d3f12e3503b11cf7c25ee) add link to static site in readme - [`b8bdf0f`](https://github.com/cs01/termpair/commit/b8bdf0f534c39d754900ea87b391229800a9bd73) fix typos - [`68479ff`](https://github.com/cs01/termpair/commit/68479ffc3b34948002f7efd49e315199b70f9a3d) put inputs in a form so they are remembered ### 📊 Changes **10 files changed** (+422 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `CONTRIBUTING.md` (+14 -4) 📝 `README.md` (+25 -11) 📝 `docs/termpair_architecture.excalidraw` (+5 -5) 📝 `docs/termpair_architecture.png` (+0 -0) 📝 `noxfile.py` (+18 -0) 📝 `termpair/frontend_src/package.json` (+0 -1) 📝 `termpair/frontend_src/src/App.tsx` (+307 -69) 📝 `termpair/server.py` (+15 -0) 📝 `termpair/share.py` (+32 -24) </details> ### 📄 Description This implements a static frontend as suggested in #36. ## background Currently, the browser contains decrypted data and the encryption key. If the browser's JavaScript were modified to be malicious and a malicious server were created, it would be hard to detect. ## this pr This PR allows the backend to accept cross origin requests, and the frontend to be served statically on GitHub pages, Vercel, or a local static server, which can be manually built. The static page still routes the terminal traffic through a (potentially) untrusted server, but that is okay since the traffic is encrypted before going over the wire. ## Changes * Accept cross origin requests on backend * Create script to publish built frontend to https://cs01.github.io/termpair/connect/ * Make UI to define url of TermPair server where encrypted terminal data should be sent via websocket * Also added UI to let regular server specify Terminal ID on the landing page instead of requiring it in the URL * Update docs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:21:27 +03:00
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/termpair#61
No description provided.