Skip to content

A net flow pilot in order to handle some proxy configuration automatically.

Notifications You must be signed in to change notification settings

Haoke98/FlowPilot

Repository files navigation

FlowPilot

A net flow pilot in order to handle some proxy configuration automatically.

Usage

  1. Install

    pip install PFlowC -U
  2. Run

    pflow-cli server

  3. 安装证书

    否则打开任何站点都出现证书无效

    浏览器上访问: http://mitm.it/

    • Manual Installation
      1. Double-click the P12 file to start the import wizard.
      2. Select a certificate store location. This determines who will trust the certificate – only the current Windows user or everyone on the machine. Click Next.
      3. Click Next again.
      4. Leave Password blank and click Next.
      5. Select Place all certificates in the following store, then click Browse, and select Trusted Root Certification Authorities.
      6. Click OK and Next.
      7. Click Finish.
      8. Click Yes to confirm the warning dialog.
    • Automated Installation
      1. Run certutil.exe -addstore root mitmproxy-ca-cert.cer (details).
  • 其他命令可参考Help文档
    pflow --help
    
     ██████╗ ███████╗██╗      ██████╗ ██╗    ██╗ ██████╗
     ██╔══██╗██╔════╝██║     ██╔═══██╗██║    ██║██╔════╝
     ██████╔╝█████╗  ██║     ██║   ██║██║ █╗ ██║██║
     ██╔═══╝ ██╔══╝  ██║     ██║   ██║██║███╗██║██║
     ██║     ██║     ███████╗╚██████╔╝╚███╔███╔╝╚██████╗
     ╚═╝     ╚═╝     ╚══════╝ ╚═════╝  ╚══╝╚══╝  ╚═════╝
    
     Command line interface for Proxy Flow Controller with basic auto configurations.
     Version: 2.5.X                    By: BlackHaoke<Haoke98@outlook.com>
     Usage: pflow-cli [OPTIONS] COMMAND [ARGS]...
    
     Options:
       --help  Show this message and exit.
    
     Commands:
       off      Set off and clear all proxy config.
       on       Run proxy flow controller.
       server   Server as the Agent service for the local device in same LAN...
       version  Version
    
    

TODO

  • Make system proxy setting configuration automatic.
    • MacOS
    • Windows
    • Linux
  • Make the command line setting configuration automatic.
    • MacOS
      • .zshrc
      • .bashrc
      • auto detect the env file.
    • Windows
    • Linux
  • 实现从数据中心拉下来当前地址里位置对应的忽略列表, 以此实现根据地理位置确定忽略哪些地址走代理.
  • Combine with the Intranet Penetration Tool
  • Implementing upstream-configurable clash / agent.
  • Publish as python site-packages.
  • Release the pre-built packages for all the platform:
    • MacOSX
    • Windows
    • Linux
  • Use the mitmproxy implement the new Agent Client.
    • Auto update the bypass domains list by the geoip.
    • router the ignored host for proxy or direct real-time.
  • 实现流量控制通过程序内部实现而非通过系统的proxy_bypass_domains设置.
  • 利用Curses优化控制台流量展示
  • 实现后台以服务的形式运行
    • 开发状态栏组件
  • 开发GUI,Desktop应用
  • 利用 Trojan 实现可跨过 GFW 的传统代理.

打包 & 安装 & 发布

以下这些操作全都进入到项目根目录再进行

  1. 打包

    先删除打包目录再进行打包, 这样能避免不能覆盖的问题.

    rm -rf ./build
    rm -rf ./dist
    python setup.py sdist bdist_wheel
  2. 安装

    本地做一次测试验证包的完整性.

    (在一个环境上打包, 在另一个环境上安装最能明显的察觉到存在的问题)

    pip install ./dist/PFlowC-2.5.X.tar.gz
  3. 发布

    twine upload ./dist/PFlowC-2.5.X.tar.gz

引用 & 鸣谢