Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cloudwaddie/aitweaker/llms.txt

Use this file to discover all available pages before exploring further.

Most problems with AI Leaks Tweaker fall into one of a few categories: the proxy process not starting, HTTPS interception failing due to a missing certificate, flags not being injected into responses, or the application itself not launching. The sections below walk through each scenario with specific log messages to look for and steps to resolve them.

Issues

When you click Start Proxy, the button reverts to “Start Proxy” almost immediately and the log viewer shows an error. Common causes:mitmproxy is not installed or not on PATHThe default start command is:
mitmdump -s proxy.py -p 8000
If mitmdump cannot be found, the log shows something like:
Failed to start proxy: [Errno 2] No such file or directory: 'mitmdump'
Install mitmproxy using pipx (recommended) or pip:
pipx install mitmproxy
Port 8000 is already in useIf another process is listening on port 8000, mitmproxy will fail to bind. Check the log for a message like Address already in use. Stop the conflicting process, or change the port in the Start Command field:
mitmdump -s proxy.py -p 8080
Remember to update FoxyProxy or your OS proxy settings to match the new port.Wrong or missing start commandThe Start Command field on the Proxy tab must contain the full command to launch mitmproxy with the proxy script. If the field is blank or points to the wrong script path, nothing will start. The default value is:
mitmdump -s proxy.py -p 8000
Ensure proxy.py is in the same directory from which you are running AI Leaks Tweaker.
After enabling the proxy (via FoxyProxy or OS settings), HTTPS pages show a browser certificate warning. This means the mitmproxy CA certificate has not been trusted by your system or browser.
The mitmproxy CA certificate gives the proxy the ability to decrypt your HTTPS traffic. Only install it on a machine you control, and disable the proxy when you are not actively using the tool.
Easy method — mitm.itWhile the proxy is running, click Open mitm.it to Get CA Certificate in the Proxy tab. This opens http://mitm.it in your browser, which serves the correct certificate for your device along with platform-specific installation instructions.Manual methodIf mitm.it does not load, locate the certificate file directly:
PlatformDefault certificate path
WindowsC:\Users\YourUsername\.mitmproxy\mitmproxy-ca-cert.pem
macOS / Linux~/.mitmproxy/mitmproxy-ca-cert.pem
Installing on Windows
  1. Double-click the .pem file.
  2. Click Install Certificate.
  3. Select Current User, then click Next.
  4. Choose Place all certificates in the following store and click Browse.
  5. Select Trusted Root Certification Authorities and click OK.
  6. Click Next, then Finish.
Restart your browser after installing the certificate.
Firefox maintains its own certificate store. Even after installing the certificate at the OS level, you may need to import it separately in Firefox under Settings > Privacy & Security > Certificates > View Certificates > Import.
The proxy is running and intercepting requests, but your Gemini flags do not seem to take effect.Check the Gemini modifications switchThe Enable Gemini Modifications toggle at the top of the Gemini tab must be on. If it is off, the proxy skips flag injection entirely.Confirm the proxy is intercepting the right URLsThe proxy modifies JS modules served from gemini.gstatic.com or www.gstatic.com under the /_/mss/boq-bard-web/_/js/ path. When a modification succeeds, the log shows:
Modified Gemini ctor for flags: exact=[...], ranges=[...]
If this line does not appear after a hard refresh, the proxy is not intercepting the script — check the CA certificate installation and proxy routing.rules.json may be staleAfter saving changes in the app, rules.json is regenerated automatically and the proxy reloads it on the next intercepted request. You do not need to restart the proxy manually. If you edited rules.json by hand, the proxy picks up the change the next time it handles a request (it checks the file modification time on every request and response).Browser cacheA normal page reload serves cached JS. Always use a hard refresh (Ctrl+Shift+R on Windows/Linux, Cmd+Shift+R on macOS) to force the browser to re-fetch the script from the network so the proxy can intercept it.
The log shows Modified Gemini ctor but the feature you are looking for is not visible.The ctor pattern may not match the current bundleThe proxy locates flags by patching this exact pattern in the Gemini JS:
ctor(a){return typeof a==="boolean"?a:this.defaultValue}
If Google ships a bundle where this pattern has changed, injection fails and the log shows:
[WARN] ctor method not found in <url>
Check the project repository for an updated proxy.py that matches the new bundle structure.You may have the wrong flag IDsUse the binary search tool to systematically identify which exact integer ID enables the feature you are looking for, rather than guessing specific IDs.batchexecute URLs are intentionally skippedThe proxy explicitly ignores gemini.google.com URLs containing batchexecute to prevent breaking API calls. This is by design and does not affect flag injection into JS bundles.
The proxy modifies Copilot by intercepting the /c/api/start endpoint. When a modification succeeds, the log shows:
Modified Copilot response: https://copilot.microsoft.com/c/api/start...
If this message does not appear:
  1. Confirm Enable Copilot Modifications is toggled on in the Copilot tab.
  2. Verify the proxy is running and your browser traffic is routed through it.
  3. Reload the Copilot page — the /c/api/start request is made during page load.
  4. Check that the CA certificate is installed so HTTPS interception works.
