DNR & Proxy
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 711
- Forks
- 95
- Avg merge
- 10d 11h
- Merged PRs (30d)
- 2
Description
The application of declarativeNetRequest on proxies does not appear to have been discussed.
As an example, it can be useful for passing user/pass via headers, as an (easier!?) alternative to webRequest.onAuthRequired.
Note: It might require a special flag/property in DNR to separate it from other requests.
Scenario: Browser -> proxyurl.com -> target.com
It appears that the urlFilter refers to the target.com.
const removeRuleIds = [1];
const addRules = [
{
id: 1,
priority: 1,
action: {
type: 'modifyHeaders',
responseHeaders: [
{
header: 'header-1',
operation: 'set',
value: 'header1-added'
}
]
},
condition: {urlFilter: '||proxyurl.com' }
}
];
chrome.declarativeNetRequest.updateDynamicRules({removeRuleIds, addRules});
See Also:
Issue 1318138: Add headers using declarativeNetRequest only if the request is being proxied
Contributor guide
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.
Research direction
Start with issue 367 and the linked Chromium issue 1318138. Review how declarativeNetRequest rules are expected to match proxied requests and how header modification should behave in the Browser -> proxyurl.com -> target.com scenario; done requires an agreed specification for proxy handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100