Git Product home page Git Product logo

miniproxy's People

Contributors

a-x- avatar etiktin avatar friendlydan avatar joshdick avatar pvcnt avatar silviogarbes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miniproxy's Issues

Please fix #297 row to header($header,false)

Hi,
there's a bug that appears in case when a webpage sends several headers with the same name. For example, it happens very often with Set-Cookie header. PHP header() function by default replaces a header with the similar name, so the proxy looses all Set-Cookie but the last one.

CSS / Javascript seems to get partially broken

Hi!

I finally set under semlab.ch an .htaccess containing RewriteRule ^(.+)/(.+)$ miniProxy.php?u=$2
and I modified the url gathering method by setting - $url=$_REQUEST['u']; - instead of your method.

I would like to take the content from http://82.192.234.100:25963/, so concretely when I issue a call to

http://semlab.ch/en-home-page-semweb I would like to show the content of
http://82.192.234.100:25963/en-home-page-semweb

This is under none of Chrome/Opera/Safari/Firefox the case: It seems that some javascript be broken during transfer. The website is somehow ruined by this.

Do you have any idea?

Cheers

Downloading file help

Hi i just want to let user download files using this proxy...
Like if u have a.com download url after pasting in this proxy he will get just my site download link ...for remote a.com my site will be end user thats it.

I dont want any other url to be accepted

multiple whitelisted sites and regular expression

I've discovered I can use
getHostnamePattern("facebook.com\/lollies")
to limit to a very specific page - however of course this fails to get a lot of required CSS etc...

Is there a way to whitelist multiple URLs/domains?

Feature request: URL form

Hi,

Are there any plans to implement a URL form/banner on proxied pages, to allow users to navigate to other pages, and possibly place advertisements on?

Kind regards,
Dextronox

google.com examples

The source uses google.com as an example for a site that we can proxy through miniProxy (there's even a link for it when opening miniProxy.php in the browser).
The problem with that is that Google automatically redirects calls from http to https (see: https://productforums.google.com/forum/#!topic/websearch/1l2KMUfgyo4). This will usually fail for people testing miniProxy in a WAMP/MAMP/LAMP dev environment, because localhost usually doesn't support SSL (if it does and they access miniProxy through https, everything will work as expected). This can mislead potential users to think that miniProxy doesn't work or that it's broken.

I suggest that we'll do one of the following:

  1. Change the examples to use some other service. For example we can use http://www.bing.com which works just fine (no redirect to https).
  2. Add a comment about this in the readme file and/or the source code so users will know to try something else if it doesn't work for them instead of giving up.
  3. Use some special links to Google that don't redirect to https (keep in mind that there are no guarantees that Google won't break them in the future). The links that work for me: http://www.google.com/?nord=1 , http://www.google.co.uk/?gws_rd=ssl.

Notice: Undefined variable: host and scheme

Notices:
I am getting two notices:

  • Notice: Undefined variable: host
  • Notice: Undefined variable: scheme

It happens when I don't use the http:// or https:// but works perfect when http:// and https:// is included in the URL.

Example:
http://localhost/joshdick-miniProxy/miniProxy.php/dxtorrent.com

Note:

  • But I also observed that for some websites it works (e.g: example.com)
  • I have tried this only on localhost.

Possible Fix:

  • I think it can be easily fixed by adding a client side (JavaScript) code on the HTML code of PHP (miniProxy.php).
  • But if I write the link directly, it will not work, hence I tried to fix the code, but did not work!

Code:
I tried to add the following code after the line: function makeRequest($url) {

  if (substr($url,0,4) != "http"){
  $url = 'http://'.$url;
  }

Parse error

Parse error: syntax error, unexpected T_FUNCTION on line 180

Did i do something?

License?

What is the license of this project?

hitelistPatterns

github.com/abc

github.comabc.abc.com/abc =>match

parse_url() first ^^

Suggestion / not an issue

For further development ...

Could you pass the visited url through an invisible form ( method=post ? ou AJAX ) without displaying it in the main site address ?

Even if it is rewritten, visited websites can still be seen in the administrator log, full names + If the corporate proxy filters some keywords in thoses addresses, miniproxy will be useless for that pecular websites.

Thank you.

SSL Support

Hi,
does miniProxy support ssl connection?

Thanks

Call to undefined function getallheaders()

When php is running as CGI and not an pache mod the following error appears:

Call to undefined function getallheaders() on line 26

The problem is that getallheaders() is a function that doesn't exist when php run as CGI.

An alternative would be to create this function if it doesn't exist:

if (!function_exists("curl_init")) die ("This proxy requires PHP's cURL extension. Please install/enable it on your server and try again.");
if (!function_exists('getallheaders')) { 
        function getallheaders() { 
            foreach($_SERVER as $key=>$value) { 
                if (substr($key,0,5)=="HTTP_") { 
                    $key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5))))); 
                    $out[$key]=$value; 
                }else{ 
                    $out[$key]=$value; 
        } 
            } 
            return $out; 
        } 
} 

