drmer / reproxy
Reproxy of php
0.0.1
2018-02-24 01:01 UTC
Requires
- react/event-loop: ^0.4.3
- react/socket: ^1.0 || ^0.8.3
This package is auto-updated.
Last update: 2024-11-27 01:16:31 UTC
README
PHP reverse proxy is a tool that can map your IPv6 address to an IPv4 address or domain. Support both HTTP and HTTPS
Usage
Normal use
$ git clone https://github.com/jndrm/reproxy.git && cd reproxy $ composer install
replace your proxy configuration in start.php
file
$ sudo php start.php
or use it in your own project
<?php use Drmer\Reproxy\ReproxyServer; $server = new ReproxyServer([ // map your localhost to github server 'tcp://127.0.0.1:443' => 'tcp://13.250.177.223:443', ]); echo "Reverse proxy server starting\n"; $server->start(); // nothing will be executed after start
Laravel
Add reproxy to your project
$ composer require drmer/reproxy
Add service provider to your config/app.php
file
Drmer\Reproxy\ReproxyServiceProvider::class,
publish config file
$ php artisan vendor:publish --provider="Drmer\Reproxy\ReproxyServiceProvider"
add your proxy map to config/reproxy.php
file
'tcp://127.0.0.1:443' => 'tcp://13.250.177.223:443',
$ sudo php artisan reproxy
Todo
- Add tests