-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reddit example and URL matching does not work #293
Comments
noticed the same |
It's most likely that you're requesting Reddit with HTTPS or your browser is somehow redirecting you from HTTP to HTTPS without drawing your attention. If the case is so, you will have to use Mitm if I'm not wrong. You may test this using curl: Watch out that I'm using http above. It should return your custom message. Now test the command also for https. It possibly won't return your custom message. This is because you're spawning a CONNECT to watch the response from website in HTTPS case. You're a spectator here and can't intercept response. Using Mitm, you will have two TLS channels one of which will be your Man-in-the-Middle where the request and response gets exchanged and the other one will be used to CONNECT to real HTTPS. |
@illenialx that's what I thought might be the issue too, but if I remember right, the eavesdropper example wasn't properly working either, even though it resolves a https connection into a plain http connection iirc |
@7twin I don't know but I am using master version and I made my browser trust cert.pem and cert.key and it works seamlessly for me. |
@illenialx are you using the eavesdropper example? and did you modify the source at all? |
@7twin I think the problem is with your ReqCondition which is the value returned by DstHostIs in your case. If you check it, it will return |
@C-R-o-s-s I'm not sure how I could check what the input for the reqcondition is, since I am just starting with golang, but I did try all combinations of the domain, including :443 and other reqconditions and none of them matched, what script are you using that works? |
@C-R-o-s-s thanks, what certs did you trust, did you generate them via the bash script inside the certs folder? or used the root ones? |
@7twin It doesn't matter. The pregenerated custom root CA in https://github.com/elazarl/goproxy are already generated using that script and OpenSSL conf. If you're OK with the name of the repository and domain to show up, you can use it. Otherwise you're free to generate your own. I also imported ca.key and ca.pem both in system and browser. |
tried |
So is there a solution for blocking https://www.reddit.com/ ? |
The DstHosIs implementation has been updated to block a whole domain, when needed: #608. Closing this issue. |
The reddit example and matching against a destination url does not work, it just passes the request through, instead of returning a
StatusForbidden
The text was updated successfully, but these errors were encountered: