1.9.1 • Published 2 years ago

httptoolkit-server v1.9.1

Weekly downloads
72
License
AGPL-3.0-or-later
Repository
github
Last release
2 years ago

HTTP Toolkit Server Build Status Version

This repo contains the backend for HTTP Toolkit, a beautiful, cross-platform & open-source HTTP(S) debugging proxy, analyzer & client.

Looking to file bugs, request features or send feedback? File an issue or vote on existing ones at github.com/httptoolkit/httptoolkit.

What is this?

HTTP Toolkit runs everything possible within the web UI, written as a standard single-page web application. There's a couple of necessary things you can't do in a web application though, especially:

  • Start a locally running proxy server (here using Mockttp)
  • Launch local applications preconfigured for interception

This server exposes an API that is used by the web UI, exposing these actions and some other related information. The API itself is GraphQL, see src/api-server.ts for the full details.

This server is runnable standalone as a CLI using oclif, or can be imported into other modules to be run programmatically. The available interceptors are defined in src/interceptors, and some of these also use other services in here, e.g. src/cert-check-server.ts automatically checks if a certificate is trusted by a browser client, and downloads or installs (depending on the client) the certificate if not.

Note that the set of interceptors available in HTTP Toolkit depends on both the interceptors available on your server and the interceptors defined in the UI - new interceptors will need to be added to both.

This server is typically used by users via httptoolkit-desktop, which builds the server and web UI into an electron application, and starts & stops the server in the background whenever that app is run. Each time the desktop app is built, a new electron app is created containing the latest release from this repo.

Once the server has installed it automatically updates in the background periodically, pulling new releases from the github releases of this repo.

Contributing

If you want to add new interceptors, change/fix existing interceptor behaviour (but not their UI) or reconfigure how the underlying proxy server is set up, then you're in the right place :+1:.

To get started:

  • Clone this repo.
  • npm install
  • npm start
  • A Mockttp standalone server will start on port 45456, and a graphql management server on 45457.
  • Either make requests to the servers by hand, use the production UI by opening https://app.httptoolkit.tech in a Chromium-based browser, or start and use a local UI by:
    • Setting up the web UI locally (see httptoolkit/httptoolkit-ui#contributing).
    • Running npm run start:web there to start the UI without its own server.
    • Opening http://local.httptoolkit.tech:8080 in a Chromium-based browser

A few tips:

  • Running the server with ENABLE_PLAYGROUND set to true at the top of src/api-server.ts will give you a GraphQL playground on http://localhost:45457/.
  • New interceptors need to be added to src/interceptors/index.ts. They will also need to be added to the UI.
  • The tests assume that the required applications are installed and some docker images are already pulled. See ci.yml and the build-base image for an example of how to set this up (or just run the tests, look at the errors, and install whatever's missing).
1.8.1

3 years ago

1.8.0

3 years ago

1.9.1

2 years ago

1.6.0

3 years ago

1.7.0

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.2.3

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.45

4 years ago

0.1.44

4 years ago

0.1.43

4 years ago

0.1.42

4 years ago

0.1.40

4 years ago

0.1.39

5 years ago

0.1.38

5 years ago

0.1.36

5 years ago

0.1.35

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago