[{"data":1,"prerenderedAt":1726},["ShallowReactive",2],{"post-zh-https-proxy-stealth-forward-proxy":3},{"id":4,"title":5,"body":6,"cover":1717,"date":1718,"description":1719,"extension":1720,"meta":1721,"navigation":966,"path":1722,"seo":1723,"stem":1724,"__hash__":1725},"posts/posts/https-proxy-stealth-forward-proxy.md","https_proxy：用 Rust 实现的隐身 HTTPS 正向代理",{"type":7,"value":8,"toc":1693},"minimark",[9,13,23,32,45,48,51,335,340,348,465,475,479,482,504,507,709,712,825,836,840,851,855,858,875,887,891,894,897,900,911,914,917,922,1029,1034,1096,1099,1102,1105,1118,1125,1271,1274,1376,1379,1415,1418,1421,1437,1440,1454,1457,1460,1523,1526,1529,1532,1535,1552,1556,1648,1651,1654,1657,1690],[10,11,12],"h2",{"id":12},"为什么需要隐身代理",[14,15,16,17,22],"p",{},"在",[18,19,21],"a",{"href":20},"/zh/blog/caddy-tls-http-proxy-with-acme","上一篇文章","中，我们介绍了用 Caddy + acme.sh 搭建 HTTPS 正向代理的方案。那套方案已经足够实用，但仍然依赖多个组件的拼装：Caddy 本体、forwardproxy 插件的特殊分支、acme.sh 的 cron 续证。任何一个环节出问题，都可能导致代理不可用。",[14,24,25,31],{},[18,26,30],{"href":27,"rel":28},"https://github.com/madeye/https_proxy",[29],"nofollow","https_proxy"," 是一个用 Rust 编写的单二进制 HTTPS 正向代理，把证书签发、TLS 终结、代理转发、隐身伪装全部内聚到一个不到 7 MB 的可执行文件里。它的核心思路很简单：",[33,34,35,39,42],"ul",{},[36,37,38],"li",{},"对外看起来就是一台普通的 nginx 服务器",[36,40,41],{},"只有持有正确凭证的客户端才能使用代理功能",[36,43,44],{},"证书由 Let's Encrypt 自动签发和续期，无需额外工具",[10,46,47],{"id":47},"架构与工作原理",[14,49,50],{},"整个请求处理流程如下图所示：",[52,53,57,58,57,105,57,57,109,57,119,57,57,127,57,134,57,141,57,147,57,57,152,57,157,57,163,57,167,57,57,171,57,176,57,182,57,186,57,57,190,57,195,57,202,57,207,57,57,212,57,220,57,226,57,57,232,57,236,57,240,57,57,244,57,248,57,57,253,57,261,57,266,57,271,57,57,278,57,287,57,294,57,298,57,57,303,57,306,57,57,313,57,318,57,325,57,330],"svg",{"viewBox":54,"xmlns":55,"style":56},"0 0 820 370","http://www.w3.org/2000/svg","max-width:820px;width:100%;height:auto;margin:1.5em auto;display:block","\n  ",[59,60,61,62,61,75,61,81,61,87,61,93,61,99,57],"defs",{},"\n    ",[63,64,70],"marker",{"id":65,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah","8","6","3","auto",[71,72],"path",{"d":73,"fill":74},"M0,0 L8,3 L0,6Z","#475569",[63,76,78],{"id":77,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah-red",[71,79],{"d":73,"fill":80},"#dc2626",[63,82,84],{"id":83,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah-green",[71,85],{"d":73,"fill":86},"#16a34a",[63,88,90],{"id":89,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah-d",[71,91],{"d":73,"fill":92},"#94a3b8",[63,94,96],{"id":95,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah-red-d",[71,97],{"d":73,"fill":98},"#f87171",[63,100,102],{"id":101,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"ah-green-d",[71,103],{"d":73,"fill":104},"#4ade80",[106,107,108],"style",{},"\n    text{font-family:system-ui,-apple-system,sans-serif;fill:#1e293b}\n    .box{rx:8;ry:8;stroke-width:2}\n    .label{font-size:14px;text-anchor:middle;dominant-baseline:central;font-weight:600}\n    .sublabel{font-size:11px;text-anchor:middle;dominant-baseline:central;fill:#64748b}\n    .edge-label{font-size:11px;text-anchor:middle;fill:#64748b}\n    .reject-label{font-size:11px;text-anchor:middle;fill:#dc2626}\n    .c-blue{fill:#1d4ed8} .c-yellow{fill:#a16207} .c-purple{fill:#7e22ce}\n    .c-green{fill:#15803d} .c-red{fill:#dc2626} .c-red-sub{fill:#ef4444}\n    .c-green-edge{fill:#16a34a}\n    .line-main{stroke:#475569} .line-red{stroke:#dc2626} .line-green{stroke:#16a34a}\n    .box-gray{fill:#f1f5f9;stroke:#94a3b8} .box-blue{fill:#eff6ff;stroke:#3b82f6}\n    .box-yellow{fill:#fefce8;stroke:#ca8a04} .box-purple{fill:#faf5ff;stroke:#9333ea}\n    .box-green{fill:#f0fdf4;stroke:#16a34a} .box-red{fill:#fef2f2;stroke:#dc2626}\n    [data-theme=\"dark\"] text{fill:#e2e8f0}\n    [data-theme=\"dark\"] .sublabel{fill:#94a3b8}\n    [data-theme=\"dark\"] .edge-label{fill:#94a3b8}\n    [data-theme=\"dark\"] .reject-label{fill:#f87171}\n    [data-theme=\"dark\"] .c-blue{fill:#60a5fa} [data-theme=\"dark\"] .c-yellow{fill:#fbbf24}\n    [data-theme=\"dark\"] .c-purple{fill:#c084fc} [data-theme=\"dark\"] .c-green{fill:#4ade80}\n    [data-theme=\"dark\"] .c-red{fill:#f87171} [data-theme=\"dark\"] .c-red-sub{fill:#f87171}\n    [data-theme=\"dark\"] .c-green-edge{fill:#4ade80}\n    [data-theme=\"dark\"] .line-main{stroke:#94a3b8}\n    [data-theme=\"dark\"] .line-red{stroke:#f87171}\n    [data-theme=\"dark\"] .line-green{stroke:#4ade80}\n    [data-theme=\"dark\"] .box-gray{fill:#1e293b;stroke:#475569}\n    [data-theme=\"dark\"] .box-blue{fill:#1e3a5f;stroke:#3b82f6}\n    [data-theme=\"dark\"] .box-yellow{fill:#422006;stroke:#ca8a04}\n    [data-theme=\"dark\"] .box-purple{fill:#2e1065;stroke:#9333ea}\n    [data-theme=\"dark\"] .box-green{fill:#052e16;stroke:#16a34a}\n    [data-theme=\"dark\"] .box-red{fill:#450a0a;stroke:#dc2626}\n  ",[110,111],"rect",{"x":112,"y":113,"width":114,"height":115,"className":116},"20","145","100","50",[117,118],"box","box-gray",[120,121,126],"text",{"x":122,"y":123,"className":124},"70","170",[125],"label","客户端",[110,128],{"x":123,"y":129,"width":130,"height":131,"className":132},"130","120","80",[117,133],"box-blue",[120,135,140],{"x":136,"y":137,"className":138},"230","158",[125,139],"c-blue","TLS 终结",[120,142,146],{"x":136,"y":143,"className":144},"180",[145],"sublabel","ACME 自动证书",[120,148,151],{"x":136,"y":149,"className":150},"195",[145],"TLS-ALPN-01",[110,153],{"x":154,"y":129,"width":130,"height":131,"className":155},"340",[117,156],"box-yellow",[120,158,162],{"x":159,"y":137,"className":160},"400",[125,161],"c-yellow","隐身检测",[120,164,166],{"x":159,"y":143,"className":165},[145],"是否为代理请求?",[120,168,170],{"x":159,"y":149,"className":169},[145],"HTTP/1.1 & HTTP/2",[110,172],{"x":173,"y":129,"width":130,"height":131,"className":174},"510",[117,175],"box-purple",[120,177,181],{"x":178,"y":137,"className":179},"570",[125,180],"c-purple","认证检查",[120,183,185],{"x":178,"y":143,"className":184},[145],"Basic Auth",[120,187,189],{"x":178,"y":149,"className":188},[145],"多用户凭证",[110,191],{"x":192,"y":129,"width":130,"height":131,"className":193},"680",[117,194],"box-green",[120,196,201],{"x":197,"y":198,"className":199},"740","153",[125,200],"c-green","代理转发",[120,203,206],{"x":197,"y":204,"className":205},"177",[145],"CONNECT 隧道",[120,208,211],{"x":197,"y":209,"className":210},"192",[145],"HTTP 转发",[110,213],{"x":214,"y":215,"width":216,"height":217,"className":218},"345","280","110","55",[117,219],"box-red",[120,221,225],{"x":159,"y":222,"className":223},"300",[125,224],"c-red","伪装 404",[120,227,231],{"x":159,"y":228,"className":229},"318",[145,230],"c-red-sub","nginx 风格页面",[110,233],{"x":234,"y":215,"width":216,"height":217,"className":235},"515",[117,219],[120,237,239],{"x":178,"y":222,"className":238},[125,224],"407 认证",[120,241,243],{"x":178,"y":228,"className":242},[145,230],"要求提供凭证",[110,245],{"x":246,"y":215,"width":131,"height":217,"className":247},"700",[117,118],[120,249,252],{"x":197,"y":250,"className":251},"307",[125],"目标",[254,255],"line",{"x1":130,"y1":123,"x2":256,"y2":123,"className":257,"strokeWidth":259,"markerEnd":260},"165",[258],"line-main","2","url(#ah)",[254,262],{"x1":263,"y1":123,"x2":264,"y2":123,"className":265,"strokeWidth":259,"markerEnd":260},"290","335",[258],[254,267],{"x1":268,"y1":123,"x2":269,"y2":123,"className":270,"strokeWidth":259,"markerEnd":260},"460","505",[258],[254,272],{"x1":273,"y1":123,"x2":274,"y2":123,"className":275,"strokeWidth":259,"markerEnd":277},"630","675",[276],"line-green","url(#ah-green)",[254,279],{"x1":159,"y1":280,"x2":159,"y2":281,"className":282,"strokeWidth":284,"strokeDashArray":285,"markerEnd":286},"210","275",[283],"line-red","1.5",[67,68],"url(#ah-red)",[120,288,293],{"x":289,"y":290,"className":291},"428","245",[292],"reject-label","非代理",[254,295],{"x1":178,"y1":280,"x2":178,"y2":281,"className":296,"strokeWidth":284,"strokeDashArray":297,"markerEnd":286},[283],[67,68],[120,299,302],{"x":300,"y":290,"className":301},"598",[292],"认证失败",[254,304],{"x1":197,"y1":280,"x2":197,"y2":281,"className":305,"strokeWidth":284,"markerEnd":277},[276],[120,307,312],{"x":308,"y":290,"className":309},"768",[310,311],"edge-label","c-green-edge","转发",[254,314],{"x1":315,"y1":214,"x2":316,"y2":214,"className":317,"strokeWidth":259,"markerEnd":260},"30","60",[258],[120,319,324],{"x":320,"y":214,"className":321,"textAnchor":322,"dominantBaseline":323},"68",[145],"start","central","正常流程",[254,326],{"x1":327,"y1":214,"x2":143,"y2":214,"className":328,"strokeWidth":284,"strokeDashArray":329,"markerEnd":286},"150",[283],[67,68],[120,331,334],{"x":332,"y":214,"className":333,"textAnchor":322,"dominantBaseline":323},"188",[145,292],"拒绝/伪装",[336,337,339],"h3",{"id":338},"_1-tls-终结与自动证书","1. TLS 终结与自动证书",[14,341,342,343,347],{},"https_proxy 使用 ",[344,345,346],"code",{},"tokio-rustls-acme"," 库实现 ACME 协议的 TLS-ALPN-01 验证。与常见的 HTTP-01 验证不同，TLS-ALPN-01 只需要 443 端口，不需要额外开放 80 端口。证书的签发和续期完全自动，由后台异步任务驱动：",[349,350,355],"pre",{"className":351,"code":352,"language":353,"meta":354,"style":354},"language-rust shiki shiki-themes github-light github-dark","let acme_config = AcmeConfig::new([domain])\n    .contact_push(format!(\"mailto:{}\", config.acme.email))\n    .cache(DirCache::new(cache_dir))\n    .directory_lets_encrypt(!config.acme.staging);\n","rust","",[344,356,357,385,420,440],{"__ignoreMap":354},[358,359,361,365,369,372,376,379,382],"span",{"class":254,"line":360},1,[358,362,364],{"class":363},"szBVR","let",[358,366,368],{"class":367},"sVt8B"," acme_config ",[358,370,371],{"class":363},"=",[358,373,375],{"class":374},"sScJk"," AcmeConfig",[358,377,378],{"class":363},"::",[358,380,381],{"class":374},"new",[358,383,384],{"class":367},"([domain])\n",[358,386,388,391,394,397,400,402,406,409,412,415,417],{"class":254,"line":387},2,[358,389,390],{"class":363},"    .",[358,392,393],{"class":374},"contact_push",[358,395,396],{"class":367},"(",[358,398,399],{"class":374},"format!",[358,401,396],{"class":367},[358,403,405],{"class":404},"sZZnC","\"mailto:{}\"",[358,407,408],{"class":367},", config",[358,410,411],{"class":363},".",[358,413,414],{"class":367},"acme",[358,416,411],{"class":363},[358,418,419],{"class":367},"email))\n",[358,421,423,425,428,430,433,435,437],{"class":254,"line":422},3,[358,424,390],{"class":363},[358,426,427],{"class":374},"cache",[358,429,396],{"class":367},[358,431,432],{"class":374},"DirCache",[358,434,378],{"class":363},[358,436,381],{"class":374},[358,438,439],{"class":367},"(cache_dir))\n",[358,441,443,445,448,450,453,456,458,460,462],{"class":254,"line":442},4,[358,444,390],{"class":363},[358,446,447],{"class":374},"directory_lets_encrypt",[358,449,396],{"class":367},[358,451,452],{"class":363},"!",[358,454,455],{"class":367},"config",[358,457,411],{"class":363},[358,459,414],{"class":367},[358,461,411],{"class":363},[358,463,464],{"class":367},"staging);\n",[14,466,467,468,470,471,474],{},"TLS 配置同时支持 TLS 1.2 和 TLS 1.3，ALPN 协商支持 ",[344,469,10],{}," 和 ",[344,472,473],{},"http/1.1","，让浏览器和命令行工具都能正常连接。",[336,476,478],{"id":477},"_2-隐身层伪装成-nginx","2. 隐身层：伪装成 nginx",[14,480,481],{},"这是 https_proxy 最有趣的设计。隐身检测的逻辑非常精准：",[33,483,484,491,501],{},[36,485,486,487,490],{},"如果请求方法是 ",[344,488,489],{},"CONNECT"," → 这是代理请求",[36,492,493,494,496,497,500],{},"如果是 HTTP/2 但不是 ",[344,495,489],{}," → 一定不是代理请求（因为 HTTP/2 的 ",[344,498,499],{},":authority"," 伪头始终存在，不能用于判断）",[36,502,503],{},"如果是 HTTP/1.x 且 URI 包含 authority（绝对 URI 形式）→ 这是代理请求",[14,505,506],{},"下面的流程图展示了完整的隐身检测与认证判定逻辑：",[52,508,57,511,57,528,57,57,531,57,538,57,545,57,57,550,57,556,57,562,57,57,567,57,575,57,581,57,586,57,57,593,57,599,57,57,604,57,609,57,57,614,57,619,57,626,57,631,57,636,57,57,643,57,648,57,57,652,57,657,57,662,57,57,667,57,671,57,675,57,679,57,57,682,57,686,57,689,57,693,57,698,57,57,702],{"viewBox":509,"xmlns":55,"style":510},"0 0 660 520","max-width:660px;width:100%;height:auto;margin:1.5em auto;display:block",[59,512,61,513,61,518,61,523,57],{},[63,514,516],{"id":515,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"a2",[71,517],{"d":73,"fill":74},[63,519,521],{"id":520,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"a2r",[71,522],{"d":73,"fill":80},[63,524,526],{"id":525,"markerWidth":66,"markerHeight":67,"refX":66,"refY":68,"orient":69},"a2g",[71,527],{"d":73,"fill":86},[106,529,530],{},"\n    text{font-family:system-ui,-apple-system,sans-serif;fill:#1e293b}\n    .d{font-size:13px;text-anchor:middle;dominant-baseline:central;font-weight:600}\n    .r{font-size:13px;text-anchor:middle;dominant-baseline:central;font-weight:600}\n    .yn{font-size:12px;font-weight:700}\n    .sub2{font-size:11px;text-anchor:middle;fill:#64748b}\n    .c2-blue{fill:#1d4ed8} .c2-yellow{fill:#a16207} .c2-purple{fill:#7e22ce}\n    .c2-green{fill:#15803d} .c2-red{fill:#dc2626} .c2-red-sub{fill:#ef4444}\n    .c2-gray{fill:#475569} .yn-green{fill:#16a34a} .yn-red{fill:#dc2626}\n    .line2-main{stroke:#475569} .line2-red{stroke:#dc2626} .line2-green{stroke:#16a34a}\n    .box2-gray{fill:#f1f5f9;stroke:#94a3b8}\n    .dia-blue{fill:#eff6ff;stroke:#3b82f6}\n    .dia-yellow{fill:#fefce8;stroke:#ca8a04}\n    .dia-purple{fill:#faf5ff;stroke:#9333ea}\n    .box2-green{fill:#f0fdf4;stroke:#16a34a}\n    .box2-red{fill:#fef2f2;stroke:#dc2626}\n    .dash-green{stroke:#16a34a}\n    [data-theme=\"dark\"] text{fill:#e2e8f0}\n    [data-theme=\"dark\"] .sub2{fill:#94a3b8}\n    [data-theme=\"dark\"] .c2-blue{fill:#60a5fa} [data-theme=\"dark\"] .c2-yellow{fill:#fbbf24}\n    [data-theme=\"dark\"] .c2-purple{fill:#c084fc} [data-theme=\"dark\"] .c2-green{fill:#4ade80}\n    [data-theme=\"dark\"] .c2-red{fill:#f87171} [data-theme=\"dark\"] .c2-red-sub{fill:#f87171}\n    [data-theme=\"dark\"] .c2-gray{fill:#94a3b8}\n    [data-theme=\"dark\"] .yn-green{fill:#4ade80} [data-theme=\"dark\"] .yn-red{fill:#f87171}\n    [data-theme=\"dark\"] .line2-main{stroke:#94a3b8}\n    [data-theme=\"dark\"] .line2-red{stroke:#f87171}\n    [data-theme=\"dark\"] .line2-green{stroke:#4ade80}\n    [data-theme=\"dark\"] .box2-gray{fill:#1e293b;stroke:#475569}\n    [data-theme=\"dark\"] .dia-blue{fill:#1e3a5f;stroke:#3b82f6}\n    [data-theme=\"dark\"] .dia-yellow{fill:#422006;stroke:#ca8a04}\n    [data-theme=\"dark\"] .dia-purple{fill:#2e1065;stroke:#9333ea}\n    [data-theme=\"dark\"] .box2-green{fill:#052e16;stroke:#16a34a}\n    [data-theme=\"dark\"] .box2-red{fill:#450a0a;stroke:#dc2626}\n    [data-theme=\"dark\"] .dash-green{stroke:#4ade80}\n  ",[110,532],{"x":136,"y":533,"width":534,"height":535,"rx":112,"className":536,"strokeWidth":259},"15","200","40",[537],"box2-gray",[120,539,544],{"x":540,"y":541,"className":542},"330","35",[543],"d","收到 TLS 请求",[254,546],{"x1":540,"y1":217,"x2":540,"y2":131,"className":547,"strokeWidth":284,"markerEnd":549},[548],"line2-main","url(#a2)",[551,552],"polygon",{"points":553,"className":554,"strokeWidth":259},"330,85 460,145 330,205 200,145",[555],"dia-blue",[120,557,561],{"x":540,"y":558,"className":559},"140",[543,560],"c2-blue","方法是",[120,563,566],{"x":540,"y":564,"className":565},"157",[543,560],"CONNECT ?",[120,568,574],{"x":569,"y":570,"className":571},"475","133",[572,573],"yn","yn-green","是",[254,576],{"x1":268,"y1":113,"x2":577,"y2":113,"className":578,"strokeWidth":284,"markerEnd":580},"530",[579],"line2-green","url(#a2g)",[110,582],{"x":583,"y":130,"width":216,"height":115,"rx":66,"className":584,"strokeWidth":259},"535",[585],"box2-green",[120,587,592],{"x":588,"y":113,"className":589},"590",[590,591],"r","c2-green","代理请求",[120,594,598],{"x":214,"y":595,"className":596},"218",[572,597],"yn-red","否",[254,600],{"x1":540,"y1":601,"x2":540,"y2":602,"className":603,"strokeWidth":284,"markerEnd":549},"205","240",[548],[551,605],{"points":606,"className":607,"strokeWidth":259},"330,245 440,295 330,345 220,295",[608],"dia-yellow",[120,610,613],{"x":540,"y":263,"className":611},[543,612],"c2-yellow","HTTP/2 ?",[120,615,574],{"x":616,"y":617,"className":618},"455","283",[572,597],[254,620],{"x1":621,"y1":622,"x2":577,"y2":622,"className":623,"strokeWidth":284,"markerEnd":625},"440","295",[624],"line2-red","url(#a2r)",[110,627],{"x":583,"y":628,"width":216,"height":115,"rx":66,"className":629,"strokeWidth":259},"270",[630],"box2-red",[120,632,225],{"x":588,"y":633,"className":634},"289",[590,635],"c2-red",[120,637,642],{"x":588,"y":638,"className":639},"306",[640,641],"sub2","c2-red-sub","nginx 风格",[120,644,598],{"x":214,"y":645,"className":646},"358",[572,647],"c2-gray",[254,649],{"x1":540,"y1":214,"x2":540,"y2":650,"className":651,"strokeWidth":284,"markerEnd":549},"380",[548],[551,653],{"points":654,"className":655,"strokeWidth":259},"330,385 460,435 330,485 200,435",[656],"dia-purple",[120,658,661],{"x":540,"y":289,"className":659},[543,660],"c2-purple","URI 含",[120,663,666],{"x":540,"y":664,"className":665},"445",[543,660],"authority ?",[120,668,574],{"x":569,"y":669,"className":670},"423",[572,573],[254,672],{"x1":268,"y1":673,"x2":577,"y2":673,"className":674,"strokeWidth":284,"markerEnd":580},"435",[579],[110,676],{"x":583,"y":677,"width":216,"height":115,"rx":66,"className":678,"strokeWidth":259},"410",[585],[120,680,592],{"x":588,"y":673,"className":681},[590,591],[120,683,598],{"x":684,"y":669,"className":685},"185",[572,597],[254,687],{"x1":534,"y1":673,"x2":130,"y2":673,"className":688,"strokeWidth":284,"markerEnd":625},[624],[110,690],{"x":691,"y":677,"width":216,"height":115,"rx":66,"className":692,"strokeWidth":259},"10",[630],[120,694,225],{"x":695,"y":696,"className":697},"65","429",[590,635],[120,699,642],{"x":695,"y":700,"className":701},"446",[640,641],[254,703],{"x1":588,"y1":123,"x2":588,"y2":677,"className":704,"strokeWidth":706,"strokeDashArray":707},[705],"dash-green","1",[708,708],"4",[14,710,711],{},"不满足以上条件的所有请求，都会收到一个与 nginx 完全一致的 404 页面：",[349,713,717],{"className":714,"code":715,"language":716,"meta":354,"style":354},"language-html shiki shiki-themes github-light github-dark","\u003Chtml>\n\u003Chead>\u003Ctitle>404 Not Found\u003C/title>\u003C/head>\n\u003Cbody>\n\u003Ccenter>\u003Ch1>404 Not Found\u003C/h1>\u003C/center>\n\u003Chr>\u003Ccenter>nginx/1.24.0\u003C/center>\n\u003C/body>\n\u003C/html>\n","html",[344,718,719,730,755,764,787,806,816],{"__ignoreMap":354},[358,720,721,724,727],{"class":254,"line":360},[358,722,723],{"class":367},"\u003C",[358,725,716],{"class":726},"s9eBZ",[358,728,729],{"class":367},">\n",[358,731,732,734,737,740,743,746,748,751,753],{"class":254,"line":387},[358,733,723],{"class":367},[358,735,736],{"class":726},"head",[358,738,739],{"class":367},">\u003C",[358,741,742],{"class":726},"title",[358,744,745],{"class":367},">404 Not Found\u003C/",[358,747,742],{"class":726},[358,749,750],{"class":367},">\u003C/",[358,752,736],{"class":726},[358,754,729],{"class":367},[358,756,757,759,762],{"class":254,"line":422},[358,758,723],{"class":367},[358,760,761],{"class":726},"body",[358,763,729],{"class":367},[358,765,766,768,772,774,777,779,781,783,785],{"class":254,"line":442},[358,767,723],{"class":367},[358,769,771],{"class":770},"s7hpK","center",[358,773,739],{"class":367},[358,775,776],{"class":726},"h1",[358,778,745],{"class":367},[358,780,776],{"class":726},[358,782,750],{"class":367},[358,784,771],{"class":770},[358,786,729],{"class":367},[358,788,790,792,795,797,799,802,804],{"class":254,"line":789},5,[358,791,723],{"class":367},[358,793,794],{"class":726},"hr",[358,796,739],{"class":367},[358,798,771],{"class":770},[358,800,801],{"class":367},">nginx/1.24.0\u003C/",[358,803,771],{"class":770},[358,805,729],{"class":367},[358,807,809,812,814],{"class":254,"line":808},6,[358,810,811],{"class":367},"\u003C/",[358,813,761],{"class":726},[358,815,729],{"class":367},[358,817,819,821,823],{"class":254,"line":818},7,[358,820,811],{"class":367},[358,822,716],{"class":726},[358,824,729],{"class":367},[14,826,827,828,831,832,835],{},"响应头中的 ",[344,829,830],{},"Server"," 字段也会设置为配置文件中指定的值（默认 ",[344,833,834],{},"nginx/1.24.0","）。无论扫描器用 HTTP/1.1 还是 HTTP/2 访问，看到的都是一台普通的 nginx。返回 404 表示\"没有配置任何网站\"。",[336,837,839],{"id":838},"_3-认证层","3. 认证层",[14,841,842,843,846,847,850],{},"通过隐身检测后，请求进入认证环节。https_proxy 使用标准的 HTTP Basic Auth，支持配置多组用户名/密码。认证失败时返回 ",[344,844,845],{},"407 Proxy Authentication Required","，并携带 ",[344,848,849],{},"Proxy-Authenticate"," 头，这样 Chrome 等浏览器会弹出凭证输入框，而不是显示一个莫名其妙的错误页面。",[336,852,854],{"id":853},"_4-代理转发","4. 代理转发",[14,856,857],{},"认证通过后，根据请求类型分两条路径：",[14,859,860,863,864,867,868,870,871,874],{},[861,862,206],"strong",{},"：客户端发起 ",[344,865,866],{},"CONNECT host:port","，代理返回 ",[344,869,534],{}," 后升级连接，使用 ",[344,872,873],{},"tokio::io::copy_bidirectional"," 在客户端和目标服务器之间双向透传数据。隧道缓冲区设置为 128 KiB（是默认值的 16 倍），与 TLS record 大小匹配，减少系统调用次数。",[14,876,877,879,880,470,883,886],{},[861,878,211],{},"：对于明文 HTTP 请求，代理剥离 ",[344,881,882],{},"Proxy-Authorization",[344,884,885],{},"Proxy-Connection"," 等逐跳头后，将请求转发给上游服务器。未开启 TCP Fast Open 时使用连接池复用连接；开启时使用手动连接以支持 TFO。",[336,888,890],{"id":889},"_5-http2-支持","5. HTTP/2 支持",[14,892,893],{},"https_proxy 实现了完整的 HTTP/2 支持，包括 RFC 8441 定义的扩展 CONNECT 协议。这意味着 Chrome 等现代浏览器可以通过 HTTP/2 使用代理功能，而不需要降级到 HTTP/1.1。",[10,895,896],{"id":896},"部署指南",[336,898,899],{"id":899},"前置条件",[33,901,902,905,908],{},[36,903,904],{},"一台有公网 IP 的服务器",[36,906,907],{},"一个域名，A 记录已解析到服务器 IP",[36,909,910],{},"服务器的 443 端口可用",[336,912,913],{"id":913},"编译",[14,915,916],{},"https_proxy 使用 Rust 编写，需要 Rust 1.70+ 和 C 编译器。",[14,918,919],{},[861,920,921],{},"在 Linux 服务器上直接编译：",[349,923,927],{"className":924,"code":925,"language":926,"meta":354,"style":354},"language-bash shiki shiki-themes github-light github-dark","# 安装 Rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# 安装编译依赖（Debian/Ubuntu）\napt install build-essential cmake\n\n# 克隆并编译\ngit clone https://github.com/madeye/https_proxy.git\ncd https_proxy\ncargo build --release\n","bash",[344,928,929,935,962,968,973,987,991,996,1008,1017],{"__ignoreMap":354},[358,930,931],{"class":254,"line":360},[358,932,934],{"class":933},"sJ8bj","# 安装 Rust\n",[358,936,937,940,944,947,950,953,956,959],{"class":254,"line":387},[358,938,939],{"class":374},"curl",[358,941,943],{"class":942},"sj4cs"," --proto",[358,945,946],{"class":404}," '=https'",[358,948,949],{"class":942}," --tlsv1.2",[358,951,952],{"class":942}," -sSf",[358,954,955],{"class":404}," https://sh.rustup.rs",[358,957,958],{"class":363}," |",[358,960,961],{"class":374}," sh\n",[358,963,964],{"class":254,"line":422},[358,965,967],{"emptyLinePlaceholder":966},true,"\n",[358,969,970],{"class":254,"line":442},[358,971,972],{"class":933},"# 安装编译依赖（Debian/Ubuntu）\n",[358,974,975,978,981,984],{"class":254,"line":789},[358,976,977],{"class":374},"apt",[358,979,980],{"class":404}," install",[358,982,983],{"class":404}," build-essential",[358,985,986],{"class":404}," cmake\n",[358,988,989],{"class":254,"line":808},[358,990,967],{"emptyLinePlaceholder":966},[358,992,993],{"class":254,"line":818},[358,994,995],{"class":933},"# 克隆并编译\n",[358,997,999,1002,1005],{"class":254,"line":998},8,[358,1000,1001],{"class":374},"git",[358,1003,1004],{"class":404}," clone",[358,1006,1007],{"class":404}," https://github.com/madeye/https_proxy.git\n",[358,1009,1011,1014],{"class":254,"line":1010},9,[358,1012,1013],{"class":942},"cd",[358,1015,1016],{"class":404}," https_proxy\n",[358,1018,1020,1023,1026],{"class":254,"line":1019},10,[358,1021,1022],{"class":374},"cargo",[358,1024,1025],{"class":404}," build",[358,1027,1028],{"class":942}," --release\n",[14,1030,1031],{},[861,1032,1033],{},"在 macOS 上交叉编译 Linux 版本：",[349,1035,1037],{"className":924,"code":1036,"language":926,"meta":354,"style":354},"docker run --platform linux/amd64 --rm -v \"$(pwd)\":/src -w /src \\\n  rust:latest cargo build --release --target x86_64-unknown-linux-gnu\n",[344,1038,1039,1077],{"__ignoreMap":354},[358,1040,1041,1044,1047,1050,1053,1056,1059,1062,1065,1068,1071,1074],{"class":254,"line":360},[358,1042,1043],{"class":374},"docker",[358,1045,1046],{"class":404}," run",[358,1048,1049],{"class":942}," --platform",[358,1051,1052],{"class":404}," linux/amd64",[358,1054,1055],{"class":942}," --rm",[358,1057,1058],{"class":942}," -v",[358,1060,1061],{"class":404}," \"$(",[358,1063,1064],{"class":942},"pwd",[358,1066,1067],{"class":404},")\":/src",[358,1069,1070],{"class":942}," -w",[358,1072,1073],{"class":404}," /src",[358,1075,1076],{"class":942}," \\\n",[358,1078,1079,1082,1085,1087,1090,1093],{"class":254,"line":387},[358,1080,1081],{"class":404},"  rust:latest",[358,1083,1084],{"class":404}," cargo",[358,1086,1025],{"class":404},[358,1088,1089],{"class":942}," --release",[358,1091,1092],{"class":942}," --target",[358,1094,1095],{"class":404}," x86_64-unknown-linux-gnu\n",[14,1097,1098],{},"编译产物开启了 LTO 和 strip，最终二进制大小约 7 MB。",[336,1100,1101],{"id":1101},"配置",[14,1103,1104],{},"可以使用内置的 TUI 向导生成配置：",[349,1106,1108],{"className":924,"code":1107,"language":926,"meta":354,"style":354},"./target/release/https_proxy setup\n",[344,1109,1110],{"__ignoreMap":354},[358,1111,1112,1115],{"class":254,"line":360},[358,1113,1114],{"class":374},"./target/release/https_proxy",[358,1116,1117],{"class":404}," setup\n",[14,1119,1120,1121,1124],{},"也可以手动编辑 ",[344,1122,1123],{},"config.yaml","：",[349,1126,1130],{"className":1127,"code":1128,"language":1129,"meta":354,"style":354},"language-yaml shiki shiki-themes github-light github-dark","listen: \"0.0.0.0:443\"\ndomain: \"proxy.example.com\"\nacme:\n  email: \"admin@example.com\"\n  staging: false\n  cache_dir: \"/var/lib/https_proxy/acme\"\nusers:\n  - username: \"alice\"\n    password: \"hunter2\"\n  - username: \"bob\"\n    password: \"correct-horse-battery-staple\"\nstealth:\n  server_name: \"nginx/1.24.0\"\nfast_open: true\n","yaml",[344,1131,1132,1143,1153,1160,1170,1180,1190,1197,1210,1220,1231,1241,1249,1260],{"__ignoreMap":354},[358,1133,1134,1137,1140],{"class":254,"line":360},[358,1135,1136],{"class":726},"listen",[358,1138,1139],{"class":367},": ",[358,1141,1142],{"class":404},"\"0.0.0.0:443\"\n",[358,1144,1145,1148,1150],{"class":254,"line":387},[358,1146,1147],{"class":726},"domain",[358,1149,1139],{"class":367},[358,1151,1152],{"class":404},"\"proxy.example.com\"\n",[358,1154,1155,1157],{"class":254,"line":422},[358,1156,414],{"class":726},[358,1158,1159],{"class":367},":\n",[358,1161,1162,1165,1167],{"class":254,"line":442},[358,1163,1164],{"class":726},"  email",[358,1166,1139],{"class":367},[358,1168,1169],{"class":404},"\"admin@example.com\"\n",[358,1171,1172,1175,1177],{"class":254,"line":789},[358,1173,1174],{"class":726},"  staging",[358,1176,1139],{"class":367},[358,1178,1179],{"class":942},"false\n",[358,1181,1182,1185,1187],{"class":254,"line":808},[358,1183,1184],{"class":726},"  cache_dir",[358,1186,1139],{"class":367},[358,1188,1189],{"class":404},"\"/var/lib/https_proxy/acme\"\n",[358,1191,1192,1195],{"class":254,"line":818},[358,1193,1194],{"class":726},"users",[358,1196,1159],{"class":367},[358,1198,1199,1202,1205,1207],{"class":254,"line":998},[358,1200,1201],{"class":367},"  - ",[358,1203,1204],{"class":726},"username",[358,1206,1139],{"class":367},[358,1208,1209],{"class":404},"\"alice\"\n",[358,1211,1212,1215,1217],{"class":254,"line":1010},[358,1213,1214],{"class":726},"    password",[358,1216,1139],{"class":367},[358,1218,1219],{"class":404},"\"hunter2\"\n",[358,1221,1222,1224,1226,1228],{"class":254,"line":1019},[358,1223,1201],{"class":367},[358,1225,1204],{"class":726},[358,1227,1139],{"class":367},[358,1229,1230],{"class":404},"\"bob\"\n",[358,1232,1234,1236,1238],{"class":254,"line":1233},11,[358,1235,1214],{"class":726},[358,1237,1139],{"class":367},[358,1239,1240],{"class":404},"\"correct-horse-battery-staple\"\n",[358,1242,1244,1247],{"class":254,"line":1243},12,[358,1245,1246],{"class":726},"stealth",[358,1248,1159],{"class":367},[358,1250,1252,1255,1257],{"class":254,"line":1251},13,[358,1253,1254],{"class":726},"  server_name",[358,1256,1139],{"class":367},[358,1258,1259],{"class":404},"\"nginx/1.24.0\"\n",[358,1261,1263,1266,1268],{"class":254,"line":1262},14,[358,1264,1265],{"class":726},"fast_open",[358,1267,1139],{"class":367},[358,1269,1270],{"class":942},"true\n",[14,1272,1273],{},"配置项说明：",[1275,1276,1277,1290],"table",{},[1278,1279,1280],"thead",{},[1281,1282,1283,1287],"tr",{},[1284,1285,1286],"th",{},"字段",[1284,1288,1289],{},"说明",[1291,1292,1293,1306,1315,1325,1335,1345,1354,1367],"tbody",{},[1281,1294,1295,1300],{},[1296,1297,1298],"td",{},[344,1299,1136],{},[1296,1301,1302,1303],{},"监听地址，默认 ",[344,1304,1305],{},"0.0.0.0:443",[1281,1307,1308,1312],{},[1296,1309,1310],{},[344,1311,1147],{},[1296,1313,1314],{},"ACME 证书对应的域名",[1281,1316,1317,1322],{},[1296,1318,1319],{},[344,1320,1321],{},"acme.email",[1296,1323,1324],{},"Let's Encrypt 联系邮箱",[1281,1326,1327,1332],{},[1296,1328,1329],{},[344,1330,1331],{},"acme.staging",[1296,1333,1334],{},"是否使用 staging 环境（测试时建议开启，避免触发速率限制）",[1281,1336,1337,1342],{},[1296,1338,1339],{},[344,1340,1341],{},"acme.cache_dir",[1296,1343,1344],{},"证书缓存目录",[1281,1346,1347,1351],{},[1296,1348,1349],{},[344,1350,1194],{},[1296,1352,1353],{},"授权用户列表，支持多组凭证",[1281,1355,1356,1361],{},[1296,1357,1358],{},[344,1359,1360],{},"stealth.server_name",[1296,1362,1363,1364,1366],{},"伪装的 ",[344,1365,830],{}," 响应头",[1281,1368,1369,1373],{},[1296,1370,1371],{},[344,1372,1265],{},[1296,1374,1375],{},"启用 TCP Fast Open，减少连接建立延迟",[336,1377,1378],{"id":1378},"启动",[349,1380,1382],{"className":924,"code":1381,"language":926,"meta":354,"style":354},"# 直接运行\n./target/release/https_proxy run --config config.yaml\n\n# 或使用默认 config.yaml\n./target/release/https_proxy\n",[344,1383,1384,1389,1401,1405,1410],{"__ignoreMap":354},[358,1385,1386],{"class":254,"line":360},[358,1387,1388],{"class":933},"# 直接运行\n",[358,1390,1391,1393,1395,1398],{"class":254,"line":387},[358,1392,1114],{"class":374},[358,1394,1046],{"class":404},[358,1396,1397],{"class":942}," --config",[358,1399,1400],{"class":404}," config.yaml\n",[358,1402,1403],{"class":254,"line":422},[358,1404,967],{"emptyLinePlaceholder":966},[358,1406,1407],{"class":254,"line":442},[358,1408,1409],{"class":933},"# 或使用默认 config.yaml\n",[358,1411,1412],{"class":254,"line":789},[358,1413,1414],{"class":374},"./target/release/https_proxy\n",[336,1416,1417],{"id":1417},"安装为系统服务",[14,1419,1420],{},"在 Linux 上可以一键安装为 systemd 服务：",[349,1422,1424],{"className":924,"code":1423,"language":926,"meta":354,"style":354},"sudo ./target/release/https_proxy install\n",[344,1425,1426],{"__ignoreMap":354},[358,1427,1428,1431,1434],{"class":254,"line":360},[358,1429,1430],{"class":374},"sudo",[358,1432,1433],{"class":404}," ./target/release/https_proxy",[358,1435,1436],{"class":404}," install\n",[14,1438,1439],{},"卸载：",[349,1441,1443],{"className":924,"code":1442,"language":926,"meta":354,"style":354},"sudo ./target/release/https_proxy uninstall\n",[344,1444,1445],{"__ignoreMap":354},[358,1446,1447,1449,1451],{"class":254,"line":360},[358,1448,1430],{"class":374},[358,1450,1433],{"class":404},[358,1452,1453],{"class":404}," uninstall\n",[10,1455,1456],{"id":1456},"客户端使用",[336,1458,1459],{"id":1459},"命令行",[349,1461,1463],{"className":924,"code":1462,"language":926,"meta":354,"style":354},"# 通过代理访问目标网站\ncurl --proxy https://alice:hunter2@proxy.example.com:443 https://httpbin.org/ip\n\n# 设置环境变量，所有命令自动走代理\nexport https_proxy=https://alice:hunter2@proxy.example.com:443\nexport http_proxy=https://alice:hunter2@proxy.example.com:443\ncurl https://www.google.com\n",[344,1464,1465,1470,1483,1487,1492,1505,1516],{"__ignoreMap":354},[358,1466,1467],{"class":254,"line":360},[358,1468,1469],{"class":933},"# 通过代理访问目标网站\n",[358,1471,1472,1474,1477,1480],{"class":254,"line":387},[358,1473,939],{"class":374},[358,1475,1476],{"class":942}," --proxy",[358,1478,1479],{"class":404}," https://alice:hunter2@proxy.example.com:443",[358,1481,1482],{"class":404}," https://httpbin.org/ip\n",[358,1484,1485],{"class":254,"line":422},[358,1486,967],{"emptyLinePlaceholder":966},[358,1488,1489],{"class":254,"line":442},[358,1490,1491],{"class":933},"# 设置环境变量，所有命令自动走代理\n",[358,1493,1494,1497,1500,1502],{"class":254,"line":789},[358,1495,1496],{"class":363},"export",[358,1498,1499],{"class":367}," https_proxy",[358,1501,371],{"class":363},[358,1503,1504],{"class":367},"https://alice:hunter2@proxy.example.com:443\n",[358,1506,1507,1509,1512,1514],{"class":254,"line":808},[358,1508,1496],{"class":363},[358,1510,1511],{"class":367}," http_proxy",[358,1513,371],{"class":363},[358,1515,1504],{"class":367},[358,1517,1518,1520],{"class":254,"line":818},[358,1519,939],{"class":374},[358,1521,1522],{"class":404}," https://www.google.com\n",[336,1524,1525],{"id":1525},"浏览器",[14,1527,1528],{},"Chrome、Firefox 等浏览器支持通过系统代理设置配置 HTTPS 代理，也可以使用 SwitchyOmega 等扩展。协议选择 HTTPS，填入域名、端口（443）、用户名和密码。首次访问时浏览器会弹出认证框。",[336,1530,1531],{"id":1531},"验证隐身效果",[14,1533,1534],{},"直接访问代理域名，应该看到 nginx 风格的 404 页面：",[349,1536,1538],{"className":924,"code":1537,"language":926,"meta":354,"style":354},"curl https://proxy.example.com/\n# 返回: 404 Not Found (Server: nginx/1.24.0)\n",[344,1539,1540,1547],{"__ignoreMap":354},[358,1541,1542,1544],{"class":254,"line":360},[358,1543,939],{"class":374},[358,1545,1546],{"class":404}," https://proxy.example.com/\n",[358,1548,1549],{"class":254,"line":387},[358,1550,1551],{"class":933},"# 返回: 404 Not Found (Server: nginx/1.24.0)\n",[10,1553,1555],{"id":1554},"与-caddy-方案的对比","与 Caddy 方案的对比",[1275,1557,1558,1569],{},[1278,1559,1560],{},[1281,1561,1562,1564,1566],{},[1284,1563],{},[1284,1565,30],{},[1284,1567,1568],{},"Caddy + forwardproxy",[1291,1570,1571,1582,1593,1604,1615,1626,1637],{},[1281,1572,1573,1576,1579],{},[1296,1574,1575],{},"组件数量",[1296,1577,1578],{},"单二进制",[1296,1580,1581],{},"Caddy + xcaddy 编译 + acme.sh",[1281,1583,1584,1587,1590],{},[1296,1585,1586],{},"证书管理",[1296,1588,1589],{},"内置 ACME（TLS-ALPN-01）",[1296,1591,1592],{},"依赖外部 acme.sh",[1281,1594,1595,1598,1601],{},[1296,1596,1597],{},"HTTP/2 代理",[1296,1599,1600],{},"支持（RFC 8441 扩展 CONNECT）",[1296,1602,1603],{},"支持",[1281,1605,1606,1609,1612],{},[1296,1607,1608],{},"隐身伪装",[1296,1610,1611],{},"内置 nginx 404 伪装",[1296,1613,1614],{},"通过 probe_resistance + file_server",[1281,1616,1617,1620,1623],{},[1296,1618,1619],{},"TCP Fast Open",[1296,1621,1622],{},"内置支持",[1296,1624,1625],{},"不支持",[1281,1627,1628,1631,1634],{},[1296,1629,1630],{},"配置复杂度",[1296,1632,1633],{},"单个 YAML 文件",[1296,1635,1636],{},"Caddyfile + acme.sh 配置 + systemd",[1281,1638,1639,1642,1645],{},[1296,1640,1641],{},"二进制大小",[1296,1643,1644],{},"~7 MB",[1296,1646,1647],{},"~40 MB（Caddy）",[14,1649,1650],{},"两套方案各有优势。Caddy 方案的生态更成熟，可以同时托管网站和其他反向代理服务；https_proxy 则胜在部署极简。一个二进制、一份配置文件，开箱即用。",[10,1652,1653],{"id":1653},"小结",[14,1655,1656],{},"https_proxy 的核心思路是内聚：",[1658,1659,1660,1666,1672,1678,1684],"ol",{},[36,1661,1662,1665],{},[861,1663,1664],{},"单二进制部署","：不依赖外部工具，编译完成即可使用",[36,1667,1668,1671],{},[861,1669,1670],{},"自动证书管理","：Let's Encrypt 证书自动签发和续期，无需 cron job",[36,1673,1674,1677],{},[861,1675,1676],{},"精准隐身","：对 HTTP/1.1 和 HTTP/2 都能正确识别并伪装，不会被简单的扫描器发现",[36,1679,1680,1683],{},[861,1681,1682],{},"性能优化","：TCP Fast Open、128 KiB 隧道缓冲区、连接池复用",[36,1685,1686,1689],{},[861,1687,1688],{},"安全认证","：多用户 Basic Auth，浏览器原生支持凭证弹窗",[106,1691,1692],{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":354,"searchDepth":387,"depth":387,"links":1694},[1695,1696,1703,1710,1715,1716],{"id":12,"depth":387,"text":12},{"id":47,"depth":387,"text":47,"children":1697},[1698,1699,1700,1701,1702],{"id":338,"depth":422,"text":339},{"id":477,"depth":422,"text":478},{"id":838,"depth":422,"text":839},{"id":853,"depth":422,"text":854},{"id":889,"depth":422,"text":890},{"id":896,"depth":387,"text":896,"children":1704},[1705,1706,1707,1708,1709],{"id":899,"depth":422,"text":899},{"id":913,"depth":422,"text":913},{"id":1101,"depth":422,"text":1101},{"id":1378,"depth":422,"text":1378},{"id":1417,"depth":422,"text":1417},{"id":1456,"depth":387,"text":1456,"children":1711},[1712,1713,1714],{"id":1459,"depth":422,"text":1459},{"id":1525,"depth":422,"text":1525},{"id":1531,"depth":422,"text":1531},{"id":1554,"depth":387,"text":1555},{"id":1653,"depth":387,"text":1653},"/assets/covers/https-proxy-stealth-forward-proxy.jpg","2026-03-18T00:00:00.000Z","详解 https_proxy 的设计原理与使用方法。一个自动签发 TLS 证书、伪装成 nginx 的隐身 HTTPS 正向代理。","md",{},"/posts/https-proxy-stealth-forward-proxy",{"title":5,"description":1719},"posts/https-proxy-stealth-forward-proxy","FOuaisuEBjZZfaUM2HnuNuRx_3ihCf7SmQmagBvtTXY",1788681981365]