diff --git a/configs/wsl_sudo_env.json b/configs/wsl_sudo_env.json new file mode 100644 index 0000000..efce275 --- /dev/null +++ b/configs/wsl_sudo_env.json @@ -0,0 +1,35 @@ +{ + "name": "WSL - Sudo - Env", + "cmd": "wsl sudo", + "set": [ + { + "args": [ + "tee", + "-a", + "/etc/environment", + "\"<<<\"", + "http_proxy" + ], + "equator": "=" + }, { + "args": [ + "tee", + "-a", + "/etc/environment", + "\"<<<\"", + "https_proxy" + ], + "equator": "=" + } + ], + "unset": [ + { + "args": [ + "sed", + "-i", + "'''/^https\\?_proxy=.*$/d'''", + "/etc/environment" + ] + } + ] +} diff --git a/configs/wsl_sudo_git.json b/configs/wsl_sudo_git.json new file mode 100644 index 0000000..e6303b2 --- /dev/null +++ b/configs/wsl_sudo_git.json @@ -0,0 +1,36 @@ +{ + "name": "WSL - Sudo - Git", + "cmd": "wsl sudo git", + "set": [ + { + "args": [ + "config", + "--global", + "http.proxy" + ] + }, { + "args": [ + "config", + "--global", + "https.proxy" + ] + } + ], + "unset": [ + { + "args": [ + "config", + "--global", + "--unset", + "http.proxy" + ] + }, { + "args": [ + "config", + "--global", + "--unset", + "https.proxy" + ] + } + ] +} diff --git a/configs/wsl_sudo_npm.json b/configs/wsl_sudo_npm.json new file mode 100644 index 0000000..62440fc --- /dev/null +++ b/configs/wsl_sudo_npm.json @@ -0,0 +1,36 @@ +{ + "name": "WSL - Sudo - NPM", + "cmd": "wsl sudo npm", + "set": [ + { + "args": [ + "config", + "set", + "proxy" + ], + "equator": "=" + }, { + "args": [ + "config", + "set", + "https-proxy" + ], + "equator": "=" + } + ], + "unset": [ + { + "args": [ + "config", + "delete", + "proxy" + ] + }, { + "args": [ + "config", + "delete", + "https-proxy" + ] + } + ] +} diff --git a/configs/wsl_sudo_pip.json b/configs/wsl_sudo_pip.json new file mode 100644 index 0000000..181d810 --- /dev/null +++ b/configs/wsl_sudo_pip.json @@ -0,0 +1,22 @@ +{ + "name": "WSL - Sudo - Pip", + "cmd": "wsl sudo pip", + "set": [ + { + "args": [ + "config", + "set", + "global.proxy" + ] + } + ], + "unset": [ + { + "args": [ + "config", + "unset", + "global.proxy" + ] + } + ] +}