{"id":22830873,"url":"https://github.com/mantoufan/yzhanproxy","last_synced_at":"2025-04-07T13:06:31.963Z","repository":{"id":107926792,"uuid":"305392262","full_name":"mantoufan/yzhanProxy","owner":"mantoufan","description":"Web reverse proxy with automatic SSL, LFU caching, command-line configuration 支持自动配置 SSL 证书、LFU 缓存、用命令行配置的 Web 反向代理服务器","archived":false,"fork":false,"pushed_at":"2023-05-30T18:41:30.000Z","size":27802,"stargazers_count":288,"open_issues_count":0,"forks_count":50,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T11:04:51.379Z","etag":null,"topics":["golang","lfu-cache","reverse-proxy","webserver"],"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/mantoufan.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":"2020-10-19T13:25:14.000Z","updated_at":"2025-01-17T16:07:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"d90b905e-6f87-4c49-9781-9c4c5779f002","html_url":"https://github.com/mantoufan/yzhanProxy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantoufan%2FyzhanProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mantoufan","download_url":"https://codeload.github.com/mantoufan/yzhanProxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657277,"owners_count":20974344,"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":["golang","lfu-cache","reverse-proxy","webserver"],"created_at":"2024-12-12T20:15:46.922Z","updated_at":"2025-04-07T13:06:31.939Z","avatar_url":"https://github.com/mantoufan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yzhanProxy\nWeb reverse proxy with automatic SSL, LFU caching, command-line configuration  \n支持自动配置 SSL 证书、LFU 缓存、用命令行配置的 Web 反向代理服务器  \n## Usage\n\u003e Options:  \n  -s, --src=    Source URL List Required  \n  -d, --dst=    Destination URL List Required  \n  -o, --opt=    Option List: redirect=\u003c30x\u003e\u0026cache_ext=\u003cjpg|png|...\u003e\u0026cache_max_age=\u003c1|2|...\u003e  \n  -g, --global= Global Config: cert_dir=\u003c./cert\u003e\u0026cache_dir=\u003c./cache\u003e\u0026cache_max_size=\u003c100\u003e  \nHelp Options:  \n  -h, --help  Show this help message\n## Example  \n```shell\n# sudo yzhanproxy-{platform}-amd64 \\\nsudo go run main.go \\\n-s http://localhost,https://localhost,https://x.com:81 \\\n-d https://localhost,https://www.google.com,https://m.baidu.com \\\n-o \"redirect=302,cache_ext=ico|jpg|png|webp\u0026cache_max_age=60|3600\" \\\n-g \"cert_dir=./cert\u0026cache_dir=./cache\u0026cache_max_size=100\"\n```\n### Meaning of Parameters\nRedirect:  \nhttp://localhost — **Redirect**: 302 —\u003e https://localhost  \nReverse Proxy:  \nhttps://localhost — **Localhost**: Self Signed Cert. **Cache**: ico - 60s, jpg|png|webp - 3600s —\u003e https://www.google.com   \nhttps://x.com:81  — **Domain**: Auto Get/Renew Cert. **No Cache** —\u003e https://m.baidu.com  \nGlobal Config with default value:  \ncert_dir: `./cert`  \ncache_dir: `./cache`  \ncache_max_size: `100 MB`, **LFU** used to clean up least used files when exceeding max size\n\n### Screenshot\n#### Reverse proxy Google using your own domain\n![reverseproxy.png](https://s2.loli.net/2023/05/31/qQfLncrslBIPz6D.png)\n#### Console output\n![console.png](https://s2.loli.net/2023/05/31/kI9pODTBsPMucFv.png)\n## Development\n### Build\n```shell\n# Linux\n./scripts/build.sh [name | default: yzhanproxy]\n# Windows\n./scripts/build.bat [name | default: yzhanproxy]\n```\n### Unit Test\n```shell\ngo test ./...\n```\n  \n## Thanks\n- ChatGPT: Assisting in coding and unit testing\n- [go-flags](https://github.com/jessevdk/go-flags)\n\n## Migration Notice\nThis repo used to be [mtfBetter](https://github.com/mantoufan/mtfCOM/tree/master/php/mtfBetter) (moved to [mtfCOM](https://github.com/mantoufan/mtfCOM)), now it has be refactored using *golang*.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantoufan%2Fyzhanproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmantoufan%2Fyzhanproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantoufan%2Fyzhanproxy/lists"}