{"_id":"@akshatmiskin/proxytool","name":"@akshatmiskin/proxytool","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@akshatmiskin/proxytool","version":"1.0.0","type":"module","description":"Easily set/unset proxy settings for npm, git, and environment on Windows and VSCode.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["proxy","npm","git","cli","iiita"],"author":{"name":"akshatmiskin"},"license":"ISC","dependencies":{"chalk":"^5.4.1","commander":"^13.1.0","fs-extra":"^11.3.0"},"bin":{"proxytool":"bin/proxytool.js"},"repository":{"type":"git","url":"git+https://github.com/AkshatMiskin/proxytool.git"},"_id":"@akshatmiskin/proxytool@1.0.0","gitHead":"ac4104d91928d16bd4b8970da5f36dcb6cdc813a","bugs":{"url":"https://github.com/AkshatMiskin/proxytool/issues"},"homepage":"https://github.com/AkshatMiskin/proxytool#readme","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-b3Fu1GEIy/FeiuwAimVo5/PI3x+pDeeMZbwwWf2389BBh4fCzUXQ6BzRWKek66B6mXC9U7Y/ieKi28yckVAglQ==","shasum":"ab1b4ea3c80d295c73d13c05620abe4cef36dd9b","tarball":"https://registry.npmjs.org/@akshatmiskin/proxytool/-/proxytool-1.0.0.tgz","fileCount":6,"unpackedSize":10782,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBiKIZcTHMrD8tuYrraaGeDieB8hmHL00A2CT18bjgtvAiAsySQilW7sGhnvwuP9Ggllsc7SD3XlE7WPKhaOSRi/Pg=="}]},"_npmUser":{"name":"akshatmiskin","email":"miskinakshat362@gmail.com"},"directories":{},"maintainers":[{"name":"akshatmiskin","email":"miskinakshat362@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/proxytool_1.0.0_1753309106298_0.08499838905731494"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-23T22:18:26.209Z","1.0.0":"2025-07-23T22:18:26.478Z","modified":"2025-07-23T22:18:26.740Z"},"maintainers":[{"name":"akshatmiskin","email":"miskinakshat362@gmail.com"}],"description":"Easily set/unset proxy settings for npm, git, and environment on Windows and VSCode.","homepage":"https://github.com/AkshatMiskin/proxytool#readme","keywords":["proxy","npm","git","cli","iiita"],"repository":{"type":"git","url":"git+https://github.com/AkshatMiskin/proxytool.git"},"author":{"name":"akshatmiskin"},"bugs":{"url":"https://github.com/AkshatMiskin/proxytool/issues"},"license":"ISC","readme":"# ProxyTool\r\n\r\n**ProxyTool** is a simple command-line utility for setting and managing proxy settings for npm, Git, and system environment variables on Windows and VSCode using PowerShell. This tool helps you configure and unset proxies with ease, allowing you to manage your network settings directly from your terminal.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- **Set Proxy**: Configure HTTP and HTTPS proxy for npm, Git, and environment variables with a single command.\r\n- **Unset Proxy**: Remove proxy settings from npm, Git, and environment variables.\r\n- **Check Proxy Status**: View the current proxy settings for npm, Git, and system environment variables.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nYou can install **ProxyTool** globally from npm to use it on your system.\r\n\r\n```bash\r\nnpm install -g @akshatmiskin/proxytool\r\n```\r\n\r\n---\r\n\r\n## Usage\r\n\r\n### 1. Set Proxy\r\n\r\nTo set a proxy for npm, Git, and environment variables, simply run:\r\n\r\n```bash\r\nproxytool set --http http://<your-proxy>:<port>\r\n```\r\n\r\nThis will:\r\n- Write the proxy settings to a PowerShell script (`.proxyenv.ps1`).\r\n- Set npm and Git proxy settings.\r\n- Provide instructions to run the script to apply the environment variables to your terminal session.\r\n\r\n#### For **IIIT Allahabad** Students:\r\nIf you're a student of **IIIT Allahabad**, the default proxy (http://172.31.2.4:8080) is already hardcoded. To set the proxy, just run:\r\n\r\n```bash\r\nproxytool set\r\n```\r\n\r\nThis command will automatically set the proxy for npm, Git, and environment variables without needing to specify the proxy URL. But you will still need to login with your credentials in the browser once.\r\n\r\n### 2. Unset Proxy\r\n\r\nTo remove the proxy settings for npm, Git, and environment variables, run:\r\n\r\n```bash\r\nproxytool unset\r\n```\r\n\r\nThis will:\r\n- Remove the proxy settings from npm and Git.\r\n- Delete the `.proxyenv.ps1` file, if it exists.\r\n\r\n### 3. Check Proxy Status\r\n\r\nTo view the current proxy settings, run:\r\n\r\n```bash\r\nproxytool status\r\n```\r\n\r\nThis will display:\r\n- npm proxy status\r\n- git proxy status\r\n- Environment proxy status\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\nTo use **ProxyTool** effectively, you may need to change your PowerShell execution policy to allow script execution. The default policy on Windows may block the running of scripts.\r\n\r\n### Setting Execution Policy\r\n\r\n1. **Check current execution policy**:\r\n\r\n   Open PowerShell and run:\r\n\r\n   ```powershell\r\n   Get-ExecutionPolicy\r\n   ```\r\n\r\n   If the result is **Restricted**, you'll need to change it.\r\n\r\n2. **Set Execution Policy**:\r\n\r\n   To allow local scripts to run, set the execution policy to **RemoteSigned** by running the following command in **Administrator** mode:\r\n\r\n   ```powershell\r\n   Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\r\n   ```\r\n\r\n   This will allow locally created scripts to run and require downloaded scripts to be signed by a trusted publisher.\r\n\r\n3. **Run the Script**:\r\n\r\n   After setting the execution policy, apply the proxy settings to your current PowerShell session by running:\r\n\r\n   ```powershell\r\n   . $env:USERPROFILE\\proxyenv.ps1\r\n   ```\r\n\r\n---\r\n\r\n## Troubleshooting\r\n\r\n### **Proxy settings not showing in npm config**:\r\n\r\nIf you notice that **npm config get proxy** returns `null` or `undefined`, it's possible that npm was not correctly configured. Ensure that the proxy URL is set by checking the `.npmrc` file, and manually updating it if necessary:\r\n\r\n```bash\r\nnpm config set proxy http://<your-proxy>:<port>\r\nnpm config set https-proxy http://<your-proxy>:<port>\r\n```\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nIf you'd like to contribute to **ProxyTool**, feel free to submit issues or pull requests. Here's how you can contribute:\r\n\r\n1. Fork the repository.\r\n2. Clone your fork to your local machine.\r\n3. Create a new branch (`git checkout -b feature-branch`).\r\n4. Make your changes.\r\n5. Commit your changes (`git commit -am 'Add feature'`).\r\n6. Push to the branch (`git push origin feature-branch`).\r\n7. Open a pull request.\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is licensed under the ISC License.\r\n\r\n---\r\n","readmeFilename":"README.md","_rev":"1-7c3622648dc7933df9b75ff8064d454c"}