wolftotem4 / jet-proxy
基于PHP的代理,可用于网页调试目的。
v0.10.2
2020-02-19 09:18 UTC
Requires
- php: ^7.1.3
- symfony/process: ^4.0
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: ^7.5
README
基于PHP的代理,可用于网页调试目的。
安装
git clone https://github.com/wolftotem4/jet-proxy.git
cd jet-proxy
composer install
使用
域名路由转发
- 打开并编辑
index.php文件。
$forwarding = [ // Edit the forwarding list below. 'localhost:8080' => ['host' => 'localhost', 'ip' => '127.0.0.1'], // You can disguise as an actual website. (Please don't do anything evil.) // Don't forget you need to set up `/etc/hosts` (Linux) // or '%systemroot%\System32\drivers\etc\hosts' (Windows). 'example.com' => ['host' => 'example.com', 'ip' => '123.123.123.123'], ];
- 在Apache或PHP内置的开发服务器上运行。
php -S localhost:8080 index.php
命令行设置主机
# php cli-server [host binding] [target host] [target ip address]
php cli-server.php localhost:8080 example.com 123.123.123.123