Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2017-07-16 (2 years ago) | | 44% | | Total: 369 This week: 1 | | All time: 6,670 This week: 269 |
|
Description | | Author |
This class can forward HTTP requests to destination servers.
It listens to connections on a given TCP port and forwards HTTP requests to final servers and return the responses.
The class uses Guzzle to forward requests to the destination HTTP servers.
The server host and an port that the proxy server lists are configurable. Innovation Award
January 2016
Winner
Prize: One downloadable copy of Komodo IDE |
HTTP proxy servers are useful to provide anonymity to users or computers that want to access remote Web servers.
This class implements a proxy for HTTP requests using pure PHP code.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 1x
Winner: 1x |
|
Details
standalone_php_proxy
Standalone proxy server in PHP sockets, I am using Guzzle to route the requests. Idea was if I can make HTTP Proxy Server in php to get more control over proxy and custom logic. Currently it only supports http requests you can choose port of your own choice plus if you want to make it public or private. This is a standard HTTP Proxy so you can use in browser. By default its only working for localhost, but you can allow public ip's.
Todo
- ~~Package availble via composer~~
- Easy way to integrate custom Logic
- Support HTTPs
- ~~Parse FormData~~
How To Install?
Define package in your composer.json file as require dependency
"require": {
"yousafsyed/standalone_php_proxy": "^v1.0"
}
Now update/install composer dependencies
$ composer install
$ composer update
Example
Create a file server.php
require "./vendor/autoload.php";
use YousafSyed\ProxyServer;
$server = new ProxyServer(); // optional parameters for port and host like this new ProxyServer('8080','localhost')
// finally run the server
$server->run();
How to Run?
$ php server.php
ScreenShot
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.