Commit Graph

7695 Commits

Author SHA1 Message Date
Aldo Cortesi
5eb17bbf6d
Merge pull request #3054 from Kriechi/fix-example
fix example filename
2018-04-14 12:15:59 +12:00
Aldo Cortesi
8609de6f31 readfile: add a readfile_filter option
* Add a readfile_filter option that filters flows on read.
* Adjust test suite for asyncio.
* Add asynctest as a dev dependency.
2018-04-14 11:52:02 +12:00
Aldo Cortesi
214498f01c asyncio: adjust readfile.py addon for async 2018-04-14 11:52:02 +12:00
Thomas Kriechbaumer
fe699e555f fix example filename 2018-04-13 09:09:24 +02:00
Maximilian Hils
660aa87a24
fix GA id 2018-04-11 16:58:09 -06:00
kira0204
6780e5025a Handling user script exceptions, fix #2839 2018-04-10 08:33:40 +05:30
Aldo Cortesi
5e2a1ec23c
Merge pull request #3035 from cortesi/aiosimpler
asyncio consolidation
2018-04-07 09:37:58 +12:00
Aldo Cortesi
9dcd15d350 asyncio: ditch the handler context
There are a few reasons for this. First, logs are now async, and can be called
at any time. Second, the event loop is thread local, so there can only ever be
one master per thread. These two things together completely obviate the need
for a handler context.
2018-04-07 09:04:14 +12:00
Aldo Cortesi
6a08ef465f asyncio: remove master.add_log, in favor of a persistent log.Log instance 2018-04-07 09:02:10 +12:00
Aldo Cortesi
ea213782d8 asyncio: remove test master.has_log
Now that logs are async, using this call is almost always a mistake. Signal
this by making it semi-private. The method may go away entirely down the track.
2018-04-07 09:02:10 +12:00
Aldo Cortesi
80f2bac356 asyncio: move log mechanism onto the event loop
Logs are now asynchronous, with a log entry pushed onto the event loop for
handling. To support this, the test mechanism grows an await_log method that
waits for a log entry to appear.
2018-04-07 09:02:10 +12:00
Aldo Cortesi
0fa1280daa asyncio simplify: we don't need a queue for proxy->main loop comms
Instead, we just schedule coroutines directly onto the core loop.
2018-04-07 08:59:08 +12:00
Aldo Cortesi
cdbe6f97af asyncio: remove last vestiage of channel input from master 2018-04-07 08:59:08 +12:00
Aldo Cortesi
506ccc5693
Merge pull request #3031 from itzikBraun/add-httpie-export
added option to export request as httpie command
2018-04-06 10:02:02 +12:00
Aldo Cortesi
4177f50a0f
Merge pull request #2971 from kira0204/user-script-exception
A unified handler for user's scripts exception
2018-04-06 10:01:35 +12:00
Aldo Cortesi
48426d0a20
Merge pull request #3046 from cortesi/backlog
Remove socket listen backlog constraint
2018-04-06 09:59:13 +12:00
Aldo Cortesi
a07415783b Remove socket listen backlog constraint
I have no idea why we did this, but the default value is 128, and setting it
this low drops connections under conditions our users can reasonably be expeted
to reach.
2018-04-06 09:22:01 +12:00
Maximilian Hils
2073df9103
update release instructions 2018-04-05 18:26:55 +02:00
Maximilian Hils
e33cf54e07 update CHANGELOG 2018-04-05 17:10:46 +02:00
Maximilian Hils
74c7699541
Merge pull request #3044 from mhils/issue-3038
fix http retry timeout
2018-04-05 15:45:19 +02:00
Maximilian Hils
50ea3aa420 fix http retry timeout
this fixes #3038
2018-04-05 15:30:04 +02:00
Aldo Cortesi
8e54a365fa
Merge pull request #3032 from mitmproxy/requires-io-master
[requires.io] dependency update on master branch
2018-04-05 07:50:37 +12:00
Aldo Cortesi
780cd989d5
Merge pull request #3029 from cortesi/eventloop
shift core event loop to asyncio
2018-04-04 15:47:01 +12:00
Thomas Kriechbaumer
60a320fde8
Merge pull request #3033 from emilstahl/master
Fixed --no-mouse parameter message
2018-04-03 19:14:55 +02:00
Emil Stahl
8ea8f31e3f
Fixed --no-mouse parameter message
`--no-mouse` is deprecated. Changed parameter to `--set console_mouse=false`
2018-04-03 18:56:12 +02:00
Aldo Cortesi
659fceb697 minor fixes 2018-04-03 10:26:09 +12:00
Aldo Cortesi
7e73e5fa51 asyncio: factor out test server startup wait 2018-04-03 09:46:11 +12:00
requires.io
c5881c0dc9 [requires.io] dependency update 2018-04-02 20:49:26 +02:00
itzikBraun
29f4164344 added option to export request as httpie command 2018-04-02 12:57:33 +02:00
Aldo Cortesi
14f461c5d5 asyncio: cleanup and lint
Also fix a racy websocket test.
2018-04-02 16:41:49 +12:00
Aldo Cortesi
1f33c1c1a5 asyncio: rebase mitmweb Tornado event loop on asyncio 2018-04-02 15:00:13 +12:00
Aldo Cortesi
a3da43d3e5 asyncio: test cleanup
Also silence asyncio logs. We sometimes end up with messages on the queue that
need to be ignored when the proxy shuts down, and asyncio complains loudly
about this.
2018-04-02 14:51:14 +12:00
Aldo Cortesi
2ac4f9e255 asyncio: shift console over to asyncio eventloop 2018-04-02 11:21:52 +12:00
Aldo Cortesi
2b040ff093 asyncio: make http2 tests pass 2018-04-02 11:03:05 +12:00
Aldo Cortesi
28a8ddc0e8 asyncio: fix a few remaining issues in proxy/test_server.py 2018-04-02 09:46:02 +12:00
Aldo Cortesi
3cc5d81a4a asyncio: fix channel interface and tests
We now need to synthesize a tick event when changing addons in tests, because
tick is asynchronously called on the event loop.
2018-04-01 11:37:35 +12:00
Aldo Cortesi
b6d943cfa3 asyncio: fix client replay 2018-04-01 09:46:32 +12:00
Aldo Cortesi
54170ee657 asyncio: start a test loop for unit tests
Also move signal handling out of master. These only work in the main thread,
and properly belong in main.py.
2018-04-01 09:46:32 +12:00
Aldo Cortesi
d9752c90f9 Remove support for Python 3.5
There are a number of significant improvements in Python3.6 - especially in
asyncio - that makes ditching Python 3.5 compelling. The next Ubuntu LTS will
be released before the next version of mitmproxy, and will include Python 3.6
in base.

