Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hoppscotch agent and agent interceptor #4396

Merged
merged 76 commits into from
Oct 3, 2024
Merged

Conversation

AndrewBastin
Copy link
Member

@AndrewBastin AndrewBastin commented Oct 1, 2024

This PR intends to introduce a new Hoppscotch Interceptor along with the new Hoppscotch Agent app to power it.

The Hoppscotch Agent app is an installable native application that exposes a background HTTP Server that Hoppscotch web app can talk with to run requests against. This allows the Hoppscotch web apps (particularly the SH ones) have ability to run requests without restrictions and is meant to be a stopgap solution until SH gains support in the desktop app.

What's changed

Hoppscotch Common

  • Introduce UI Extension Service as a foundational service that allows additions to be added across various places in the app (currently as an extension to the root app component with feature additions possible).
  • [OFF TOPIC] Debug Service improvements to inject the services under the given ID directly into the window global context (i.e, instead of accessing WORKSPACE_SERVICE by running _getService("WORKSPACE_SERVICE"), you can directly just access it via WORKSPACE_SERVICE variable while debug service is on).
  • Introduce Agent Interceptor Service with the ability to communicate with the Hoppscotch Agent app and handle registrations.
  • Agent Registration UI to register the app against the agent.

Hoppscotch Agent

  • The agent has a registration UI that is automatically summoned when a client requests to connect with the agent.
  • The agent has a background service that shows up in the system tray that allows the user to see info and clear currently set registrations which reset the changes.
  • The agent registers itself against the OS for auto start along with the OS.
  • The agent and the app during the registration, establishes a shared secret (via Curve25519 Diffie-Hellman Key Exchange) and then communicates request information using the shared secret encrypted with AES-GCM algorithm.

jamesgeorge007 and others added 3 commits October 3, 2024 13:21
Prompt the user to install or enable the extension via inspector if the endpoint is `localhost`, and an interceptor other than `Agent` is active.
@jamesgeorge007 jamesgeorge007 merged commit f75900e into next Oct 3, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the feat/agent branch October 3, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants