SadeghHayeri / GreenTunnel

GreenTunnel is an anti-censorship utility designed to bypass the DPI system that is put in place by various ISPs to block access to certain websites.
MIT License
4.24k stars 273 forks source link

Http 30X corrupted redirection response from ISP #90

Open alikemalocalan opened 3 years ago

alikemalocalan commented 3 years ago

Describe the bug i am developing your greentunnel with using Kotlin maybe you know this. But I think we both have a problem about 30X redirection in Turkey ISP. Turkey ISP send corrupted redirection response for blocked sites for only HTTP (not HTTPS) request.

➜  ~ curl --proxy 0.0.0.0:8080  -vvvvv http://wikileaks.org
*   Trying 0.0.0.0...
* TCP_NODELAY set
* Connected to 0.0.0.0 (127.0.0.1) port 8080 (#0)
> GET http://wikileaks.org/ HTTP/1.1
> Host: www.wikileaks.org
> User-Agent: curl/7.64.1
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 302
< Connection: close
< Server: nginx
< Location: http://195.175.254.2/
< 

* Closing connection 0

195.175.254.2 is IP address of Censorship page

but it must be like:

➜  ~ curl  -vvvvv http://www.alikemal.org  
*   Trying 84.201.178.107...
* TCP_NODELAY set
* Connected to www.alikemal.org (84.201.178.107) port 80 (#0)
> GET / HTTP/1.1
> Host: www.alikemal.org
> User-Agent: curl/7.64.1
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Cache-Control: public, max-age=0, must-revalidate
< Content-Length: 41
< Content-Type: text/plain
< Date: Sun, 10 Jan 2021 19:27:23 GMT
< Age: 0
< Connection: keep-alive
< Server: Netlify
< Location: https://www.alikemal.org/
< 
Redirecting to https://www.alikemal.org/
* Closing connection 0

Firstly I think to modify this response but still, ISP is learning the site you want to connect to. maybe wen can think forcing HTTP to HTTPS with sending dummy redirect response to browser

Have you any solution for this problem @SadeghHayeri ?

SadeghHayeri commented 3 years ago

Hi, as you say I think the best (and also secure) solution for this is that force redirects to HTTPS, it there any website that does not support HTTPS?

alikemalocalan commented 3 years ago

i dont know, but i will test with using https-everywhereplugin at this week