mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 15:55:28 +00:00
Merge branch 'master' into guess_encoding
This commit is contained in:
commit
06f67d6c55
@ -4,6 +4,8 @@ Unreleased: mitmproxy next
|
|||||||
|
|
||||||
* Add MsgPack content viewer (@tasn)
|
* Add MsgPack content viewer (@tasn)
|
||||||
* Use `@charset` to decode CSS files if available (@prinzhorn)
|
* Use `@charset` to decode CSS files if available (@prinzhorn)
|
||||||
|
* Fix links to anticache docs in mitmweb and use HTTPS for links to documentation (@rugk)
|
||||||
|
* Updated typing for WebsocketMessage.content (@prinzhorn)
|
||||||
|
|
||||||
* --- TODO: add new PRs above this line ---
|
* --- TODO: add new PRs above this line ---
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ def map(km):
|
|||||||
km.add("ctrl f", "console.nav.pagedown", ["global"], "Page down")
|
km.add("ctrl f", "console.nav.pagedown", ["global"], "Page down")
|
||||||
km.add("ctrl b", "console.nav.pageup", ["global"], "Page up")
|
km.add("ctrl b", "console.nav.pageup", ["global"], "Page up")
|
||||||
|
|
||||||
km.add("I", "set intercept_active toggle", ["global"], "Toggle intercept")
|
km.add("I", "set intercept_active toggle", ["global"], "Toggle whether the filtering via the intercept option is enabled")
|
||||||
km.add("i", "console.command.set intercept", ["global"], "Set intercept")
|
km.add("i", "console.command.set intercept", ["global"], "Set intercept")
|
||||||
km.add("W", "console.command.set save_stream_file", ["global"], "Stream to file")
|
km.add("W", "console.command.set save_stream_file", ["global"], "Stream to file")
|
||||||
km.add("A", "flow.resume @all", ["flowlist", "flowview"], "Resume all intercepted flows")
|
km.add("A", "flow.resume @all", ["flowlist", "flowview"], "Resume all intercepted flows")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import time
|
import time
|
||||||
import queue
|
import queue
|
||||||
from typing import List, Optional
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
from wsproto.frame_protocol import CloseReason
|
from wsproto.frame_protocol import CloseReason
|
||||||
from wsproto.frame_protocol import Opcode
|
from wsproto.frame_protocol import Opcode
|
||||||
@ -17,7 +17,7 @@ class WebSocketMessage(serializable.Serializable):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, type: int, from_client: bool, content: bytes, timestamp: Optional[float]=None, killed: bool=False
|
self, type: int, from_client: bool, content: Union[bytes, str], timestamp: Optional[float]=None, killed: bool=False
|
||||||
) -> None:
|
) -> None:
|
||||||
self.type = Opcode(type) # type: ignore
|
self.type = Opcode(type) # type: ignore
|
||||||
"""indicates either TEXT or BINARY (from wsproto.frame_protocol.Opcode)."""
|
"""indicates either TEXT or BINARY (from wsproto.frame_protocol.Opcode)."""
|
||||||
|
2
tox.ini
2
tox.ini
@ -9,7 +9,7 @@ deps =
|
|||||||
setenv = HOME = {envtmpdir}
|
setenv = HOME = {envtmpdir}
|
||||||
commands =
|
commands =
|
||||||
mitmdump --version
|
mitmdump --version
|
||||||
pytest --timeout 60 -v --cov-report xml \
|
pytest --timeout 60 -vv --cov-report xml \
|
||||||
--cov=mitmproxy --cov=pathod --cov=release \
|
--cov=mitmproxy --cov=pathod --cov=release \
|
||||||
--full-cov=mitmproxy/ --full-cov=pathod/ \
|
--full-cov=mitmproxy/ --full-cov=pathod/ \
|
||||||
{posargs}
|
{posargs}
|
||||||
|
@ -46,7 +46,7 @@ exports[`OptionMenu Component should render correctly 1`] = `
|
|||||||
/>
|
/>
|
||||||
Strip cache headers
|
Strip cache headers
|
||||||
<a
|
<a
|
||||||
href="http://docs.mitmproxy.org/en/stable/features/anticache.html"
|
href="https://docs.mitmproxy.org/stable/overview-features/#anticache"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
exports[`DocsLink Component should be able to be rendered with children nodes 1`] = `
|
exports[`DocsLink Component should be able to be rendered with children nodes 1`] = `
|
||||||
<a
|
<a
|
||||||
href="http://docs.mitmproxy.org/en/stable/bar"
|
href="https://docs.mitmproxy.org/stable/bar"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
foo
|
foo
|
||||||
@ -11,7 +11,7 @@ exports[`DocsLink Component should be able to be rendered with children nodes 1`
|
|||||||
|
|
||||||
exports[`DocsLink Component should be able to be rendered without children nodes 1`] = `
|
exports[`DocsLink Component should be able to be rendered without children nodes 1`] = `
|
||||||
<a
|
<a
|
||||||
href="http://docs.mitmproxy.org/en/stable/bar"
|
href="https://docs.mitmproxy.org/stable/bar"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
|
@ -25,7 +25,7 @@ function OptionMenu({ openOptions }) {
|
|||||||
<div className="menu-group">
|
<div className="menu-group">
|
||||||
<div className="menu-content">
|
<div className="menu-content">
|
||||||
<SettingsToggle setting="anticache">
|
<SettingsToggle setting="anticache">
|
||||||
Strip cache headers <DocsLink resource="features/anticache.html"/>
|
Strip cache headers <DocsLink resource="overview-features/#anticache"/>
|
||||||
</SettingsToggle>
|
</SettingsToggle>
|
||||||
<SettingsToggle setting="showhost">
|
<SettingsToggle setting="showhost">
|
||||||
Use host header for display
|
Use host header for display
|
||||||
|
@ -6,7 +6,7 @@ DocsLink.propTypes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function DocsLink({ children, resource }) {
|
export default function DocsLink({ children, resource }) {
|
||||||
let url = `http://docs.mitmproxy.org/en/stable/${resource}`
|
let url = `https://docs.mitmproxy.org/stable/${resource}`
|
||||||
return (
|
return (
|
||||||
<a target="_blank" href={url}>
|
<a target="_blank" href={url}>
|
||||||
{children || <i className="fa fa-question-circle"></i>}
|
{children || <i className="fa fa-question-circle"></i>}
|
||||||
|
Loading…
Reference in New Issue
Block a user