Scripting drops the fractional part of whole-number floats (0.0 → 0), breaking strictly typed clients
@NghiaTranUIT is already working on this.
Since Sep 17, 2026.
Assessment
This issue has not been assessed yet.
Description
Description
When a Scripting rule touches a JSON response, floating-point values whose
fractional part is zero lose their type: 0.0 is re-serialized as 0 and
1.0 as 1. The script itself does not touch these fields — merely having an
onResponse handler active is enough.
This is not a cosmetic issue. Our mobile app declares these fields as Double.
Once Proxyman rewrites them as integers, deserialization fails and the app
crashes, which makes the endpoint impossible to debug with Proxyman.
Steps to Reproduce
- Serve a JSON response that contains a whole-number float in a field the
script will not touch:{ "sampleRate": 0.0, "ratio": 1.0, "flag": true } - Create a Scripting rule for that URL with onResponse enabled, containing a
handler that modifies only an unrelated field:
function onResponse(context, url, request, response) {
const body = response.body;
body.flag = false;
response.body = body;
return response;
}
- Compare the response body the client receives with the rule enabled and
disabled.
Current Behavior
{"sampleRate":0,"ratio":1,"flag":false}
Both untouched float fields come back as integers. The whole body is also
reformatted (pretty-print collapsed, key order changed), which confirms it is
parsed and re-serialized rather than patched.
Expected Behavior
{"sampleRate":0.0,"ratio":1.0,"flag":false}
Numeric literals that the script does not modify should be passed through
byte-for-byte. At minimum, a value that arrived as a float should be
re-serialized as a float.
Environment
- App version: Proxyman 6.16.0 (61600)
- macOS version: macOS 15 (Darwin 25.6.0)
- Client: Android (okhttp/5.3.2), remote device via Wi-Fi proxy
- Dominant language
- No language data
- Stars
- 7.1k
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ProxymanApp/Proxyman
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
ProxymanApp/Proxyman#2821 ·
-
Could not observe system extension changesPossibly taken @NghiaTranUIT claimed this 2 days ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 45/100
ProxymanApp/Proxyman#2819 · 2 comments · 1 assignee ·
-
启动后约 6 秒崩溃Possibly taken @NghiaTranUIT claimed this 8 days ago. Open✅ Done bug
ProxymanApp/Proxyman#2818 · 2 comments · 1 assignee ·
-
[iPadOS] Local VPN toggle does not turn on and VPN profile is not created in iPadOS SettingsPossibly taken @NghiaTranUIT claimed this 9 days ago. Openbug
ProxymanApp/Proxyman#2817 · 1 comment · 1 assignee ·
-
Factory Reset in proxyman-cliPossibly taken @NghiaTranUIT claimed this 8 days ago. Open✅ Done enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ProxymanApp/Proxyman#2816 · 1 comment · 1 assignee ·