Skip to content

Apply proxy settings to the PO token web views #6922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

absidue
Copy link
Member

@absidue absidue commented Feb 25, 2025

Apply proxy settings to the PO token web views

Pull Request Type

  • Bugfix

Related issue

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: ce38429

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 25, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) February 25, 2025 22:38
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with local tor (macos)

@efb4f5ff-1298-471a-8973-3d47447115dc

Doesnt this also close #6713

@FreeTubeBot FreeTubeBot merged commit 545c2f7 into FreeTubeApp:development Mar 2, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 2, 2025
@absidue absidue deleted the potoken-webview-proxy branch March 2, 2025 15:07
@absidue
Copy link
Member Author

absidue commented Mar 2, 2025

Doesnt this also close #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.

PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 3, 2025
* new-potokens: (56 commits)
  Implement content and session PO tokens
  Migrate ProxySettings to the composition API (FreeTubeApp#6946)
  Apply proxy settings to the PO token web views (FreeTubeApp#6922)
  Translated using Weblate (Turkish)
  Translated using Weblate (Bengali)
  Translated using Weblate (English (United Kingdom))
  Translated using Weblate (Bengali)
  Migrate FtShareButton to composition api (FreeTubeApp#6919)
  Translated using Weblate (Romanian)
  IV: fix loading community tab (FreeTubeApp#6933)
  Translated using Weblate (Serbian)
  Translated using Weblate (Afrikaans)
  Translated using Weblate (Dutch)
  Translated using Weblate (Dutch)
  Translated using Weblate (Polish)
  Translated using Weblate (German)
  Translated using Weblate (Afrikaans)
  Translated using Weblate (Nepali)
  Translated using Weblate (Czech)
  Translated using Weblate (Afrikaans)
  ...
efb4f5ff-1298-471a-8973-3d47447115dc pushed a commit to efb4f5ff-1298-471a-8973-3d47447115dc/FreeTube that referenced this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants