{"id":36654470,"url":"https://github.com/elitah/vhost","last_synced_at":"2026-01-12T10:16:03.435Z","repository":{"id":57498944,"uuid":"209203554","full_name":"elitah/vhost","owner":"elitah","description":"vhost(write by golang)，用于虚拟服务器反向代理(按域名进行反向代理)，同时带有自动证书申请功能(Let's Encrypt提供，自动更新)，支持直接自动申请证书反向代理HTTP页面，无需任何改变升级HTTP为HTTPS","archived":false,"fork":false,"pushed_at":"2020-07-01T07:18:40.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T02:08:13.623Z","etag":null,"topics":["golang","vhost"],"latest_commit_sha":null,"homepage":"","language":"Go","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/elitah.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":"2019-09-18T02:52:51.000Z","updated_at":"2020-07-01T07:18:43.000Z","dependencies_parsed_at":"2022-09-06T16:22:48.783Z","dependency_job_id":null,"html_url":"https://github.com/elitah/vhost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elitah/vhost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitah%2Fvhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitah%2Fvhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitah%2Fvhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitah%2Fvhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elitah","download_url":"https://codeload.github.com/elitah/vhost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elitah%2Fvhost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","vhost"],"created_at":"2026-01-12T10:16:03.339Z","updated_at":"2026-01-12T10:16:03.420Z","avatar_url":"https://github.com/elitah.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"vhost\n---\nvhost(write by golang)\n\n\n\n如何使用\n---\n安装golang编译器，make工具\n\n直接执行make即可\n\n\n\n运行环境\n---\n目前仅测试Centos 7 x64\n\n\n\n配置文件\n---\n目前不支持指定配置文件路径，请可执行程序目录下创建config.json，以下为参考配置：\n\n规则如下：\n- 当用户访问`http://example.com`跳转到`https://example.com`，模式为直接HTTP 302跳转\n- 当用户访问`https://example.com`将启动TCP透传模式，将数据发送到127.0.0.1:18880，需要自行提供证书\n- 当用户访问`http://www.example.com`跳转到`https://example.com`，模式为直接HTTP 302跳转\n- 当用户访问`http://autocert.example.com`跳转到`https://autocert.example.com`，模式为直接HTTP 302跳转\n- 当用户访问`https://autocert.example.com`将启动反向代理模式，自动申请证书，将HTTP页面升级到HTTPS\n- 未指定的域名将匹配`*`规则\n\n参数配置文件：\nconfig.json\n```\n{\n  \"http\": 80,\n  \"https\": 443,\n  \"domain\": \"统计页面入口域名，此域名不会转发\",\n  \"username\": \"统计页面授权用户名\",\n  \"password\": \"统计页面授权用户密码\",\n  \"list\": {\n    \"example.com\": {\n      \"http_to\": \"https://example.com\",\n      \"https_to\": \"127.0.0.1:18880\"\n    },\n    \"www.example.com\": {\n      \"http_to\": \"https://example.com\"\n    },\n    \"autocert.example.com\": {\n      \"http_to\": \"autocert://127.0.0.1:30080\"\n    },\n    \"*\": {\n      \"http_to\": \"127.0.0.1:30080\",\n      \"https_to\": \"127.0.0.1:30443\"\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitah%2Fvhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felitah%2Fvhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitah%2Fvhost/lists"}