{"id":549019,"date":"2021-12-29T17:19:07","date_gmt":"2021-12-29T09:19:07","guid":{"rendered":"http:\/\/4563.org\/?p=549019"},"modified":"2021-12-29T17:19:07","modified_gmt":"2021-12-29T09:19:07","slug":"mjj%e6%9c%89%e7%94%a8openlitespeed%e7%9a%84%e5%90%97%ef%bc%8c%e6%b1%82%e8%a7%a3%e5%8f%8d%e4%bb%a3ws%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=549019","title":{"rendered":"mjj\u6709\u7528openlitespeed\u7684\u5417\uff0c\u6c42\u89e3\u53cd\u4ee3ws\u7684\u95ee\u9898"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u8def\u89c1\u4e0d\u5e73<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>mjj\u6709\u7528openlitespeed\u7684\u5417\uff0c\u6c42\u89e3\u53cd\u4ee3ws\u7684\u95ee\u9898<\/h3>\n<p>  \t\tmjj\u6709\u7528openlitespeed\u7684\u5417\uff0c\u6c42\u89e3\u53cd\u4ee3ws\u7684\u95ee\u9898\u3002<br \/>  \u4e4b\u524d\u7528nginx\u53cd\u4ee3http+websocket\u6d41\u91cf\u53ea\u9700\u8981\u52a0\u4e0a<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_http_version 1.1;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Upgrade $http_upgrade;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Connection $connection_upgrade;<br \/>  \u5c31\u53ef\u4ee5\u3002<\/p>\n<p>  \u4f46\u662fopenlitespeed\u53cd\u4ee3websocket\u5c31\u5f88\u8ff7\uff0c\u6211\u627e\u4e86\u597d\u591a\u5e16\u5b50\uff0c\u53ea\u627e\u5230\u4e00\u4e2a\uff1ahttps:\/\/forum.openlitespeed.org\/threads\/how-to-reverse-proxy-web-socket-traffic.2917\/<br \/>  \u91cc\u9762\u8bf4websocket\u6d41\u91cf\u548chttp\u6d41\u91cf\u5e76\u4e0d\u662f\u4e00\u8d77\u8bbe\u7f6e\u7684\uff0c\u8fd9\u4e5f\u80fd\u63a5\u53d7\uff0c\u4f46\u662f\u8fd8\u9700\u8981header\u4e2d\u6dfb\u52a0&quot;upgrade&quot;\uff0c\u8fd9\u4e00\u6b65\u6211\u5b9e\u5728\u627e\u4e0d\u5230openlitespeed\u54ea\u91cc\u6709\u3002\u3002\u3002\u5b98\u65b9\u6587\u6863\u7ffb\u904d\u4e86\u90fd\u6ca1\u627e\u5230\uff0c\u53ea\u80fd\u6c42\u52a9mjj\u4e86\u3002  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>loveqianool<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u4e1c\u897f\u4e0d\u662f\u6709 web \u754c\u9762\u6253\u4e2a\u52fe\u5c31\u884c\u5417\uff1f\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8be1\u8c32<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5728virtualHost\u6bb5\uff0c\u627e\u4e2a\u4f4d\u7f6e\u653e\uff0c\u6211\u662f\u901a\u914d\u7b26\u7ed1\u5b9a\u8fc7\u6765\u7684\uff0c\u6240\u4ee5\u6211\u505a\u4e86\u5b50\u57df\u540d\u5224\u65ad\uff0c\u4f60\u6ca1\u6709\u53ef\u4ee5\u4e0d\u7ba1\uff0c\u53ef\u4ee5\u5220\u6389\u524d\u9762\u7684\u5224\u65ad<\/p>\n<p>  |*if SUB=&quot;sec&quot;|<br \/>  extprocessor xrayBackend{<br \/>  type proxy<br \/>  address 172.21.0.2:10000<br \/>  maxConns 2000<br \/>  pcKeepAliveTimeout 30<br \/>  initTimeout 10<br \/>  retryTimeout 10<br \/>  respBuffer 0<br \/>  }<\/p>\n<p>  context \/ooxx {<br \/>  type proxy<br \/>  handler xrayBackend<br \/>  addDefaultCharset off<br \/>  }<\/p>\n<p>  websocket \/ooxx {<br \/>  address 172.21.0.2:10000<br \/>  }<br \/>  |*endif|  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8def\u89c1\u4e0d\u5e73<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8be1\u8c32 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-12-29 15:19<br \/>  \u5728virtualHost\u6bb5\uff0c\u627e\u4e2a\u4f4d\u7f6e\u653e\uff0c\u6211\u662f\u901a\u914d\u7b26\u7ed1\u5b9a\u8fc7\u6765\u7684\uff0c\u6240\u4ee5\u6211\u505a\u4e86\u5b50\u57df\u540d\u5224\u65ad\uff0c\u4f60\u6ca1\u6709\u53ef\u4ee5\u4e0d\u7ba1\uff0c\u53ef\u4ee5\u5220\u6389\u524d &#8230;<\/p>\n<p> \u5144\u5f1f\uff0c\u4f60\u8bd5\u8bd5\u5173\u6389allowInsecure\u9009\u9879\u8bd5\u8bd5\uff0c\u80fd\u4e0d\u80fd\u8fde\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8def\u89c1\u4e0d\u5e73<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8be1\u8c32 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-12-29 15:19<br \/>  \u5728virtualHost\u6bb5\uff0c\u627e\u4e2a\u4f4d\u7f6e\u653e\uff0c\u6211\u662f\u901a\u914d\u7b26\u7ed1\u5b9a\u8fc7\u6765\u7684\uff0c\u6240\u4ee5\u6211\u505a\u4e86\u5b50\u57df\u540d\u5224\u65ad\uff0c\u4f60\u6ca1\u6709\u53ef\u4ee5\u4e0d\u7ba1\uff0c\u53ef\u4ee5\u5220\u6389\u524d &#8230;<\/p>\n<p> \u6211\u8bd5\u4e86v2\uff0c\u662f\u53ef\u4ee5\u7528\uff0c\u4f46\u662f\u6211\u662f\u7528\u5728rocketchat\u4e0a\u3002\u3002\u3002\u641e\u4e0d\u660e\u767d\u4e3a\u5565\u51fa\u95ee\u9898\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8def\u89c1\u4e0d\u5e73<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8be1\u8c32 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-12-29 15:19<br \/>  \u5728virtualHost\u6bb5\uff0c\u627e\u4e2a\u4f4d\u7f6e\u653e\uff0c\u6211\u662f\u901a\u914d\u7b26\u7ed1\u5b9a\u8fc7\u6765\u7684\uff0c\u6240\u4ee5\u6211\u505a\u4e86\u5b50\u57df\u540d\u5224\u65ad\uff0c\u4f60\u6ca1\u6709\u53ef\u4ee5\u4e0d\u7ba1\uff0c\u53ef\u4ee5\u5220\u6389\u524d &#8230;<\/p>\n<p> \u5144\u5f1f\uff0c\u6211\u597d\u50cf\u77e5\u9053\u539f\u56e0\u4e86\uff0c\u5e94\u8be5\u662fOLS\u628ahttp\u548cwebsocket\u5206\u5f00\uff0c\u4f46\u662f\u53ea\u628ahttp\u52a0\u5bc6\u4e86\uff0cws\u5e76\u6ca1\u6709\u53d8\u6210wss\u3002\u3002\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u81ea\u6765\u5149<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\topenlitespeed\u524d\u9762\u52a0\u4e2anginx\u53cd\u4ee3https:\/\/cdn.jsdelivr.net\/gh\/master-of-forums\/master-of-forums\/public\/images\/patch.gif\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8def\u89c1\u4e0d\u5e73 \u5927\u4f6c\u6709\u8bdd\u8bf4 : mjj\u6709&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/549019"}],"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=549019"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/549019\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=549019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=549019"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=549019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}