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
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
07678be
feat: hoppscotch-interceptor init
CuriousCorrelation Sep 24, 2024
6381275
fix: avoid clone in favor of renaming
CuriousCorrelation Sep 24, 2024
e5632b4
misc: add todo notes
CuriousCorrelation Sep 24, 2024
9d7c36f
feat: typed registration key
CuriousCorrelation Sep 24, 2024
e93c5bb
feat: use `dashmap` for concurrent hasmap
CuriousCorrelation Sep 24, 2024
ca87c27
fix: avoid creating duplicate `auth_key`
CuriousCorrelation Sep 24, 2024
4ae8b31
perf: launch server process inside tauri app
CuriousCorrelation Sep 24, 2024
c1b2263
refactor: flatten directory structure
CuriousCorrelation Sep 25, 2024
b4c673c
feat: graceful-shutdown to avoid leaking server connections
CuriousCorrelation Sep 25, 2024
5d91085
feat|wip: generate otp with tauri command
CuriousCorrelation Sep 25, 2024
dabc619
feat: otp management and handlers
CuriousCorrelation Sep 25, 2024
e6fd786
feat: consolidated state management
CuriousCorrelation Sep 25, 2024
b300a5d
ref: move otp generation to app state
CuriousCorrelation Sep 25, 2024
2ee9693
feat: show server's `port` and `addr`
CuriousCorrelation Sep 25, 2024
f010bb7
feat: full interception flow
CuriousCorrelation Sep 25, 2024
63cf17f
fix: the absolute classic `cors` error
CuriousCorrelation Sep 25, 2024
6c75f87
feat: interceptor with server mocking
CuriousCorrelation Sep 25, 2024
e94373f
feat: auth key and otp display box
CuriousCorrelation Sep 25, 2024
4a2d3de
fix: vue app lib alias
CuriousCorrelation Sep 25, 2024
eecb124
feat: `authenticated` event on OTP verification
CuriousCorrelation Sep 25, 2024
59273b4
perf: use tauri async-runtime to coordinate server ops
CuriousCorrelation Sep 26, 2024
5f43062
ref: naming for registration flow
CuriousCorrelation Sep 26, 2024
2620a6c
fix: allow all `cors` origins
CuriousCorrelation Sep 26, 2024
425bfe3
feat: full flow test with `curl`
CuriousCorrelation Sep 26, 2024
0f30637
fix: remove test for request with parameters in headers
CuriousCorrelation Sep 26, 2024
ac34fd5
feat: use curl for `ntlm` auth support
CuriousCorrelation Sep 26, 2024
316dbc4
feat: relax auth token expiry duration to 24 hrs
CuriousCorrelation Sep 26, 2024
65804b8
feat: initial implementation of agent interceptor
AndrewBastin Sep 26, 2024
1bbf939
refactor: allow debug service to expose service instances directly to…
AndrewBastin Sep 26, 2024
8501ef1
chore: remove parameters field
AndrewBastin Sep 26, 2024
906b7d4
feat: initial ui iteration
AndrewBastin Sep 26, 2024
b6e4cf0
feat: run app in the background when dialog is closed quit when agent…
AndrewBastin Sep 26, 2024
3e8e801
fix: remove parameters from `interceptor_test`
CuriousCorrelation Sep 27, 2024
819d6e0
docs: add `description` and `authors`
CuriousCorrelation Sep 27, 2024
ea06971
refactor: axum with `very_permissive` cors layer
CuriousCorrelation Sep 27, 2024
1f48672
fix: ambiguous error on response failures
CuriousCorrelation Sep 27, 2024
941a49f
fix: missing `Bearer` prefix for `Authorization`
CuriousCorrelation Sep 27, 2024
d6b1d20
fix: prepend 'Bearer' to Authorization header
CuriousCorrelation Sep 27, 2024
e968bc3
fix: consolidate error handling
CuriousCorrelation Sep 27, 2024
33efc85
feat: transfer parameters to url
CuriousCorrelation Sep 27, 2024
561f358
fix: persist keys to 'agent_interceptor' prefix
CuriousCorrelation Sep 27, 2024
157da03
feat: store/retrive `authKey` from persistence
CuriousCorrelation Sep 27, 2024
ace3865
feat: auth token with `created_at` stamp
CuriousCorrelation Sep 27, 2024
ed19200
feat: request cancellation
CuriousCorrelation Sep 27, 2024
141e85d
fix: only shut down server when app is to be quit
AndrewBastin Sep 27, 2024
abbaaa1
Add 'packages/hoppscotch-interceptor/' from commit '141e85ddb87e08de5…
CuriousCorrelation Sep 27, 2024
8d34b82
refactor: move agent to monorepo
CuriousCorrelation Sep 27, 2024
5f5d230
refactor: rename package
CuriousCorrelation Sep 27, 2024
7043448
feat: web app to agent registration flow
CuriousCorrelation Sep 27, 2024
f4d2e0e
feat: web app to agent registration flow
CuriousCorrelation Sep 27, 2024
36daddb
refactor: initial updates until demo
AndrewBastin Sep 28, 2024
9ea2a56
feat: introduce registration persistence
AndrewBastin Sep 29, 2024
73da90b
feat: encryption
AndrewBastin Sep 30, 2024
2eb44d5
feat: clear registrations + version info in tray menu
AndrewBastin Sep 30, 2024
428b994
feat: autostart
AndrewBastin Sep 30, 2024
678b3fa
refactor: vendor openssl
AndrewBastin Oct 1, 2024
f9d45b6
feat: updater
AndrewBastin Oct 1, 2024
575444f
chore: make openssl-sys vendored
AndrewBastin Oct 1, 2024
506d6ab
feat: agent registration revoke when handshake fails
AndrewBastin Oct 1, 2024
334cb1d
chore: update handshake to be more informative
AndrewBastin Oct 1, 2024
a5c1aec
feat: delegate status codes to `http`
CuriousCorrelation Oct 1, 2024
b41426a
chore: update handshake to be more informative
AndrewBastin Oct 1, 2024
6f1e9c9
feat: agent proxy settings
AndrewBastin Oct 1, 2024
32ec17f
feat: updated icons
AndrewBastin Oct 1, 2024
4723316
chore: update translations and definitions
AndrewBastin Oct 1, 2024
4ffeba3
chore: merge hoppscotch/next to hoppscotch/feat/agent
AndrewBastin Oct 1, 2024
337d7c1
chore: remove prototype scaffolding deps
CuriousCorrelation Oct 2, 2024
0fe22bf
fix: remove unnecessary generics
CuriousCorrelation Oct 2, 2024
18b4c35
feat: bubble up registration state errors
CuriousCorrelation Oct 2, 2024
700829a
fix: missing i18n entries
AndrewBastin Oct 2, 2024
33979d6
chore: show error toast if Agent is not running while retrying connec…
jamesgeorge007 Oct 2, 2024
751d011
chore: check for Agent status prior to request execution
jamesgeorge007 Oct 2, 2024
2ba634d
fix: streamline inspector messages for `localhost`
jamesgeorge007 Oct 3, 2024
f094012
refactor: cleanup markup and resolve type errors
jamesgeorge007 Oct 3, 2024
0b58869
feat: remove client certificates settings page entry
AndrewBastin Oct 3, 2024
41f60ea
Merge branch 'next' into feat/agent
jamesgeorge007 Oct 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update handshake to be more informative
  • Loading branch information
AndrewBastin committed Oct 1, 2024
commit b41426ac227553cc0c9ea47e359d965ef3524d14
21 changes: 0 additions & 21 deletions packages/hoppscotch-agent/src-tauri/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,24 +217,3 @@ pub async fn cancel_request<T>(
Err(AppError::RequestNotFound)
}
}

#[cfg(test)]
mod tests {
use super::*;
use crate::model::HandshakeResponse;

#[tokio::test]
async fn test_handshake() {
let result = handshake().await;
assert!(result.is_ok());

let json_response = result.unwrap();
let handshake_response: &HandshakeResponse = &json_response;

assert_eq!(handshake_response.status, "success");
assert_eq!(
handshake_response.message,
"Agent ready! Hopp in, we've got requests to catch!"
);
}
}