Blacklist advertisement links and keywords

I am trying make the page ad free without using the ad blocker extension on chrome. It will be good if it is possible to make a keyword blacklist as well as a link blacklist. I have found some links on the Pirate Bay website. The ads usually use the <iframe> and the<script>(JavaScript) tag:

The Pirate Bay:
http://website.com/miniProxy.php///ads.exoclick.com/iframe.php?idzone=522597&amp;size=120x600
http://website.com/miniProxy.php///thepiratebay.org/static/ads/ad-scroll.js
http://website.com/miniProxy.php///traffic.adxprts.com/ads/ads.js http://website.com/miniProxy.php///traffic.adxprts.com/tpb/na/120x600/
http://website.com/miniProxy.php///thepiratebay.org/static/ads/exo_na/center.html
http://website.com/miniProxy.php///thepiratebay.org/static/ads/exo_na/sky1.html

Code:

<iframe src="http://website.com/miniProxy.php///ads.exoclick.com/iframe.php?idzone=522597&amp;size=120x600" width="120" height="600" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<script type="text/javascript" src="http://website.com/miniProxy.php///thepiratebay.org/static/ads/ad-scroll.js"></script>
<script type="text/javascript" src="http://website.com/miniProxy.php///traffic.adxprts.com/ads/ads.js"></script>
<iframe src="http://website.com/miniProxy.php///traffic.adxprts.com/tpb/na/120x600/" width="120" height="600" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
<iframe src="http://website.com/miniProxy.php///thepiratebay.org/static/ads/exo_na/center.html" id="sky-center" width="728" height="90" frameborder="0" scrolling="no" style="margin-left: 90px;"></iframe>
<iframe src="http://website.com/miniProxy.php///thepiratebay.org/static/ads/exo_na/sky1.html" width="120" height="600" frameborder="0" scrolling="no"></iframe>

Google ads:
.doubleclick.net/activity
doubleclick.net/activity
doubleclick.net/json
doubleclick.net/pagead/conversion
fls.doubleclick.net
google.com/ads/conversion
google.com/ads/user-lists/
google.com/gen_204
googleads.g.doubleclick.net/aclk
googleads.g.doubleclick.net/pagead/conversion
googleads.g.doubleclick.net/pagead/viewthroughconversion
googleadservices.com/pagead/conversion
googleadservices.com/pagead/viewthroughconversion
googletagmanager.com/gtm.js

Other:
There is a huge list provided on https://easylist.to, and will be better if the keyword or the links be present on a external text file.

https://easylist.to/easylist/easylist.txt
https://easylist.to/easylist/fanboy-annoyance.txt
https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
https://easylist-downloads.adblockplus.org/exceptionrules.txt

Rotate proxy servers

Does this use a hard-coded proxy server to fetch the content? Can we specify a list of custom proxy servers and use a new server for each request? For example, from the HMA free proxy list.

can't handle youtube

Hello
I am in china and miniproxy help me a lot.
miniProxy work very good on my godaddy server . but there is an issue that miniproxy can open youtube but can't open the video. i f this can fix, it will be great.
thank u

security issue

thanx for your simple http-proxy that works quite good.

there is a security issue, as cookies and auths are forwarded also, which is for sure dangerous sending SIDs to someone else together with the referer...
unset($browserRequestHeaders["Cookie"]);
unset($browserRequestHeaders["Authorization"]);
after "getallheaders()" should fix that

besides what is not working correct:

  • port numbers are lost after in the first html site
  • basic authentication credentials inside the url are not handled right either...

i have a partly fix, but not yet finished to upload/push...
cheers.ivo

Is there a way to show images hotlink protected

I find out there are a problem when you see some sites that have hotlink protection for images, those doesn't get show and when those are (for example) images for menu or similar the site doesn't sees too well.