The proxy also logs individual actions:
Set 'allowBeta' to true in Copilot response.
Injected 3 new Copilot flags.
If you see Modified Copilot response but none of the flag lines, confirm that the flags you added are enabled (toggle switch on) and that you clicked Save Copilot Changes.
The proxy intercepts grok.com pages and replaces the server-client-data-experimentation script tag with your custom JSON.Validate the JSON firstInvalid JSON will not be injected. Click Format & Validate JSON in the Grok tab before saving. If the JSON is invalid, the log shows:
Invalid JSON: <error details>
Fix the error, then click Save Grok Changes.When config injection succeeds, the log shows:
Modified Grok configuration: https://grok.com/...
If you see this line but the behaviour does not change, the key you modified may not correspond to the feature you expected, or a page reload is required to pick up the new config.Subscription spoofingWhen Spoof Subscription (Pro/Super) is enabled, the proxy replaces subscription-related fields. Successful substitutions are logged individually:
Spoofed Grok subscription ("isSuperGrokUser":false -> "isSuperGrokUser":true)
If the application fails to open or crashes immediately, the most likely cause is a missing Python dependency.Re-run the setup script
# Windows
scripts\setup.bat

# macOS / Linux
bash scripts/setup.sh
The setup script installs all packages listed in requirements.txt:
customtkinter
mitmproxy
pystray
Pillow
cx_Freeze
beautifulsoup4
lxml
Check your Python versionAI Leaks Tweaker requires Python 3.8 or later. Verify with:
python --version
If your system Python is older, install a newer version and re-run the setup script in that environment.Run from the correct directoryThe application expects proxy.py, rules.json, and profiles.json to be in the working directory. Always launch the app using the provided run scripts (run.bat or run.sh) from the project root, not by double-clicking app.py from a file manager.

Reading the proxy log

The log viewer in the Proxy tab shows all output from the mitmproxy process. Lines prefixed with [TERMINAL_LOG] come from proxy.py itself and are the most useful for diagnosing interception issues. Key messages to know:
Log messageWhat it means
proxy.py: Reloaded rules.json.The proxy detected a change in rules.json and loaded the new configuration.
Modified Gemini ctor for flags: ...Gemini JS was successfully patched with the current flag list.
[WARN] ctor method not found in <url>The Gemini JS bundle no longer contains the expected pattern; flags were not injected.
Modified Copilot response: <url>The Copilot /c/api/start response was modified.
Modified Grok configuration: <url>The Grok page config was replaced with your custom JSON.
proxy.py: Invalid JSON in Grok configuration rules.The JSON saved for Grok is malformed; use Format & Validate JSON to fix it.
proxy.py: rules.json not found. Clearing all rules.rules.json was deleted or moved; no modifications will be applied until it is regenerated.

Build docs developers (and LLMs) love