How to implement upstream proxy in any proxy
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
how to implement outgoing proxy in any proxy ? for an example.
if i want to connect to google.com, follwing steps are needed for me.
browser --> anyproxy --> internal proxy --> google.com
my question is how to redirect anyproxy request through our company internal proxy ?
I saw your reply in this question https://github.com/alibaba/anyproxy/issues/314
I have tried to modify the requestOption using following code as per your suggestion.
*beforeSendRequest(requestDetail) {
const newOption = requestDetail.requestOptions;
newOption.port = 8080;
newOption.hostname = 'http://192.168.0.107';
return {
requestOptions: newOption
}
},
It shows following error from anyproxy.
**Error: getaddrinfo ENOTFOUND http://192.168.0.107 http://192.168.0.107:8080**
My upstream proxy running on http://192.168.0.107:8080
Could you please help me ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the beforeSendRequest hook and requestDetail.requestOptions shown in the issue, then review the discussion in issue #314 and the reported getaddrinfo ENOTFOUND output. The goal is to document or establish the supported behavior for routing requests through the internal proxy at 192.168.0.107:8080, with a working example for the browser → AnyProxy → internal proxy flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100