{"id":20655578,"url":"https://github.com/lizhengnacl/proxy","last_synced_at":"2025-07-02T15:37:07.412Z","repository":{"id":79013177,"uuid":"135896314","full_name":"lizhengnacl/proxy","owner":"lizhengnacl","description":"方便web开发者调试，包括HTTPS","archived":false,"fork":false,"pushed_at":"2018-06-05T08:27:31.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-09T22:39:51.700Z","etag":null,"topics":["development","https","proxy","web"],"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/lizhengnacl.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":"2018-06-03T10:59:28.000Z","updated_at":"2018-06-05T08:27:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2ed62fe-5f7b-41f9-8ca3-98d66a082100","html_url":"https://github.com/lizhengnacl/proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lizhengnacl/proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhengnacl%2Fproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhengnacl%2Fproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhengnacl%2Fproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhengnacl%2Fproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lizhengnacl","download_url":"https://codeload.github.com/lizhengnacl/proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhengnacl%2Fproxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166987,"owners_count":23424289,"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":["development","https","proxy","web"],"created_at":"2024-11-16T18:11:53.370Z","updated_at":"2025-07-02T15:37:07.380Z","avatar_url":"https://github.com/lizhengnacl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 说明\n\n## 安装\n```\ngit clone https://github.com/lizhengnacl/proxy.git\n\ncd proxy \u0026\u0026 npm i\n```\n\n## 使用\n1. 依赖nginx，主要是方便调试HTTPS，请先安装nginx\n2. 确保已经开启nginx\n\n修改main.js中的配置项\n\n```\nconst config = {\n    nginxConf: {\n        path: resolve(__dirname, './nginx.conf'), // 绝对路径，本地nginx配置文件路径\n        certPath: '/usr/local/nginx/HTTPS', // 绝对路径，指向证书的路径，如果不需要调试HTTPS，可忽略\n        forceReload: false // 强制更新，断网重连，默认关闭\n    },\n    hostConfig: {\n        path: resolve(__dirname, './hosts.md') // 绝对路径，指向hosts配置文件\n    }\n};\n```\n\nhosts配置文件\n80端口可省略；https使用443端口\n\n```\n# comments\n\n127.0.0.1:8081   a.test.com\n127.0.0.1:8082   b.test.com\n# 127.0.0.1:9002   oa.neixin.cn:443\n```\n\n启动\n\n```\nsudo node main.js\n```\n\n清除浏览器DNS缓存\n\n```\nchrome://net-internals/#dns\n```\n\n## TODO\n1. HTTPS 支持，证书路径 `done`\n2. 恢复nginx config `done`\n3. 依赖检测，nginx\n3. 判断nginx是否启动","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhengnacl%2Fproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flizhengnacl%2Fproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhengnacl%2Fproxy/lists"}