(Also when they don't have alt attribute is a nightmare!)

Browser returns 500, curl returns 200

So, whatever I try to access with the script, it fails (SSL or not). I did a var_dump on $responseInfo (line 142) and it turns out that curl returns a code 200.

echo'ing $response (and die;) returns the web page, but obviously this isn't optimal since the rest of the script's never executed.

Any ideas?

Cookie for Single User Proxy

Hi there,

I'm hoping to use this to run a small personal service app through. The no-cookie thing is preventing my from logging into my site.

Is the a fix / crack / patch etc for a single-user situation like mine? I don't work in php, but I work in python so I maybe be able to fuddle if you have ideas.

Thank you kindly,

Blocked by some site logins

When I try to log in to some pages - social media - it does not let me log in... is this resolvable or a shortcoming of this kind of solution?

Security notice - For your security, never enter your Facebook password on sites not located on Facebook.com

Also - Is it possible to create a 'blacklist' as well as whitelist?

use miniproxy as library

Hi, comgrats for your mini-but-not-simple proxy.

I think that it will be a great idea the possibility to use miniproxy as a dependecies ant not only as a out-of-the-box proxy. Maybe you could introduce composer, oop and some documented apis to allow easy integration of your code into bigger applications.

For exemple i will use miniproxy in a laravel application, wrapping logic in a service class that will be injected using laravel DI.

If you like this idea, i could share with you some code.

Charset windows-1251

Thanks for the great project.

I got some charset problem with old sites which use windows-1251. If I visit this site I see it not human readable instead of Cyrillic e.g.http://tula.tramvaj.ru/links.html
I changed string 334 to
$detectedEncoding = mb_detect_encoding($responseBody, "UTF-8, ISO-8859-1,windows-1251");
but still no luck. Any charset settings in browser didn't help.

Unable to handle magnet links

I was just browsing through a torrent website today and found that it is unable to handle magnet links.

Error:

Error: Detected a "magnet" URL. miniProxy exclusively supports http[s] URLs.

die('Error: Detected a "' . $scheme . '" URL. miniProxy exclusively supports http[s] URLs.');

The magnet link is getting converted to something like this:
<a href="http://localhost/miniProxy.php/magnet:?">Magnet Link</a>

I think adding the following codes when magnet links are found might work:

window.open("magnet:?");
window.history.back();

It will open the magnet link and go back to the previous page.

But if it is possible to change it to something like <a href="magnet:?"></a> would be a better solution. Just need to remove the "http://localhost/miniProxy.php/" from the href tag when a magnet is found.

Additionally, other URIs can also be modified.

miniProxy does not handle content dynamically added to pages via JavaScript

Wanted to ask out of curiosity or if there could potentially be a solution to this problem i'm seeing. Some websites (I just noticed this issue on airbnb.com) that on the page after running through the proxy has the following:

<a href='/experiences/4725'>....</a>

When i click on that link it doesn't send me to the correct location. I was wondering if this was because this link was placed on the page via javascript after the page has loaded? Is there anyway the proxy can handle this case as well?

How do you extract the URL?

Something that is throwing me off is how you get URL without a parameter and no value, looking into $_GET you would need a parameter then a value, so how do you extract it when the URL itself will be the parameter?

Cannot proxy post data of uploaded file.

Hello,
I notice that the program can't proxy post data of uploaded file.The script use file_get_contents("php://input") to get raw post data, but it seems to be not available in some situations.
After searching the Internet, I find it that something associated with this problem have been metioned at http://www.php.net/manual/en/ini.core.php#ini.enable-post-data-reading and https://secure.php.net/manual/en/wrappers.php.php#wrappers.php.input. The solution mentioned can only available after PHP 5.4 and need to change the php.ini .
Are there some workarounds to make it work?
Thanks a lot in advance.
Gowe

Fatal error

I was seeing some issues with getting a blank page and sometimes just 'PROXY-IS-ALIVE' , then started seeing some fatal errors
Updated to the latest version and still seeing this error (path altered)

Fatal error: Call to undefined function mb_detect_encoding() in /home/domain/miniProxy.php on line 317

External javascript gets mangled

I am trying to use miniProxy with a website that uses dynamic forms. When you select something, the site does a GET request to get the changed fields, and adds them to the current form.

This does not work in miniProxy. Upon closer inspection, it seems that those external javascripts get mangled, by added html code.

Use with another server

Hello! Thank you for publishing this nice php program!

Before I completely reverse engineer it, I would like to ask you some configuration details.

I have a site http://myserver.com with php 5 and I would like to take the content from another server - say http://12.34.56.78:12345 which ist on an IP wich is not on a NIS. So I need a bridge for that using http://myserver.com which is in NIS...

How should I configure your nice program in order to call elements from http://12.34.56.78:12345 ??

Thanks a lot in advance!
Chears

Would it be simple enough to proxy a single webste without URL parameters?

I'm using this to bypass a firewall to gain access for a single website for an engineering firm
How could I go about rewriting the PROXY_PREFIX to remove the protocol and host of the target website so the script can operate as a clone of the target website. It would be running in the public_html directory.
As you know the code intimately what I'm looking for is a yes, it's simple just do this... or a no that's gonna be tricky kind of response.

Currently:
http://exampleproxy.com/miniProxy.php/http://target.com/page.html
Desired:
http://exampleproxy.com/directory/page.html

Or would mod_rewrite be easier? (just thought of that).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.