Git Product home page Git Product logo

php-proxy-app's Introduction

php-proxy-app

Web Proxy Application built on php-proxy library ready to be installed on your server

alt text

To Do List

As of March 25, 2018:

  • Plugin for facebook.com
  • Plugin for dailymotion.com
  • Better support/documentation for Plugin Development
  • Better Javascript support

Web-Proxy vs Proxy Server

Keep in mind that sites/pages that are too script-heavy or with too many "dynamic parts", may not work with this proxy script. That is a known limitation of web proxies. For such sites, you should use an actual proxy server to route your browser's HTTP requests through:

https://www.proxynova.com/proxy-software/

Installation

Keep in mind that this is a project and not a library. Installing this via require would do you not good. A project such as this, should be installed straight into the public directory of your web server.

composer create-project athlon1600/php-proxy-app:dev-master /var/www/

If you do not have composer or trying to host this application on either a shared hosting, or a VPS hosting with limited permissions (dreamhost.com), then download a pre-installed version of this app as a ZIP archive from www.php-proxy.com.

Direct Link:
https://www.php-proxy.com/download/php-proxy.zip

Keep it up-to-date

Application itself rarely will change, vast majority of changes will be done to its requirement packages like php-proxy. Simply call this command once in a while to make sure your proxy is always using the latest versions.

composer update

config.php

This file will be loaded into the global Config class.

/templates/

This should have been named "views", but for historic purposes we keep it named as templates for now.

/plugins/

PHP-Proxy provides many of its own native plugins, but users are free to write their own custom plugins, which could then be automatically loaded from this very folder. See /plugins/TestPlugin.php for an example.

php-proxy-app's People

Contributors

athlon1600 avatar miicha 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

php-proxy-app's Issues

Setting opt in curlopt array in config.php is ignored.

Hi,

I noticed that if I set the option...

CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Iron/29.0.1600.1 Chrome/29.0.1600.1 Safari/537.36'

in the curl config opts array in config.php it is ignored. Is this the intended action to forward the users agent string regardless of any overriding setting in the curl opts array or is this some bug? If this is the current intended behavior should it be "inherit user's agent unless config has been set then use config"?

Let me know, maybe I'll raise a PR when I am back from vacation.

Regards,

Rob

Session is not preserved

Hi,

I'm trying to use php-proxy-app for viewing site with login, but nothing happens after entering login data and pressing login button. I think this is due to cookies.

Cookie plugin is enabled in config.

NGINX configuration

Hi,

I'm a french user of you web proxy; and i love it.

But, I have this problem with some websites with php-proxy and nginx :
229 rewrite or internal redirection cycle

2016/01/11 11:29:50 [error] 21704#21704: *228 rewrite or internal redirection cycle while internally redirecting to "/css/gfx/icn-btn-arrow-right-light.png",
client: 127.0.0.1, server: proxy.sky-fvt.com, request: "GET /accueil/file/sitemodel/pefr/css/gfx/icn-btn-arrow-right-light.png HTTP/1.1", host: "proxy.sky-f
vt.com", referrer: "https://proxy.sky-fvt.com/index.php?q=yq3YpXCTk9qpqY-motDGXsfQ1aXUoZSZ2JWUlZmny5rOaMqeosmT1pumxqOiyMadkdPKn9dnyabZlZuho5eTpNay0JqpksfWpQ"
2016/01/11 11:29:50 [error] 21704#21704: *229 rewrite or internal redirection cycle while internally redirecting to "/css/fonts/opensans-bold.ttf", client: 1
27.0.0.1, server: proxy.sky-fvt.com, request: "GET /accueil/file/sitemodel/pefr/css/fonts/opensans-bold.ttf HTTP/1.1", host: "proxy.sky-fvt.com", referrer: "
https://proxy.sky-fvt.com/index.php?q=yq3YpXCTk9qpqY-motDGXsfQ1aXUoZSZ2JWUlZmny5rOaMqeosmT1pumxqOiyMadkdPKn9dnyabZlZuXl5bLo4-f06SqydaQZGKSa2HH1KQ"
2016/01/11 11:29:50 [error] 21704#21704: *230 rewrite or internal redirection cycle while internally redirecting to "/css/gfx/icn-slideshow-arrows.png", clie
nt: 127.0.0.1, server: proxy.sky-fvt.com, request: "GET /accueil/file/sitemodel/pefr/css/gfx/icn-slideshow-arrows.png HTTP/1.1", host: "proxy.sky-fvt.com", r
eferrer: "https://proxy.sky-fvt.com/index.php?q=yq3YpXCTk9qpqY-motDGXsfQ1aXUoZSZ2JWUlZmny5rOaMqeosmT1pumxqOiyMadkdPKn9dnyabZlZuho5eTpNay0JqpksfWpQ"

