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

feat: add proxy setting #620

Merged
merged 2 commits into from Jan 6, 2021
Merged

feat: add proxy setting #620

merged 2 commits into from Jan 6, 2021

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Jan 3, 2021

Add a proxy setting for gist location.

defaults to HTTPS_PROXY, https_proxy, HTTP_PROXY, or http_proxy environment variable.

fixes #619

@baatochan
Copy link

I would be very happy to test that but I don't know how to build and install this package with this commit. I've only ever installed atom packages via atom settings.

@UziTech
Copy link
Member Author

UziTech commented Jan 3, 2021

You will have to do the following:

  • Uninstall current sync-settings package in Atom
  • Clone the repo: git clone https://github.com/uzitech/sync-settings
  • Move to the source directory: cd sync-settings
  • Checkout the branch: git checkout origin/proxy
  • Run apm link
  • Restart Atom

@baatochan
Copy link

baatochan commented Jan 3, 2021

Before you responded I'd found another instruction here and was able to install this version of package.

I can confirm that now it works, but there is one edge case when it doesn't. If I have set env var for proxy and I switch to network without proxy there is no way I can switch sync settings to not use the proxy. Entering "", '', into setting field (and I believe anything "blank" there) shows error: You must specify a "protocol" for the proxy type (http, https, socks, socks4, socks4a, socks5, socks5h, pac+data, pac+file, pac+ftp, pac+http, pac+https)

Edit: and leaving this field blank changes it to default value which is value of env var.

@UziTech
Copy link
Member Author

UziTech commented Jan 3, 2021

I added a checkbox in the settings to disable the proxy even when it is set. Does that work for you?

@baatochan
Copy link

It works nice 👍

@UziTech
Copy link
Member Author

UziTech commented Jan 5, 2021

Thanks for helping with this. I'll add some regression tests and get this released soon.

@UziTech UziTech merged commit 5726dee into atom-community:master Jan 6, 2021
@UziTech UziTech deleted the proxy branch January 6, 2021 14:30
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2021

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Novocastrian
Copy link

Hi there,

I've entered my employer's proxy details into the settings as below (proxy.my.employer:8080):
image
However, when I restart Atom, it complains about the proxy type.
image
How do I fix this?

@UziTech
Copy link
Member Author

UziTech commented Jan 28, 2021

@Novocastrian it looks like you need to add the protocol to the URL (http or https)

@UziTech
Copy link
Member Author

UziTech commented Jan 28, 2021

You can see the supported protocols here

@Novocastrian
Copy link

@Novocastrian it looks like you need to add the protocol to the URL (http or https)

Yep! You're correct. I assumed that if you didn't declare HTTPS it would use HTTP. adding "HTTP://" to the start of the proxy address and rebooting fixed the issue for me.

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

Successfully merging this pull request may close these issues.

Can't set proxy settings
3 participants