wolftotem4/jet-proxy

基于PHP的代理,可用于网页调试目的。

v0.10.2 2020-02-19 09:18 UTC

This package is auto-updated.

Last update: 2024-09-19 19:43:00 UTC


README

基于PHP的代理,可用于网页调试目的。

安装

git clone https://github.com/wolftotem4/jet-proxy.git
cd jet-proxy
composer install

使用

域名路由转发

  1. 打开并编辑 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'],
];
  1. 在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