I use php5-fpm & nginx as this configuration model :
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

Do you have any clue for help me to resolve this problem please ?
Thanks

remove HTML page titles

I know this is not a real issue but unfortunately I did not find an other place to write this request. Is it possible to configure that the HTML page title will be removed because some censoring filters look at titles on HTML pages....May be it it so possible to configure a fix title for all pages like "php-proxy"....Thanks

Cookies Required Problem

Hi Athlon,
I am a user in China, because of GFW, I need to use your app for facebook.com, how even, when i try to log into Facebook, i get the error below:

Cookies Required
Cookies are not enabled on your browser. Please enable cookies in your browser preferences to continue.

So how can i fix?

Reddit issues

When visiting reddit.com on an installation, links for posts do not seems to work, rather they send the browser directly to the URL. This might be something to do with the way Reddit formats URLs (JavaScript stuff).

Block certain URLs (like local IP-range)

Not a bug, more like a feature request.
I host my proxy on my home-server. As a result, my entire home network becomes available via the proxy, including e.g. receivers with unsecured web-interfaces and the modem-router without decent brute force protection.

Of course I have added Apache basic authentication to restrict access to my proxy, but still, it would increase security if I were able to block the entire local IP-range.

A quick-n-dirty way may be to create my own website plugin, but my lack of programming skills is a problem there. Any help or tips much appreciated. Thanks!

youtube player

youtube player show videos 360p i think. how can I set to maximum quality for playing ? you can check proxfree.com, this script have quality option.

Other problem is youtube videos can play but images not showing.

its main page ok.
image

its video page, images not showing.
image

The app requests for url_form.js from php-proxy.com

It is a blocking request and slows down everything, especially when your site is not reachable, for whatever reason such as firewall blocking or server down.
I think it is not needed, and we can just put that script along with the app.

Forcing IPv4 when connecting over IPv6

Hi,

I assume it would just be as simple as adding one line into the test-plugin file, but is there a way to force the server to use IPv4 even if the web server is running over IPv6. The server has the ability to communicate via IPv4.

Thanks

After install no URL working in proxy

I've just installed everything needed, and have successfully reached the proxy page. However, when I type a URL in and press enter, I get an HTTP ERROR 500, along with this page isn't working.

The site is 149.56.98.141/sys

Thanks!

Ubuntu 16.04, Apache 2, PHP7, PHP-Proxy, PHP-Curl, all installed and up to date.

No website opens when hosted on vps

Hi,

I hosted this script on shared hosting and it worked fine, but when I host it on cloud server or vps it doesn't work at all. Can you suggest something I should do to make it work?

Thanks

Facebook

Can't login to facebook!
Msg:
"Security Check Failed
There was a problem verifying your account. Please try logging in now from this page."

HTTP Error 500

Hi,

I'm just a beginner with this kind of things and I hope you could help me. I have successfully deployed your proxy script on my VPS. Just yesterday, it doesn't work anymore with HTTP error 500.

I have destroyed the droplet and start fresh and used your one-click install and with still the same issue.

Hope you could help me. Thank you in advance!

Missing dependent Files?

Tried pulling the app zip from the website but URL is broken, Downloaded the Git repo but I seem to be missing some dependencies?

Can't find vendor/autoload.php anywhere!

PHP Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/the-vellas.com/poxy/index.php on line 5

Facebook

Facebook appears not to be working citing that a security check has failed. Please could you look in to this problem.

Enable logging plugin

Hi,

How do I enable the logging plugin located in vendor\athlon1600\php-proxy-plugin-bundle\src?

Kind regards,
Dextronox

Force YouTube to desktop view

I've already told you once but. Since mobile devices cannot use the proxy for watching html5 videos, currently being the only proxy I've known :), I would be really glad if you could redirect m.youtube.com videos to the desktop app.

What I do to force it to desktop is youtube.com/watch?app=desktop&persist_app=1, I hope I could help

Opinion to exit index.php by a blocked page

Hi,
where is the best point to leave the index.php || to leave the proxy forward to the URL, when the calling URL is e.g. a blocked URL? [i use zvelo to look up what url is a "bad" url]

I want to do this so at index.php:

` try {

            if ($category_is_block === true)
            {
                echo render_template("./templates/main.php", array(
                    'url' => $url,
                    'error_msg' => 'this is a blocked website'
                ));
                exit;
            }
            // request sent to index.php
            $request = Request::createFromGlobals();

            // remove all GET parameters such as ?q=
            $request->get->clear();

            // forward it to some other URL
            $response = $proxy->forward($request, $url);

            // if that was a streaming response, then everything was already sent and script will be killed before it even reaches this line
            $response->send();

        } catch (Exception $ex){`

