Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is a customized fork of the mitmproxy project, maintained by a company named browserup. The mitmproxy
is used to man-in-the-middle connections to provide debugging info, allow for security research
and other uses.

Browserup uses the mitmproxy to capture traffic from within containers that are run during a load test.
This captured traffic, through mitmproxy addons, is used to build a HAR (HTTP Archive) file. The HAR
file is made available via an API. The API is also used to control the proxy, and to add custom metrics
to a har at runtime, as well as adding verifications for HAR content. Clients for
this API are generated in multiple languages via the open api specification. The clients live in /clients
which should be ignored, as they are generated files.

Browserup extends mitmproxy's mitmdump executable with addons
The most important code for browserup live in mitmproxy/addons/browserup
174 changes: 87 additions & 87 deletions browserup-proxy.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,30 +337,30 @@
}
}
},
"/har/counters": {
"/har/metrics": {
"post": {
"description": "Add Custom Counter to the captured traffic har",
"operationId": "addCounter",
"description": "Add Custom Metric to the captured traffic har",
"operationId": "addMetric",
"tags": [
"BrowserUpProxy"
],
"requestBody": {
"description": "Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key",
"description": "Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Counter"
"$ref": "#/components/schemas/Metric"
}
}
}
},
"responses": {
"204": {
"description": "The counter was added."
"description": "The metric was added."
},
"422": {
"description": "The counter was invalid."
"description": "The metric was invalid."
}
}
}
Expand Down Expand Up @@ -594,17 +594,17 @@
}
}
},
"Counter": {
"Metric": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of Custom Counter to add to the page under _counters"
"description": "Name of Custom Metric to add to the page under _metrics"
},
"value": {
"type": "number",
"format": "double",
"description": "Value for the counter"
"description": "Value for the metric"
}
}
},
Expand Down Expand Up @@ -634,6 +634,77 @@
}
}
},
"WebSocketMessage": {
"type": "object",
"required": [
"type",
"opcode",
"data",
"time"
],
"properties": {
"type": {
"type": "string"
},
"opcode": {
"type": "number"
},
"data": {
"type": "string"
},
"time": {
"type": "number"
}
}
},
"Header": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"comment": {
"type": "string"
}
}
},
"Action": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"className": {
"type": "string"
},
"tagName": {
"type": "string"
},
"xpath": {
"type": "string"
},
"dataAttributes": {
"type": "string"
},
"formName": {
"type": "string"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
},
"PageTimings": {
"type": "object",
"required": [
Expand Down Expand Up @@ -714,28 +785,6 @@
}
}
},
"CustomHarData": {
"type": "object",
"minProperties": 1
},
"Header": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"comment": {
"type": "string"
}
}
},
"Har": {
"type": "object",
"required": [
Expand Down Expand Up @@ -814,59 +863,6 @@
}
}
},
"WebSocketMessage": {
"type": "object",
"required": [
"type",
"opcode",
"data",
"time"
],
"properties": {
"type": {
"type": "string"
},
"opcode": {
"type": "number"
},
"data": {
"type": "string"
},
"time": {
"type": "number"
}
}
},
"Action": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"className": {
"type": "string"
},
"tagName": {
"type": "string"
},
"xpath": {
"type": "string"
},
"dataAttributes": {
"type": "string"
},
"formName": {
"type": "string"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
},
"HarEntry": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1326,6 +1322,10 @@
}
}
},
"CustomHarData": {
"type": "object",
"minProperties": 1
},
"Page": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1353,10 +1353,10 @@
},
"default": []
},
"_counters": {
"_metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Counter"
"$ref": "#/components/schemas/Metric"
},
"default": []
},
Expand Down
Loading
Loading