{"id":21513297,"url":"https://github.com/cn-tower/proxy-cmd","last_synced_at":"2025-04-09T18:53:22.901Z","repository":{"id":246636459,"uuid":"821675536","full_name":"CN-Tower/proxy-cmd","owner":"CN-Tower","description":"Toggle proxy envrionments (HTTP_PROXY and HTTPS_PROXY) . 通过命令设置、切换和移除代理环境变量 ","archived":false,"fork":false,"pushed_at":"2024-12-31T02:32:05.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T00:37:17.460Z","etag":null,"topics":["http-proxy","https-proxy","proxy-cli","proxy-cmd","proxy-env"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CN-Tower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-29T05:55:37.000Z","updated_at":"2024-12-31T02:32:09.000Z","dependencies_parsed_at":"2024-07-05T14:20:41.681Z","dependency_job_id":"2c55f8be-48ca-40f8-9805-fe08ac9be88f","html_url":"https://github.com/CN-Tower/proxy-cmd","commit_stats":null,"previous_names":["cn-tower/proxy-cmd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CN-Tower%2Fproxy-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CN-Tower%2Fproxy-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CN-Tower%2Fproxy-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CN-Tower%2Fproxy-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CN-Tower","download_url":"https://codeload.github.com/CN-Tower/proxy-cmd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248093512,"owners_count":21046695,"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":["http-proxy","https-proxy","proxy-cli","proxy-cmd","proxy-env"],"created_at":"2024-11-23T22:56:39.294Z","updated_at":"2025-04-09T18:53:22.893Z","avatar_url":"https://github.com/CN-Tower.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PROXY-CMD\n\nToggle proxy environments (HTTP_PROXY and HTTPS_PROXY) in command line.\n\n[![npm](https://img.shields.io/npm/v/proxy-cmd.svg)](https://www.npmjs.com/package/proxy-cmd)\n\n## Install\n\n```bash\nnpm i -g proxy-cmd\n```\n\n## How to use\n\n### Windows\n\nPress `Win + R`, input \"cmd\", then press `Ctrl + Shift + Enter`, open cmd as administrator\n\n```bash\n# Init proxy\nproxy-cmd init 'http://127.0.0.1:7890'\n\n# Show proxy target url\nproxy-cmd url\n\n# Change proxy target url\nproxy-cmd url 'http://127.0.0.1:8234'\n\n# Show NO_PROXY config\nproxy-cmd np\n\n# Change NO_PROXY config\nproxy-cmd np 'localhost,127.0.0.1'\n\n# Delete NO_PROXY config\nproxy-cmd np del\n\n# Set global proxy environments, needs administrator privileges\n# Needs restart the terminal after running this command\n# HTTP_PROXY=http://127.0.0.1:8234\n# HTTPS_PROXY=http://127.0.0.1:8234\nproxy-cmd set\n\n# Del global proxy environments, needs administrator privileges\n# Needs restart the terminal after running this command\nproxy-cmd del\n\n# Set current process proxy environments\n# HTTP_PROXY=http://127.0.0.1:8234\n# HTTPS_PROXY=http://127.0.0.1:8234\nproxy-on\n\n# Del current process proxy environments\nproxy-off\n```\n\n### MacOS or Linux\n\nRun the following commands in terminal\n\n```bash\n# Init proxy\nsudo proxy-cmd init 'http://127.0.0.1:7890'\n\n# Enable proxy-cmd alias\nsudo source ~/.bashrc\n# MacOs only\nsudo source ~/.zshrc\n\n# Show proxy target url\nsudo proxy-cmd url\n\n# Change proxy target url\nsudo proxy-cmd url 'http://127.0.0.1:8234'\n\n# Show NO_PROXY config\nsudo proxy-cmd np\n\n# Change NO_PROXY config\nsudo proxy-cmd np 'localhost,127.0.0.1'\n\n# Delete NO_PROXY config\nsudo proxy-cmd np del\n\n# Set global proxy environments, needs administrator privileges\n# Needs restart the terminal after running this command\n# HTTP_PROXY=http://127.0.0.1:8234\n# HTTPS_PROXY=http://127.0.0.1:8234\nsudo proxy-cmd set\n\n# Del global proxy environments, needs administrator privileges\n# Needs restart the terminal after running this command\nsudo proxy-cmd del\n\n# Set current process proxy environments, should source .zshrc and .bashrc first\n# HTTP_PROXY=http://127.0.0.1:8234\n# HTTPS_PROXY=http://127.0.0.1:8234\nproxy-on\n\n# Del current process proxy environments, should source .zshrc and .bashrc first\nproxy-off\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcn-tower%2Fproxy-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcn-tower%2Fproxy-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcn-tower%2Fproxy-cmd/lists"}