Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 years ago

#9525 closed Patch - Bug Fix (Fixed)

[PATCH] Mythbrowser does not use proxy set in http_proxy environment variable

Reported by: jan.ceuleers@… Owned by: nigel
Priority: minor Milestone: 0.25
Component: Plugin - MythBrowser Version: 0.23-fixes
Severity: low Keywords:
Cc: Ticket locked: no

Description

The http_proxy environment variable is correctly set, and it is being used by various parts of the MythTV universe as well as other bits of the system, but not Mythbrowser. I found this by observing the squid logfiles while using Mythbrowser.

This means that Mythbrowser may be unnecessarily slow.

Michael T. Dean suggested on the users mailing list that the solution may be found here:

http://blog.mrcongwang.com/2009/07/21/applying-system-proxy-settings-to-qt-application/

Attachments (1)

mythtv-ew-proxy.patch (1.0 KB) - added by E. Westbrook <mythtv-trac@…> 3 years ago.
Add support for http_proxy environment variable

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by robertm

  • Resolution set to Invalid
  • Status changed from new to closed

Closing as a feature request without patch-- if you would like to work up a patch and attach it, please feel free to reopen.

Changed 3 years ago by E. Westbrook <mythtv-trac@…>

Add support for http_proxy environment variable

comment:2 Changed 3 years ago by E. Westbrook <mythtv-trac@…>

Patch attached; please review, re-open, or other action as appropriate.

comment:3 Changed 3 years ago by mdean

  • Resolution Invalid deleted
  • Status changed from closed to new

comment:4 Changed 3 years ago by kenni

  • Summary changed from Mythbrowser does not use proxy set in http_proxy environment variable to [PATCH] Mythbrowser does not use proxy set in http_proxy environment variable
  • Type changed from Bug Report to Patch - Bug Fix

comment:5 follow-up: Changed 3 years ago by nigel@…

  1. I wanted to add proxy support for CDDB lookups many years ago, but that required a different way to do the lookups. When (if?) HttpComms is used for that, it should be the location for doing proxy-compatible stuff?
  2. My gut feeling is that using an environment variable is a little clumsy - I would have preferred a setting from the database, but then that is just another thing that needs a settings UI.
  3. Mac OS X and Windows supposedly have hooks to look up the system proxy settings via QNetworkProxyFactory::systemProxyForQuery(). I find it hard to believe that the Linux environments don't have a standard proxy setting location these days?
  4. Now that the backend also does HTTP traffic, it also needs to set proxy "environment"s?

Paul, my work has a few corporate proxies - I'm happy to take this is you don't have any burning desire.

comment:6 in reply to: ↑ 5 Changed 3 years ago by paulh

  • Owner changed from paulh to nigel
  • Status changed from new to assigned

Replying to nigel@…:

  1. I wanted to add proxy support for CDDB lookups many years ago, but that required a different way to do the lookups. When (if?) HttpComms is used for that, it should be the location for doing proxy-compatible stuff?
  2. My gut feeling is that using an environment variable is a little clumsy - I would have preferred a setting from the database, but then that is just another thing that needs a settings UI.
  3. Mac OS X and Windows supposedly have hooks to look up the system proxy settings via QNetworkProxyFactory::systemProxyForQuery(). I find it hard to believe that the Linux environments don't have a standard proxy setting location these days?
  4. Now that the backend also does HTTP traffic, it also needs to set proxy "environment"s?

Paul, my work has a few corporate proxies - I'm happy to take this is you don't have any burning desire.

I have no use for this so you're welcome to it :)

comment:7 Changed 3 years ago by Github

Use HTTP_PROXY env. var. for MythBrowser? and other QHttp. Refs #9525.

Now also supports Mac OS X and windows, though only tested on the former.
Compared to the original patch, this is horrendously complicated,
but given that Qt's proxy support is hidden deep down without debugging,
I think having sanity checking up front is useful.

Branch: master
Changeset: 01f1c9215ffd54e19716ab35101fc6f41f4ddc81

comment:8 Changed 3 years ago by beirdo

  • Milestone changed from unknown to 0.25
  • Resolution set to Fixed
  • Status changed from assigned to closed

With Nigel's commit 5 months ago, it seems that the intent of this ticket has been completed.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.