This patch removes support for testing under Python 3.5 and changes our
documentation. There are deeper changes in the type system and so forth that we
will make over time.
2018-04-01 09:46:32 +12:00
Aldo Cortesi
976b2018a3 asyncio: clean up event loop acquisition
We now acquire the event loop through asyncio.get_event_loop, avoiding having
to pass the loop explicity in a bunch of places. This function does not return
the currently running loop from within coroutines in versions of Python prior
to 3.6.
2018-04-01 09:46:32 +12:00
Aldo Cortesi
a2d4519354 asyncio: brutally rip out our old queue mechanism 2018-04-01 09:46:32 +12:00
Thomas Kriechbaumer
b5c3883b78
Update dev.ps1 2018-03-31 23:45:33 +02:00
Aldo Cortesi
53827a36ae
Merge pull request #3025 from Kriechi/py36
Python 3.5 is dead -- long live Python 3.6!
2018-04-01 08:59:47 +12:00
Thomas Kriechbaumer
7edf4ad655
Merge pull request #3026 from ghillu/master
Update addons-overview.md
2018-03-31 21:14:06 +02:00
ghillu
673b58c79f
Update addons-overview.md
Fixed a typo
2018-04-01 00:09:45 +05:30
Thomas Kriechbaumer
46f8901b8c Python 3.5 is dead -- long live Python 3.6!
fixes #2266
2018-03-31 18:46:32 +02:00
Aldo Cortesi
3c52ed6ee1
Merge pull request #3012 from Kriechi/docs-options
docs: add auto-generated options reference
2018-03-30 09:38:17 +13:00
Maximilian Hils
c6cf502657
simplify README 2018-03-28 13:28:53 +02:00
Thomas Kriechbaumer
79fc4e8ad6
fix badges 2018-03-27 17:25:15 +02:00
Thomas Kriechbaumer
3ae9407a38
fix docs-related URLs 2018-03-27 17:23:01 +02:00