By blocked pages it looks very good; it calls then the main.php and show the error-message.

blocked_website

But when it is a not blocked page like web.de the proxy-forward seems to become trouble - although the script never reach the block with the render_template & exit; because the value of $category_is_block ==> then false

web de_non_blocked

i want to use CURLOPT_PROXY but have error how to fix

i dont have vpn server..just have proxy server.
so i want to use CURLOPT_PROXY

CURLOPT_PROXY => 'proxy ip',
CURLOPT_PROXYPORT => 'proxy port',
CURLOPT_PROXYUSERPWD => 'username:password',

just can work on first page. and will miss the PHP-Proxy bar.
how to fix it..

Undefined method 'getName'

Hi,

I have just installed via Composer.

After a few teething problems with the session_start permissions, I created a sessions folder in the dir above the public_html folder and added the following as the first line in index.php

ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../session'));

Now when I try to load a site, I get the following error:

Fatal error: Call to undefined method Proxy\Event\ProxyEvent::getName() in /home/[user]/public_html/vendor/athlon1600/php-proxy/src/Plugin/AbstractPlugin.php on line 47

Any ideas? Thanks

(6) Could not resolve host: magnet

when ever you download or go to down load a magnet links you get this error
(6) Could not resolve host: magnet

is there any way to make this download the links

Doesn't work in subdir in nginx

I installed the script in a subdir on an nginx server, when I submit the url I'm redirected to / instead of the subdir where the proxy's index script is installed.

Works fine in subdir in Apache.

Youtube Mobile

Hello. i see there is an issue with mobile version of youtube running through the proxy. I managed to fix using the user agent header as described in another issue a year ago. Problem is this is quite ugly on mobile forcing a desktop view. is there any way to load the mobile version through this proxy?
kind regards

Package not in Packagist yet

Hi mate, thanks for fixing the project but composer can't build this as its not in the repo yet. Do you have a zipped deployable package as well? Thank you for your work, can't wait to try this.

YouTube search bar fault

Hi,

I have recently upgraded all of my servers to the latest version of the script, however, when attempting to search on YouTube, I get redirected back to the error page. All plugins are enable in the config, and
I have added the following to my TestPlugin.php:

$event['request']->headers->set('user-agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36');

Any help would be much appreciated!
Thanks.

Proxy Server Location buttons

Hi

How do I install the Proxy Server Location fields as shown on unblockvideos.com. Is there a plugin
available for that? Also like to know about adding custom ips for visitors to use. Much appreciate your help.

Regards
Jahabar

$config['url_mode'] = 0 is not working

Hi,

i have set
$config['url_mode'] = 0;
in the config.php.

Nevertheless, the URL param 'q' always by Base64 encoded / decoded, so that you can not pass the URL in plain text. Mean e.g.: ?q=google.de
Before I adapting your otherwise 100% working code I wanted to ask if I did something wrong with the configuration?

Slow

When you type in a URL for the proxy to bring you to it is extremly slow and almost unsuable

Unable to access local url

I installed the proxy on a server which runs a VPN to several other host, so that I can access those VPN-only hosts from outside.

Sadly it's not working, the client is returned an error 500, and on the (nginx) server I found this:

2016/07/13 10:52:47 [error] 15653#15653: *24929467 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /var/www/PROXY/vendor/composer/ClassLoader.php on line 412" while reading response header from upstream, client: 1.2.3.4, server: hostname.com, request: "GET /PROXY/index.php?q=http%3A%2F%2F10.252.10.26 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-sslt.sock:", host: "hostname.com"

Running w3m http://10.252.10.26 from the server works fine.

How can I debug the issue?

Ajax is not working

Hi,
Content loaded via ajax is not showing when visiting some site with the proxy

White screen

Just installed this on my webserver (Previously worked fine on another server) and when I enter a URL I just get a white screen, does anyone have any ideas

download files named as index.php (as script-name) and not the file name

Hi,

i have the problem that the proxy downloads a file named as index.php.
At first I thought it is because of my Nginx configuration, but then I check the behavior on unblockvideos. com and there is the same behavior. , ,
Is there a fix for this behavior or is it even though a wrong implementation of me?

Example:

https://sf1.unblockvideos.com/index.php?q=m63W05uUkq2u3WGWoZ_SX5uYX8ehp6ef1MSU2JTFZpWXqNnRzdTEmqrFm6aYncelnZycyJGmapKWmWOWnJtpbGGh1tDNpNdzaJppaW5tmGJwbFbZb2NvY5WJo6LGyJlrZmvFxcXHx25pyJdnnWrIlXBoZJhoaXJnypOUlg

Doubts about videos.

What part of the script is responsible for the ability to move .mp4 videos back and forth?

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.