Athlon1600 / php-proxy

A web proxy script written in PHP and built as an alternative to Glype.
https://www.php-proxy.com
MIT License
298 stars 158 forks source link

Sites on google mobile search results are not opening #89

Open wapfalls opened 6 years ago

wapfalls commented 6 years ago

Hi, Love your Proxy!!

Sites in google Search results are not opening. It says as an invalid URL. Please see the screenshot below,

photo6273781033212159977

Athlon1600 commented 6 years ago

There is a bug inside rel2abs function... so those links on google search results page like:
/url?q=https://en.m.wikipedia.org/wiki

when converted to absolute URL become:
http://www.google.com.br/url?q=https:/en.m.wikipedia.org/wiki/Wikipedia

double slash after https: somehow gets replaced with a single slash. This is probably causing problems on other sites too we just haven't noticed yet. Should be fixed by the end of the week.

wapfalls commented 6 years ago

cool!!

Athlon1600 commented 6 years ago

In the meantime, I would just add this to your proxy's config.php file:

$config['curl'] = array(
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'
);

That should just fix it immediately.

wapfalls commented 6 years ago

Thanks for the suggestion buddy!

But even after adding the above curl options on config.php, The issue still persisits :(