{"id":13712402,"url":"https://github.com/u35s/h2s","last_synced_at":"2026-01-17T18:19:18.028Z","repository":{"id":90751613,"uuid":"117233607","full_name":"u35s/h2s","owner":"u35s","description":"h2s是一个把socks5代理转换为http,https代理的小工具,同时支持socks5,http,https(终端智能翻墙)","archived":false,"fork":false,"pushed_at":"2018-05-01T08:22:31.000Z","size":107,"stargazers_count":17,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T23:32:10.330Z","etag":null,"topics":["http-proxy","http-socks5","socks5-http","socks5-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/u35s.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-01-12T11:32:17.000Z","updated_at":"2024-11-13T08:16:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6a1cd80-b8a9-403a-8c4a-3ef06d7257d3","html_url":"https://github.com/u35s/h2s","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/u35s%2Fh2s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u35s%2Fh2s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u35s%2Fh2s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u35s%2Fh2s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u35s","download_url":"https://codeload.github.com/u35s/h2s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252778987,"owners_count":21802861,"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","http-socks5","socks5-http","socks5-proxy"],"created_at":"2024-08-02T23:01:18.068Z","updated_at":"2026-01-17T18:19:18.003Z","avatar_url":"https://github.com/u35s.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/u35s/h2s.svg?branch=master)](https://travis-ci.org/u35s/h2s)\n\n\n# h2s\nh2s是一个把socks5代理转换为http,https代理的小工具,同时支持socks5,http,https,支持GFW配置智能翻墙\n\n# 安装\n```golang\ngo get -v github.com/u35s/h2s\n```\n\n# 启动\nh2s默认会读取当前文件夹下的config.json配置,也可以用-c指定配置文件\n\n```\nh2s -c example.config.json\n```\n\nh2s也可以通过命令行参数指定相关参数\n\n```\nh2s -s \"socks5.com:8388\" -P \"0.0.0.0:8088\" -b \"0.0.0.0\" -l 1080 \n```\n\n* -P 本地http,https代理地址 eg: 0.0.0.0:8088\n* -s socks5服务器地址,当此地址包含端口时会忽略-p参数\n* -p socks5服务器端口\n* -b 本地socks5代理地址 eg: 127.0.0.1\n* -l 本地socks5代理地址端口 eg: 1080\n* -m 加密方法 default: aes-256-cfb\n* -d 开启调试日志\n* -gfw 指定gfw配置文件,最新的gfw可以从[github](https://github.com/cokebar/gfwlist2dnsmasq)生成,gfw文件中指定的域名将会走代理,其余的默认不走代理\n* -fgfw 是否所有流量都走代理\n\n# 测试\n终端下执行\n\n```bash\nroot@hostname https_proxy=127.0.0.1:8088 http_proxy=127.0.0.1:8088 curl -v ip.cn\n* Rebuilt URL to: ip.cn/\n*   Trying 127.0.0.1...\n* TCP_NODELAY set\n* Connected to 127.0.0.1 (127.0.0.1) port 8088 (#0)\n\u003e GET http://ip.cn/ HTTP/1.1\n\u003e Host: ip.cn\n\u003e User-Agent: curl/7.54.0\n\u003e Accept: */*\n\u003e Proxy-Connection: Keep-Alive\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c Server: nginx/1.8.0\n\u003c Date: Fri, 12 Jan 2018 12:58:41 GMT\n\u003c Content-Type: text/html; charset=UTF-8\n\u003c Transfer-Encoding: chunked\n\u003c Connection: keep-alive\n\u003c Vary: Accept-Encoding\n\u003c X-Powered-By: PHP/5.6.32-1~dotdeb+7.1\n\u003c\n当前 IP：47.89.180.x 来自：美国 阿里云\n* Connection #0 to host 127.0.0.1 left intact\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu35s%2Fh2s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu35s%2Fh2s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu35s%2Fh2s/lists"}