Reverse proxy?
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, for example, i have few proxies:
const proxies = [
'51.222.21.93:80',
'107.1.80.135:80',
'34.234.164.65:80'
];
And i have anyProxy server on 127.0.0.1:5050
I want do something like:
Request come to 127.0.0.1:5050 then i'll get random proxy from my proxy list, then anyProxy request with that proxy.
How i can implement that?
module.exports = {
summary: 'a rule to inject proxy',
* beforeSendRequest (requestDetail) {
const proxies = [
'51.222.21.93:80',
'107.1.80.135:80',
'34.234.164.65:80'
];
const item = proxies[Math.floor(Math.random()*proxies.length)];
// Where i can put my proxy?
console.log(item);
return null;
},
};
Contributor guide
No contributing guide indexed for this repository
Research direction
The only entry point shown is the beforeSendRequest hook in the provided rule; begin by checking anyProxy's hook and API documentation for whether an upstream proxy can be selected there. The issue is complete only when the supported way to route a request through a randomly selected proxy is established, or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100