GithubHelp home page GithubHelp logo

satokaz / vscode-toggleproxy Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 4.47 MB

To `enable` or `disable` the `"http.proxy":` in settings.json.

License: MIT License

TypeScript 100.00%
visual-studio-code extensions proxy

vscode-toggleproxy's Introduction

vscode-toggleproxy

Functions provided

This extension toggles enable or disable the http_proxy item in settings.json.

  • The setting status of http_proxy is displayed in the status bar.

alt

Installation

  • Press F1 in VSCode, type ext install and then look for proxy.

Usage

  • Click the globe (globe) icon on the status bar. To toggle the setting.
  • Available commands: Proxy : Toggle
  • Or context menu: Proxy : Toggle
  • Or Automatically switch (when Enabled)

Automatically switch

Added a monitor to the proxy server (set to http.proxy) by ping (Every 15 seconds) and automatically switch http.proxy.

Enable automatic switching (default: false) in settings.json:

"toggleproxy.autochange": true

The setting will take effect after restarting vscode.

http_proxy Toggle Notification

Add http_proxy toggle notification.

toggleproxy.notifier": true

If you want to disable it, set to false. (default: true)

tips

vscode-toggleproxy has effect only on VS Code. There is no effect on git/npmn/typings etc... When executing with terminal, set the http_proxy and https_proxy environment variable and execute the command.

Notes

Please make a backup of settings.json.

  • Windows: %APPDATA%\Code\User\settings.json or %APPDATA%\Roaming\Code - Insiders\User\settings.json
  • Mac: $HOME/Library/Application Support/Code/User/settings.json or $HOME/Library/Application Support/Code - Insiders/User/settings.json
  • Linux: $HOME/.config/Code/User/settings.json or $HOME/.config/Code - Insiders/User/settings.json

Just in case, Make a copy of settings.json in extensionPath.

ExtensionPath is an example: $HOME/.vscode/extensions/satokaz.vscode-toggleproxy-$VERSION/settings.json.tmp

Changelog

  • 0.4.5 - 2017/3/6

    • Added new setting toggleproxy.pingInterval (default: 30000 ms (30 s)) to enable ping interval specification
  • 0.4.4 - 2017/1/30

    • Fixed being notified every time the settings.json file is rewritten
  • 0.4.3 - 2017/1/30

    • Add http_proxy toggle notification.
    • Make a copy of settings.json in extensionPath. (ExtensionPath is an example: $HOME/.vscode/extensions/satokaz.vscode-toggleproxy-$VERSION/settings.json.tmp)
  • 0.4.2 - 2016/12/26

    • Change file reading to synchronous read/write
    • Change ping to 10 to 15 second interval
  • 0.4.1 - 2016/12/17

    • Suppress debug output
  • 0.4.0 - 2016/11/18

    • Added automatic switching by ping
  • 0.3.0 - 2016/10/30 (PR #1 - Thanks to @rlasjunies)

    • Fix tooltips text
  • 0.2.0 - 2016/07/26

    • Wrong environment variables in Windows platform
  • 0.1.0 - 2016/07/22

    • Add Context Menu

      alt

License

This extension is licensed under the MIT License.

Enjoy!

vscode-toggleproxy's People

Contributors

satokaz avatar

Watchers

 avatar  avatar  avatar

Forkers

javafrog cnk3x

vscode-toggleproxy's Issues

Extend proxy switching to npm, github?

Hi @satokaz ,

I am happy you have accepted the proposal.

In fact my "proxy issue" is wider than just 'vscode'. My issue is also related to 'npm' and 'github'. Every time I change work place, I've to switch proxy settings in '.npmrc' and '.gitconfig' located in the windows user folder (I do not use linux).

Do you have the same issue? Do you have a magic solution to "easily" switch the proxy mode of npm and git?

What about doing it via 'vscode-toggleProxy'? Can be an interesting exercise, we may work on it together if you are interested ;-)

Running the contributed command:'extension.toggleProxy' fail.

Hey,

  • macOS 10.12.6 (16G1311),
  • VS Code 1.21.0,
  • Toggle Proxy 0.4.4

I'm getting Running the contributed command:'extension.toggleProxy' fail. error from notificationsAlerts.ts

screen shot 2018-03-10 at 09 19 28

On the other side looks like Toggle Proxy toggles http_proxy in user settings:

screen shot 2018-03-10 at 09 24 44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.