Commit graph

7 commits

Author SHA1 Message Date
Sebastien Awwad
e5a50a6831
Test: rename proxy2.py as proxy_server.py
(from the original name in the source repository to a more useful
name here).

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-25 15:36:43 -04:00
Sebastien Awwad
75e126ac96
Test: remove redundant proxy tests and their requirements,
add more explanatory comments in test_proxy.use,
and prepare for rename of proxy2.py to proxy_server.py in next
commit (separate so that the rename can be seen as such).

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-25 15:04:08 -04:00
Sebastien Awwad
46fe1900b5
Test: add tests of HTTPS proxy compatibility
- client makes HTTPS connection to proxy; proxy makes HTTP
  connection to target server
- client makes HTTPS connection to proxy; proxy makes HTTPS
  connection to target server

Added functionality to the proxy2.py script to allow it to
take and use a certificate to use to validate the target
server.

Also added clarifying comments in test_proxy_use.py.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-25 13:52:03 -04:00
Sebastien Awwad
7288b71917
Test: fix a bug in arg processing for the proxy server
Fixes a typo in arg processing for test script proxy2.py.
Also removes an outdated comment and clarifies another.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-21 13:13:52 -04:00
Sebastien Awwad
2b019f65f7
Test: add proxy certs and reorganize certs in test data dir
for proxy testing. Also update the test scripts to point to
the new location of ssl certificates and ssl keys.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-21 13:13:52 -04:00
Sebastien Awwad
b7b73e592e
Test: add flag to toggle relay-only/intercept proxy behavior
in proxy2. And use it to run both relaying and intercepting proxies.

True:  normal HTTP proxy. Support HTTP & HTTPS connections to target server
False: intercepting MITM transparent HTTPS proxy. Makes own TLS connections
       and has its own cert; must be trusted by the client and is able to
       modify requests.

Also perform some cleanup of test_proxy_use.py

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-21 13:13:52 -04:00
Sebastien Awwad
46b584d8eb
Test: try download.py through via various proxies
- adds inaz2/proxy2.py, copied code.
- adds dev dependency on twisted for a simple proxy test
- adds a new test module, test_proxy_use, and runs those tests only in
Python2.7 (as proxy2 only supports Python2.7) using new logic in
aggregate_tests.py.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-21 13:13:45 -04:00