Apply proxy settings to the PO token web views
Apply proxy settings to the PO token web views
Pull Request Type
- [x] Bugfix
Related issue
- closes #6722
Description
Currently we don't apply the user's configured proxy settings to the separate sessions that we use for the PO token web views. This pull request corrects that. To not impact video loading performance too much I decided to cache the proxy URL in a variable, that way we don't have to make multiple calls to nedb each time a video is opened.
Testing
Set a proxy in FreeTube's proxy settings and check that it works and doesn't cause any new problems.
I used the Charles Proxy app to test this, if you want to do the same you'll need to add this snippet to the src/main/index.js file so that the SSL spoofing works:
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
event.preventDefault()
// eslint-disable-next-line n/no-callback-literal
callback(true)
})
Desktop
- OS: Windows
- OS Version: 10
- FreeTube version: ce3842924b06bac1199a569b4a1251a195946772
Doesnt this also close https://github.com/FreeTubeApp/FreeTube/issues/6713
Doesnt this also close https://github.com/FreeTubeApp/FreeTube/issues/6713
No, that issue is about people blocking jnn-pa on their PiHoles, us fixing proxies not getting applied correctly is not going to solve problems for people that are not using a proxy but are using a misconfigured PiHole. The only way that this PR would have solved the problems of someone with a misconfigured PiHole is if they had been trying to bypass their PiHole with a proxy.