question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

400 BAD request, HttpException (on mitm.it)

See original GitHub issue
Steps to reproduce the problem:

sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A PREROUTING -i enp3s0 -p tcp --dport 443 -j REDIRECT --to-port 8080 sudo iptables -t nat -A PREROUTING -i enp3s0 -p tcp --dport 80 -j REDIRECT --to-port 8080 sudo ./mitmproxy --mode transparent --showhost Getting Error while opening mitm.it from my Android Error is–

400 Bad Request HttpException('\n Mitmproxy received an absolute-form request even though…

My ifconfig is

enp0s29f7u8 Link encap:Ethernet  HWaddr XXX  
          inet addr:192.168.42.28  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: 2405:ccc:7306:4d8c/64 Scope:Global
          inet6 addr: XXXea/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8112 errors:1 dropped:0 overruns:0 frame:0
          TX packets:7987 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6120219 (6.1 MB)  TX bytes:1588233 (1.5 MB)

enp3s0    Link encap:Ethernet  HWaddr XXX  
          inet addr:10.42.1.1  Bcast:10.42.1.255  Mask:255.255.255.0
          inet6 addr: feXXXX5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:60978 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40965 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:66103467 (66.1 MB)  TX bytes:6917725 (6.9 MB)

In my android wifi, i added proxy as 10.42.1.1 port 8080 And i cant find eventlog 😦 How to make it work?

Any other comments? What have you tried so far?

Also i tried with mitmweb and it worked, but after click on request i got blank page. And it seems mitmweb cant capture SSL(HSTS), is that true??? Does mitmproxy successfully capture HSTS request?

System information
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial
Mitmproxy: 3.0.4 binary
Python:    3.6.3
OpenSSL:   OpenSSL 1.1.0h  27 Mar 2018
Platform:  Linux-4.13.0-41-generic-x86_64-with-debian-stretch-sid

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
TonyStarkcommented, Jan 23, 2020

nope 😦

1reaction
TonyStarkcommented, Dec 26, 2019

@mhils This is still not solved Now i m on Manjaro OS 64bit Still when i run sudo ./mitmproxy --mode transparent --showhost getting 400 BAD request but if i run only sudo ./mitmproxy i can successfully load mitm.it page

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request is not going through mitm proxy when I am trying to ...
and in java response I am getting 400 Bad Request. Below is the code I am trying to run: HttpHost target = new...
Read more >
Transparent mode misconfiguration - mitmproxy
MITMproxy has been setup in transparent mode on Ubuntu 18.04 LTS box. ... which it dutifully displays with a 400 Bad Request error...
Read more >
Bad HTTP request line - Google Groups
Hi, I just upgraded to 0.9 (with the ubuntu packaged 0.8 I was running into 100% CPU consumption issues), but now mitmproxy seems...
Read more >
HTTP 400 Bad Request (SSL certificate error) Response to ...
Customers who use an API client program or script that tries to use mTLS (HTTPS Mutual Authentication) when initiating a connection to the...
Read more >
Configure Firefox for Proxy Recording – BlazeMeter
In your Firefox browser, enter the following URL: http://mitm.it. ... Have more questions? Submit a request ... 400 Bad Request. HttpException('Invalid HTTP ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found