{"id":46934,"date":"2020-03-05T18:30:49","date_gmt":"2020-03-05T10:30:49","guid":{"rendered":"http:\/\/4563.org\/?p=46934"},"modified":"2020-03-05T18:30:49","modified_gmt":"2020-03-05T10:30:49","slug":"%e9%80%9a%e8%bf%87chrome%e6%8f%92%e4%bb%b6%e7%ae%a1%e7%90%86vps%e6%94%af%e6%8c%81cdn%e5%8a%a0%e9%80%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=46934","title":{"rendered":"\u901a\u8fc7Chrome\u63d2\u4ef6\u7ba1\u7406VPS(\u652f\u6301CDN\u52a0\u901f)"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>Kai<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 23&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3>\u901a\u8fc7Chrome\u63d2\u4ef6\u7ba1\u7406VPS(\u652f\u6301CDN\u52a0\u901f)<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 Kai \u4e8e 2020-3-5 18:25 \u7f16\u8f91 <\/p>\n<p> \u592a\u957f\u4e0d\u770b\u7248<br \/>  \u91c7\u7528Secure Shell\u4f5c\u4e3a\u5ba2\u6237\u7aef\uff0c\u901a\u8fc7SSH over http\u8f6c\u53d1\u62a5\u6587\uff0c\u7ecfCDN\u52a0\u901f\u5230\u8fbe\u6e90\u7ad9nassh-relay\u8f6c\u53d1\u670d\u52a1\uff0c\u4ece\u800c\u8fde\u63a5SSH<\/p>\n<p>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>  \u6b63\u6587<br \/>  \u6700\u8fd1\u624b\u5934\u4e00\u53f0\u6b27\u6d32\u670d\u52a1\u5668\u88ab\u5899\uff0c\u8fd8\u6709\u4e00\u53f0\u53ea\u652f\u6301ipv6\u7684\u5403\u7070\u670d\u52a1\u5668\uff0c\u901a\u8fc7\u4ee3\u7406\u8fde\u63a5\u6709\u65f6\u4e5f\u5e76\u4e0d\u7406\u60f3\uff0c\u4e8e\u662f\u7f51\u4e0a\u641c\u7d22\u5230\u4e86chrome\u63d2\u4ef6+CDN\u8bbf\u95ee\u670d\u52a1\u5668\u7684\u529e\u6cd5\uff0c\u7279\u6765\u5206\u4eab<\/p>\n<p>  \u514d\u8d39\u7248CloudFlare\u5927\u5bb6\u767d\u5973\u7968\u5f88\u4e45\u4e86\uff0c\u867d\u7136\u652f\u6301\u4e00\u4e9b\u975e80\u3001443\u7aef\u53e3\u4f46\u4e0d\u652f\u6301ssh\u3002\u6d4b\u8bd5\u7684Argo Tunnel\u3001Spectrum\u90fd\u6254\u5230Business\u7248\u3002\u597d\u5728Google\u5f00\u53d1\u4e86Secure Shell\uff0c\u53ef\u4ee5\u901a\u8fc7nassh-relay\u8f6c\u53d1\u3002nassh-relay\u57fa\u4e8ejava\u5f00\u53d1\uff0c\u5168\u5e73\u53f0\u9002\u7528\uff0c\u4e5f\u652f\u6301google-sso\u7b49\u5b89\u5168\u8bbe\u7f6e\u3002\u800c\u4e14\u517c\u5bb9nginx\u53cd\u4ee3\uff0c\u56e0\u6b64\u652f\u6301CDN\u52a0\u901f\u3002\u4e0b\u9762\u8bf4\u8bf4\u90e8\u7f72\u65b9\u6cd5<\/p>\n<p>  1.\u5b89\u88c5<br \/>  \u5148\u88c5java\uff0cubuntu\u76f4\u63a5<br \/>  sudo apt install default-jre<\/p>\n<p>  \u5b89\u88c5nassh-relay\u53ef\u4ee5\u7528docker\uff0c\u6bd4\u8f83\u7b80\u5355\u4e0d\u8bf4\u4e86\uff0c\u975edocker\u76f4\u63a5\u4e0b\u8f7d\u6700\u65b0\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u5728https:\/\/github.com\/zyclonite\/nassh-relay\/releases\u4e0b\u5230<\/p>\n<p>  \u89e3\u538b\u540e\u6309\u9700\u6c42\u4fee\u6539config.json\u6587\u4ef6\uff08\u6211\u6ca1\u4fee\u6539\uff09\uff0c\u53ef\u4ee5\u5f00ssl\uff0cGoogle-SSO\u9a8c\u8bc1\uff0c\u9ed1\u767d\u540d\u5355\uff08blacklist\u91cc\u662f\u9ed1\u540d\u5355\uff0c\u9ed8\u8ba4\u4e0d\u8ba9\u8bbf\u95ee\u670d\u52a1\u5668\u672c\u673a\uff0c\u60f3\u7528\u53ef\u4ee5\u5220\u4e86\uff09<\/p>\n<p>  \u542f\u52a8nassh-relay\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u6839\u636e\u9700\u8981\u81ea\u884c\u9009\u62e9\uff1a<br \/>  1.\u7a0b\u5e8f\u5305\u63d0\u4f9b\u4e86run.sh\uff0c\u6254screen\u91cc\u6267\u884c\u6216\u8005nohup &amp;<br \/>  2.\u7528init.d\u548csystemd\uff0c\u4e0b\u9762\u8d34\u4e00\u4e2a\u6211\u7684systemd\u914d\u7f6e\uff08\u6211\u52a0\u4e862\u4e2ajava\u53c2\u6570\u63a7\u5236\u5185\u5b58\uff09<\/p>\n<p>  Description=SSH-Relay<br \/>  Requires=network.target<br \/>  After=network-online.target<\/p>\n<p>  Type=simple<br \/>  User=root<br \/>  RemainAfterExit=yes<br \/>  ExecStart=\/usr\/bin\/java -Xmx32m -Xms16m -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory -Droot.level=INFO -jar \/usr\/local\/nassh-relay\/nassh-relay-app.jar -conf \/usr\/local\/nassh-relay\/config.json -cp .<br \/>  ExecReload=\/usr\/bin\/kill -HUP<br \/>  RestartSec=1min<br \/>  Restart=on-failure<\/p>\n<p>  WantedBy=multi-user.target<\/p>\n<p>  3.\u914d\u7f6enginx<br \/>  \u5f00\u53d1\u8005\u7ed9\u4e86nginx\u914d\u7f6e\uff0c\u6211\u81ea\u5df1\u52a0\u4e86ssl\u548c\u9a8c\u8bc1\uff0c\u770b\u81ea\u5df1\u9700\u6c42<br \/>  &nbsp; &nbsp; server {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen 443 ssl;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;listen [::]:443 ssl;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;server_name _;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#ssl_certificate \/path\/\u4f60\u7684\u8bc1\u4e66;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;#ssl_certificate_key \/path\/\u4f60\u7684\u8bc1\u4e66;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location \/cookie {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;#auth_basic &quot;Restricted&quot;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;#auth_basic_user_file \/etc\/nginx\/.htpasswd;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/localhost:8022\/cookie;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;include proxy_params;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location \/proxy {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/localhost:8022\/proxy;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;include proxy_params;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location \/read {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/localhost:8022\/read;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;include proxy_params;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location \/write {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/localhost:8022\/write;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;include proxy_params;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;location \/connect {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/localhost:8022\/connect;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_http_version 1.1;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Upgrade $http_upgrade;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Connection &quot;upgrade&quot;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_read_timeout 10m;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;include proxy_params;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  &nbsp; &nbsp; }<br \/>  \u751f\u6210.htpasswd\u6254\u5230\/etc\/nginx<\/p>\n<p>  4.\u6d4f\u89c8\u5668\u63d2\u4ef6<br \/>  Chrome\u6709\u63d2\u4ef6\u7248\u548cApp\u7248\uff0cApp\u7248\u684c\u9762Chrome\u6d4f\u89c8\u5668\u4e5f\u80fd\u88c5\uff0c\u4e0d\u8fc7\u76ee\u524d\u5df2\u7ecf\u505c\u6b62\u5f00\u53d1\uff0c\u5e76\u5c06\u4e8e2020\u5e746\u6708\u505c\u6b62\u670d\u52a1\u3002\u63d2\u4ef6\u7248\u53ef\u4ee5\u5168\u5e73\u53f0\u4f7f\u7528\uff0c\u63a8\u8350\u4f7f\u7528\u63d2\u4ef6\u7248<\/p>\n<p>  Store\u641c\u7d22Secure Shell\uff0c\u5b89\u88c5\u63d2\u4ef6\u540e\u70b9\u51fb\u56fe\u6807\u51fa\u73b0\u5bf9\u8bdd\u6846\uff0c\u521d\u6b21\u4f7f\u7528\u53ea\u6709\u201c\u8fde\u63a5\u670d\u52a1\u5668\u201d\u548c\u201c\u9009\u9879\u201d\uff0c\u8fd9\u91cc\u6211\u5df2\u7ecf\u67092\u4e2a\u914d\u7f6e\u6587\u4ef6<br \/>  https:\/\/upload-images.jianshu.io\/upload_images\/20835238-b00bda1975a8082d.png?imageMogr2\/auto-orient\/strip|imageView2\/2\/w\/244\/format\/webp<\/p>\n<p>  \u70b9\u51fb\u8fde\u63a5\u5bf9\u8bdd\u6846\u4f1a\u51fa\u73b0\u65b0\u7684\u8fde\u63a5\u914d\u7f6e\u7a97\u53e3<br \/>  https:\/\/upload-images.jianshu.io\/upload_images\/20835238-a303f251ee2caf19.png?imageMogr2\/auto-orient\/strip|imageView2\/2\/w\/1200\/format\/webp<\/p>\n<p>  \u65b0\u5efa\u914d\u7f6e\u6587\u4ef6\uff0cserver\u53c2\u6570\u4e2d\u586b\u5199\u4f60\u7684\u670d\u52a1\u5668ip\uff08127.0.0.1\u8868\u793a\u670d\u52a1\u5668\u672c\u673a\uff0c\u4e0d\u5efa\u8bae\u7528\uff09<br \/>  SSH relay server options\u586b\u5165\u8f6c\u53d1\u53c2\u6570\uff08\u8fd9\u91cc\u7528\u57df\u540d\u662f\u4e3a\u4e86CDN\uff09\uff1a<br \/>  &#8211;proxy-host=\u4f60\u7684\u670d\u52a1\u5668\u57df\u540d &#8211;proxy-port=443 &#8211;use-ssl<\/p>\n<p>  \u8bc1\u4e66\u767b\u5f55\u53ef\u4ee5\u5728\u201c\u8eab\u4efd\u201d\u5bfc\u5165\u8bc1\u4e66\uff0c\u5206\u522b\u9700\u8981\u5bfc\u5165\u79c1\u94a5\uff08OpenSSH2\u683c\u5f0f\uff0c\u6587\u4ef6\u540d\u4e3aid_rsa\uff09\u548c\u5bf9\u5e94\u7684\u516c\u94a5\uff08\u6587\u4ef6\u540d\u4e3aid_rsa.pub\uff09\uff0c\u7136\u540e\u5728\u4e0b\u62c9\u83dc\u5355\u9009\u62e9id_rsa\u5373\u53ef<\/p>\n<p>  \u914d\u7f6e\u5b8c\u6210\u540e\u70b9\u8fde\u63a5\uff0c\u767b\u5f55\u4e2d\u7ee7\u670d\u52a1\u5668\u5e76htpasswd\u9a8c\u8bc1<br \/>  https:\/\/upload-images.jianshu.io\/upload_images\/20835238-ea8a020a40bb136c.png?imageMogr2\/auto-orient\/strip|imageView2\/2\/w\/676\/format\/webp<\/p>\n<p>  \u968f\u540e\u63d2\u4ef6\u81ea\u52a8\u8fde\u63a5SSH\uff0c\u8f93\u5165\u5bc6\u7801\uff08\u6b64\u5904\u4e3a\u79c1\u94a5\u5bc6\u7801\uff09\u5373\u53ef\u767b\u5f55<br \/>  https:\/\/upload-images.jianshu.io\/upload_images\/20835238-59a74a9cc874726c.png?imageMogr2\/auto-orient\/strip|imageView2\/2\/w\/1200\/format\/webp<\/p>\n<p>  5. \u8bbe\u7f6eCDN<br \/>  \u5230CDN\u670d\u52a1\u5546\u52a0\u5165\u57df\u540d\u5373\u53ef\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u5168\u7403\u52a0\u901f\uff0c\u800c\u4e14\u53cc\u6808\u52a0\u901f\u53ef\u4ee5\u6253\u901aipv4-only\u548cipv6-only\uff0c\u7f8e\u6ecb\u6ecb<\/p>\n<p>  \u603b\u7ed3\uff1a<br \/>  \u914d\u7f6e\u5e76\u4e0d\u5f88\u9ebb\u70e6\uff0c\u8ddf\u7740\u5b98\u65b9\u6559\u7a0b\u4e00\u6b65\u6b65\u4e0b\u6765\u5f88\u5feb\u4e5f\u5c31\u5b8c\u6210\u4e86\uff0c\u5b9e\u73b0\u5728chrome\u91cc\u7ba1\u7406\u670d\u52a1\u5668\uff0c\u540c\u65f6\u4eab\u53d7CDN\u52a0\u901f\u3002\u5982\u6709\u9700\u8981\u8fd8\u53ef\u4ee5\u52a0\u5165google-sso\u9a8c\u8bc1\u7b49\u9ad8\u7ea7\u65b9\u6cd5\u3002\u7b97\u662f\u5bf9\u7f3a\u5c11\u5408\u9002\u8df3\u677f\u673a\u6216\u8005\u4ee3\u7406\u7684\u4e00\u79cd\u8865\u5145<\/p>\n<p>  \u7f3a\u70b9\u662f\u76ee\u524dsftp\u529f\u80fd\u4e0d\u5b8c\u5168\uff08\u636e\u8bf4\u5728ChromeOS\u4e0a\u80fd\u6302\u8f7d\uff09\uff0c\u671f\u5f85Google\u540e\u7eed\u5f00\u53d1\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>AntiWaR<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 22&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5927\u4f6c\u725b\u903cplus\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yy520<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 22&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u76f4\u63a5\u62d6\u5230\u6700\u540e\u8bc4\u8bba\u8d70\u4eba\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>heu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 21&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u597d\u957f\u554a\uff0c\u6211\u4e0d\u770b\u4e86\u2026\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6539\u8fc7\u81ea\u65b0<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 15&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\tAntiWaR \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-5 18:26<br \/>  \u5927\u4f6c\u725b\u903cplus<\/p>\n<p> \u628a\u5934\u50cf\u94fe\u63a5\u53d1\u51fa\u6765\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kai \u5927\u4f6c\u6709\u8bdd\u8bf4 : 23&#038;nb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/46934"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46934"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/46934\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46934"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}