Environment
demo package.json
{
"name": "demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "node src/index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.4",
"ofetch": "^1.3.4"
}
}
Reproduction
The demo code
import { HttpProxyAgent } from 'http-proxy-agent'
import { ofetch } from 'ofetch'
const res1 = await ofetch('http://ip-api.com/json')
const res2 = await ofetch('http://ip-api.com/json', {
agent: new HttpProxyAgent('http://127.0.0.1:7890'),
})
console.log('No Proxy IP: ' + res1.query)
console.log('Proxy IP: ' + res2.query)
Describe the bug
console print
No Proxy IP: 125.70.78.162
Proxy IP: 125.70.78.162
result is same, the set proxy is invalid
Additional context
No response
Logs
No response
Environment
demo package.json
Reproduction
The demo code
Describe the bug
console print
result is same, the set proxy is invalid
Additional context
No response
Logs
No response