joshdick / miniproxy Goto Github PK
View Code? Open in Web Editor NEW🚨⚠️ UNMAINTAINED! ⚠️🚨 A simple PHP web proxy.
Home Page: http://joshdick.github.io/miniProxy
License: GNU General Public License v3.0
🚨⚠️ UNMAINTAINED! ⚠️🚨 A simple PHP web proxy.
Home Page: http://joshdick.github.io/miniProxy
License: GNU General Public License v3.0
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.
Ok, this maybe isn't an issue - but I'm wanting to use this to whitelist a single page
There is no single word about how to use this proxy.
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
Hi,
For example:
I have this page: http://www.mywebsite.com/miniProxy.php?http://www.proxifysite.com
If is some links on the above page and I click its, then I will redirected through miniProxy at the link clicked.
http://www.mywebsite.com/miniProxy.php?http://www.linkclicked.com
What I need to change on miniProxy.php code to go directly at the link clicked, not through miniProxy page. http://www.linkclicked.com
Thanks
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
rel2abs fails for urls like //geo.query.yahoo.com
in src.
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?
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
It's adding HTML tags like DOCTYPE, html and body. It adds JavaScript code before actual output which breaks the system.
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:
http://www.bing.com
which works just fine (no redirect to https).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.http://www.google.com/?nord=1
, http://www.google.co.uk/?gws_rd=ssl
.Notices:
I am getting two notices:
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:
Possible Fix:
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: syntax error, unexpected T_FUNCTION
on line 180
Did i do something?
What is the license of this project?
When php configured with safe_mode On or open_basedir curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); doens't work.
It would be greate to have workaround for such situations
github.com/abc
github.comabc.abc.com/abc =>match
parse_url() first ^^
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.
please check
when proxying the website http://www.bachmann-malermeister.ch/firmenphilosophie.html it omits all special chars like ö, ä, ü from the website
Hi,
does miniProxy support ssl connection?
Thanks
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;
}
}
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&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&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
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.
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
真心想使用此访问facebook
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:
i have a partly fix, but not yet finished to upload/push...
cheers.ivo
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!)
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?
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,
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?
I am trying to access www.google.com behind the proxy. I am getting blank page error.
Is there a way to get the proxy working with google (www.google.com)? Or does this belong to a known limitation?
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.
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.
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.
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?
opens some random site it advertisment
please remove this from github
Hi,
As per the script, the domain should be entered in the below format:
https://mydomain.com/miniProxy.php/http://example.net/
Although, my web server is treating it as a normal path and giving a 404 error.
If I change the "/" to "?", as mentioned below, then the proxy works fine. Please check.
https://mydomain.com/miniProxy.php?http://example.net/
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?
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
When i try to surf page like this http://liqui-moly.lubricantadvisor.com/Default.aspx?lang=rus via miniProxy it appends "?lang=rus" to the initial url. It happens only for GET requests
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
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.
Si tengo /miniproxy/index.php/http://google.com.pe
mejor que sea solamente con /miniproxy/http://google.com.pe
Saludos
^^I had to remove the proxy because google started using up all my bandwidth.
We need to make the proxy add the following line in the head section of the proxied page:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
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
If a page redirects (and Curl follows the redirect) then the relative urls are still rewritten to the page before the redirect.
Example:
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).
Hello,
What do think about this :
https://github.com/pejman-hkh/php-simple-http-proxy/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.