Overview of LightProxy
masterwhistle, allowing users to leverage powerful packet capturing and proxy rules, including the ability to write custom rules using Node.js.repository·master·Indexed 25 days ago
https://github.com/alibaba/lightproxyAn automated proxy tool for macOS and Windows based on whistle. LightProxy simplifies proxying tasks by automating certificate installation and system proxy settings, supporting packet capture, hosts binding, resource forwarding, and mocking. It allows for highly customizable proxy rules using whistle syntax and Node.js, including support for multi-line strings and wireless proxy configuration for mobile devices.
whistle, allowing users to leverage powerful packet capturing and proxy rules, including the ability to write custom rules using Node.js.LightProxy provides several proxy and debugging capabilities:
hosts binding.script into a page or modifying return headers).LightProxy provides several key capabilities for developers:
hosts binding.script tags into pages or modifying response headers.You can use wildcards in domain names without the ^ prefix.
*.com matches domains like baidu.com or bing.com, but will not match subdomains like www.baidu.com.***.com matches all subdomains, including deeply nested ones like xxx.yyy.baidu.com.*.com
***.comFollow these steps to install and trust the LightProxy certificate on iOS:
To capture network requests from a mobile device, you must use the wireless proxy setup.
Important: By default, LightProxy is not visible on the local area network (LAN). To enable LAN visibility for mobile device proxying, you must click on the 手机代理 (Mobile Proxy) tab in the LightProxy interface.
To use LightProxy on iOS, you must download, install, and trust the certificate using the following steps:
Settings => General => About This Machine, scroll to the bottom to find Certificate Trust Settings, and enable the toggle for the LightProxy certificate.By default, LightProxy settings only apply to browsers and Webviews. To route command-line tools (like curl) through the LightProxy proxy, use the copy shell script function located in the LightProxy menubar.
Once clicked, the proxy configuration commands are copied to your clipboard. After pasting and executing these commands in your terminal, subsequent commands in that session will use the LightProxy proxy.
Note: This method only affects applications that respect environment variables; it does not force all system applications through the proxy.
# Example of the commands generated by the copy shell script function
export https_proxy=http://127.0.0.1:12888 http_proxy=http://127.0.0.1:12888 all_proxy=socks5://127.0.0.1:12889
curl https://baidu.com -ILightProxy is a local proxy packet capture software based on whistle. You can download the installers for macOS and Windows using the links below:
Installation Steps:
.dmg file and drag LightProxy to your Applications folder..exe installer.First-time Startup: When you launch LightProxy for the first time, you will be prompted to enter your password twice. This is required to install auxiliary programs and automatically install the necessary certificates.
By default, LightProxy proxy settings only apply to browsers and Webviews. To use LightProxy with command-line tools like curl, you must configure your shell environment variables.
You can use the "Copy Shell Script" feature provided in the LightProxy menubar to automatically copy the required proxy commands to your clipboard. After copying, paste and execute them in your terminal.
Note: This method only affects applications that respect environment variables; it will not apply to all system applications.
Installation steps may vary depending on your Android model, but the general process is:
Note for high Android versions: High-version Android devices require applications to explicitly declare support for user certificates. You can test if the proxy is working by checking if Android Chrome successfully routes traffic through the proxy.