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

Add proxy support #1436

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

T0astBread
Copy link

This PR adds support for proxying network requests over a SOCKS or HTTP proxy and the corresponding preferences screen.

A DelegatingProxy (which is a java.net.Proxy) is registered on every RestService. The DelegatingProxy delegates its proxying to a real Proxy created from the proxy preferences.

This implementation is a bit ugly but the fact that RestServices are only created once while proxy preferences can change at any time made it hard to avoid global state and the DelegatingProxy class.

Enabling proxying breaks search. I haven't investigated this further but it works without a proxy.

to allow for parallel installation of debug and production builds
This commit adds support for proxying network requests over a SOCKS
or HTTP proxy and the corresponding preferences screen.

A DelegatingProxy (which is a java.net.Proxy) is registered on every
RestService. The DelegatingProxy delegates its proxying to a real
Proxy created from the proxy preferences.

This implementation is a bit ugly but the fact that RestServices are
only created once while proxy preferences can change at any time made
it hard to avoid global state and the DelegatingProxy class.

Enabling proxying breaks search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant