Skip to content
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

Allow SOCKS proxy to be supplied via http_proxy env var #3182

Merged
merged 1 commit into from
Apr 16, 2023

Conversation

normanr
Copy link
Contributor

@normanr normanr commented Apr 15, 2023

Description

http_proxy (or HTTP_PROXY) environment variable protocol is currently ignored, and the connection fails if socks://host:port is supplied. This change just populates proxyType from the regular expression capture for proto://, which is good enough to allow the existing useSocksProxy logic to work (once it's moved below the env var processing).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update

How Has This Been Tested?

I tested manually with http_proxy=socks://localhost:1080 ./build/unix/src/stellarium with and without the change. I checked that the qDebug() log message changed appropriately and that the Satellites plugin could successfully retrieve files via the proxy.

Test Configuration:

  • Operating system: Debian Linux
  • Graphics Card: Intel(R) UHD Graphics 620

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for adding your first pull request to Stellarium. If you have questions, please do not hesitate to contact us.

Copy link
Member

@alex-w alex-w left a comment

Choose a reason for hiding this comment

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

Thanks!

@alex-w alex-w added this to the 23.2 milestone Apr 16, 2023
@alex-w alex-w added the enhancement Improve existing functionality label Apr 16, 2023
Copy link
Member

@gzotti gzotti left a comment

Choose a reason for hiding this comment

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

I never used or even set up a proxy, cannot technically comment on this. If it works better than before, fine for me.

@alex-w alex-w merged commit 6fa426e into Stellarium:master Apr 16, 2023
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Apr 19, 2023
@github-actions
Copy link

Hello @normanr!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Jul 2, 2023
@github-actions
Copy link

github-actions bot commented Jul 2, 2023

Hello @normanr!

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality
Development

Successfully merging this pull request may close these issues.

3 participants