{"id":18904704,"url":"https://github.com/skunight/static-web-proxy","last_synced_at":"2025-04-15T03:53:36.800Z","repository":{"id":29239989,"uuid":"118728379","full_name":"skunight/static-web-proxy","owner":"skunight","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-22T08:05:45.000Z","size":515,"stargazers_count":1,"open_issues_count":11,"forks_count":16,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T03:53:33.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/skunight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-24T07:21:00.000Z","updated_at":"2023-05-22T08:05:50.000Z","dependencies_parsed_at":"2023-01-14T14:27:46.400Z","dependency_job_id":null,"html_url":"https://github.com/skunight/static-web-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunight%2Fstatic-web-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunight%2Fstatic-web-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunight%2Fstatic-web-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunight%2Fstatic-web-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skunight","download_url":"https://codeload.github.com/skunight/static-web-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003955,"owners_count":21196794,"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":[],"created_at":"2024-11-08T09:09:13.370Z","updated_at":"2025-04-15T03:53:36.770Z","avatar_url":"https://github.com/skunight.png","language":"JavaScript","readme":"## static web proxy\n静态网站代理转发容器\n\n### 安装\n\n```shell\nnpm i static-web-proxy --save\n```\n\n### 使用\n\n```javascript\nconst Proxy = require('static-web-proxy')\nconst proxy = new Proxy({\n  proxy: [\n    {                                   //代理\n      host: 'localhost',                //代理HOST\n      scheme: 'http',                   //协议(可选，默认http)\n      port: 80,                         //代理端口\n      targetPath:'/',                   //代理根路径\n      path: '/apin',                    //原目录(会代理到代理服务的'/'目录)\n      auth: (req, res) =\u003e {},           //签名方法(可选)\n      heartBeat: 5000                   //心跳检测 默认不开启\n    }\n  ],\n  web: {\n    dir: path.join(__dirname, '/dist'), //静态网站目录\n    index: 'index.html'                 //初始页面文件\n  },\n  bind:{                                //启动绑定\n    host: '0.0.0.0',\n    port: 8080\n  },\n  compression: true,                    // gzip默认为true\n  redirect: {                           //重定向\n    '/a/b': {\n      target: '/c/d',\n      query: {\n        'name': 'bbbb'\n      }\n    }\n  }\n})\nproxy.start()\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskunight%2Fstatic-web-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskunight%2Fstatic-web-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskunight%2Fstatic-web-proxy/lists"}