{"id":24803905,"url":"https://github.com/bhupesh98/proxy-automation","last_synced_at":"2025-07-30T21:04:41.758Z","repository":{"id":273357545,"uuid":"919362894","full_name":"bhupesh98/Proxy-Automation","owner":"bhupesh98","description":"Auto Proxy Toggler Based on Network Connection for Windows","archived":false,"fork":false,"pushed_at":"2025-01-27T21:36:54.000Z","size":370,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T22:27:54.798Z","etag":null,"topics":["automation","powershell","proxy"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhupesh98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T08:57:10.000Z","updated_at":"2025-01-27T21:28:01.000Z","dependencies_parsed_at":"2025-01-27T22:25:33.669Z","dependency_job_id":null,"html_url":"https://github.com/bhupesh98/Proxy-Automation","commit_stats":null,"previous_names":["bhupesh98/proxy-automation"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupesh98%2FProxy-Automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupesh98%2FProxy-Automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupesh98%2FProxy-Automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhupesh98%2FProxy-Automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhupesh98","download_url":"https://codeload.github.com/bhupesh98/Proxy-Automation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236304098,"owners_count":19127438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","powershell","proxy"],"created_at":"2025-01-30T06:13:47.974Z","updated_at":"2025-01-30T06:13:48.895Z","avatar_url":"https://github.com/bhupesh98.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proxy-Automation\n\nThis is a simple automation script to automate the process of setting up a proxy server on your machine. Currently, it only tackles the setup of a proxy server on a Windows machine. The script is written in PowerShell and is very easy to use. \n\nBased on contributions and popularity, I will be adding support for other operating systems as well.\n\n## Features\n\n\u003e [!NOTE]\n\u003e This script just toggles proxy so it doesn't require credential access. This also means you need to have the proxy settings configured in your system and the applications you want to toggle proxy for once.\n\nThis toggles proxy of following applications:\n\n1. System Proxy (through Registry)\n2. Git (through `.gitconfig`)\n3. NPM (through `.npmrc`)\n4. VS Code (through `settings.json`)\n\n... More to add based on contributions/suggestions.\n\n## Installation\n\n\u003e [!NOTE]\n\u003e ### **This script needs to be run in Administrator mode.**\n\u003e ALso, it's recommended to save your `proxyUser` and `proxyPass` in Registry for secure access. You can do this by running the following command in PowerShell:\n\u003e\n\u003e    ```powershell\n\u003e    $proxyUser = 'your-username' # Replace with your username\n\u003e    $proxyPass = 'your-password' # Replace with your password\n\u003e    Set-ItemProperty 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -Name ProxyUser -Value  $proxyUser\n\u003e    Set-ItemProperty 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -Name ProxyPass -Value  $proxyPass\n\u003e    ```\n\n1. Clone the repository to your local machine\n\n    ```bash\n    git clone https://github.com/bhupesh98/Proxy-Automation.git \u0026\u0026 cd Proxy-Automation\n    ```\n\n\u003e [!NOTE]\n\u003e You need to run these commands in PowerShell 5 or above in Administrator mode (Installation of [Powershell 7](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4) Latest release is recommended for features).\n\u003e \n\u003e **OR**\n\u003e \n\u003e You can download the executable directly from the [releases](https://github.com/bhupesh98/Proxy-Automation/releases/latest) section.Use the following powershell command to download it:\n\u003e \n\u003e ```powershell\n\u003e Invoke-WebRequest -Uri 'https://github.com/bhupesh98/Proxy-Automation/releases/download/v1.1.0/toggle-proxy.exe' -OutFile 'toggle-proxy.exe'\n\u003e ```\n\u003e Now, skip to step 4.\n\n2. **[Only for Contributors]** To make this script as an executable, you need to install the `ps2exe` module. You can install it using the following command:\n\n    ```powershell\n    Install-Module ps2exe\n    ```\n\n3. **[Only for Contributors]** To convert the script to an executable, run the following command:\n\n    ```powershell\n    Invoke-PS2EXE .\\ToggleProxy.ps1 .\\toggle-proxy.exe\n    ```\n\n4. Now, you can run the `toggle-proxy.exe` file to toggle the proxy settings on your machine. This needs to be configured in task scheduler to run when you connect to a network. Following are the steps with images to help you set things up:\n\n    - Press `Win + R` and type `taskschd.msc` to open Task Scheduler.\n\n        ![Step-1](images/1.jpg)\n    \n    - Click on `Create Task` on the right side of the window.\n\n        ![Step-2](images/2.jpg)\n\n    - Fill in the details as shown in the image below. Make sure to check the `Run with highest privileges` checkbox.\n\n        ![Step-3](images/3.jpg)\n\n    - Click on the `Triggers` tab and then click on `New`. Fill in the details as shown in the image below. Click on `OK`.\n\n        ![Step-4](images/4.jpg)\n\n    - Click on the `Actions` tab and then click on `New`. Browse the `toggle-proxy.exe` file. Click on `OK`.\n\n        ![Step-5](images/5.jpg)\n\n    - Click on the `Conditions` tab and uncheck the `Start the task only if the computer is on AC power` checkbox and check the `Start Only if the following network connection is available` checkbox. Keep the `Any connection` option selected. Click on `OK`.\n\n        ![Step-6](images/6.jpg)\n\n5. You are all set. The script will run every time you connect to a network.\n\n## Contributions\n\nContributions are welcome. Feel free to open an issue or a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupesh98%2Fproxy-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhupesh98%2Fproxy-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupesh98%2Fproxy-automation/lists"}