{"id":42,"date":"2023-07-30T17:47:12","date_gmt":"2023-07-30T09:47:12","guid":{"rendered":"https:\/\/jjm6.com\/?p=42"},"modified":"2023-07-30T17:47:12","modified_gmt":"2023-07-30T09:47:12","slug":"%e9%80%9a%e8%bf%87x-ui%e9%9d%a2%e6%9d%bf%e6%90%ad%e5%bb%ba%e5%ae%9e%e7%8e%b0vmesswstlsweb%e4%bc%aa%e8%a3%85%e5%8d%95%e7%ab%af%e5%8f%a3%e5%a4%9a%e7%94%a8%e6%88%b7%e5%90%88%e7%a7%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/jjm6.com\/index.php\/2023\/07\/30\/%e9%80%9a%e8%bf%87x-ui%e9%9d%a2%e6%9d%bf%e6%90%ad%e5%bb%ba%e5%ae%9e%e7%8e%b0vmesswstlsweb%e4%bc%aa%e8%a3%85%e5%8d%95%e7%ab%af%e5%8f%a3%e5%a4%9a%e7%94%a8%e6%88%b7%e5%90%88%e7%a7%9f%e3%80%82\/","title":{"rendered":"\u901a\u8fc7x-ui\u9762\u677f\u642d\u5efa\u5b9e\u73b0vmess+ws+tls+web\u4f2a\u88c5\u5355\u7aef\u53e3\u591a\u7528\u6237\u5408\u79df\u3002"},"content":{"rendered":"\n<p><strong><em>\u8282\u70b9\u642d\u5efa<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u66f4\u65b0\u8f6f\u4ef6\u6e90\napt update\n#\u542f\u7528 BBR TCP \u62e5\u585e\u63a7\u5236\u7b97\u6cd5\necho \"net.core.default_qdisc=fq\" &gt;&gt; \/etc\/sysctl.conf\necho \"net.ipv4.tcp_congestion_control=bbr\" &gt;&gt; \/etc\/sysctl.conf\nsysctl -p\n\n#\u5b89\u88c5x-ui\uff1a\nbash &lt;(curl -Ls https:\/\/raw.githubusercontent.com\/vaxilu\/x-ui\/master\/install.sh)\n\n#\u5b89\u88c5nginx\napt install nginx\n#\u5b89\u88c5acme\uff1a\ncurl https:\/\/get.acme.sh | sh\n#\u6dfb\u52a0\u8f6f\u94fe\u63a5\uff1a\nln -s  \/root\/.acme.sh\/acme.sh \/usr\/local\/bin\/acme.sh\n#\u5207\u6362CA\u673a\u6784\uff1a \nacme.sh --set-default-ca --server letsencrypt\n#\u7533\u8bf7\u8bc1\u4e66\uff1a \nacme.sh  --issue -d \u4f60\u7684\u57df\u540d -k ec-256 --webroot  \/var\/www\/html\n#\u5b89\u88c5\u8bc1\u4e66\uff1a\nacme.sh --install-cert -d \u4f60\u7684\u57df\u540d --ecc --key-file \/etc\/x-ui\/server.key  --fullchain-file \/etc\/x-ui\/server.crt --reloadcmd \"systemctl force-reload nginx\"<\/pre>\n\n\n\n<p><strong><em>\u5bfb\u627e\u9002\u5408\u7684\u4f2a\u88c5\u7ad9<\/em><\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>http\u7ad9\u70b9\u4f18\u5148\uff0c\u4e2a\u4eba\u7f51\u76d8\u7b26\u5408\u5355\u8282\u70b9\u5927\u6d41\u91cf\u7279\u5f81<\/p>\n<\/blockquote>\n\n\n\n<p>\u793a\u4f8b\u5173\u952e\u5b57\uff1aintext:\u767b\u5f55 Cloudreve<\/p>\n\n\n\n<h3 id=\"\u914d\u7f6enginx\">\u914d\u7f6enginx<\/h3>\n\n\n\n<p><strong><em>\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\uff1a<\/em><\/strong>\/etc\/nginx\/nginx.conf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user www-data;\nworker_processes auto;\npid \/run\/nginx.pid;\ninclude \/etc\/nginx\/modules-enabled\/*.conf;\n\nevents {\n    worker_connections 1024;\n}\n\nhttp {\n    sendfile on;\n    tcp_nopush on;\n    tcp_nodelay on;\n    keepalive_timeout 65;\n    types_hash_max_size 2048;\n\n    include \/etc\/nginx\/mime.types;\n    default_type application\/octet-stream;\n    gzip on;\n\n    server {\n        listen 443 ssl;\n        \n        server_name nicename.co;  #\u4f60\u7684\u57df\u540d\n        ssl_certificate       \/etc\/x-ui\/server.crt;  #\u8bc1\u4e66\u4f4d\u7f6e\n        ssl_certificate_key   \/etc\/x-ui\/server.key; #\u79c1\u94a5\u4f4d\u7f6e\n        \n        ssl_session_timeout 1d;\n        ssl_session_cache shared:MozSSL:10m;\n        ssl_session_tickets off;\n        ssl_protocols    TLSv1.2 TLSv1.3;\n        ssl_prefer_server_ciphers off;\n\n        location \/ {\n            proxy_pass https:\/\/bing.com; #\u4f2a\u88c5\u7f51\u5740\n            proxy_redirect off;\n            proxy_ssl_server_name on;\n            sub_filter_once off;\n            sub_filter \"bing.com\" $server_name;\n            proxy_set_header Host \"bing.com\";\n            proxy_set_header Referer $http_referer;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header User-Agent $http_user_agent;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto https;\n            proxy_set_header Accept-Encoding \"\";\n            proxy_set_header Accept-Language \"zh-CN\";\n        }\n\n\n        location \/ray {   #\u5206\u6d41\u8def\u5f84\n            proxy_redirect off;\n            proxy_pass http:\/\/127.0.0.1:10000; #Xray\u7aef\u53e3\n            proxy_http_version 1.1;\n            proxy_set_header Upgrade $http_upgrade;\n            proxy_set_header Connection \"upgrade\";\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        }\n        \n        location \/xui {   #xui\u8def\u5f84\n            proxy_redirect off;\n            proxy_pass http:\/\/127.0.0.1:9999;  #xui\u76d1\u542c\u7aef\u53e3\n            proxy_http_version 1.1;\n            proxy_set_header Host $host;\n        }\n    }\n\n    server {\n        listen 80;\n        location \/.well-known\/ {\n               root \/var\/www\/html;\n            }\n        location \/ {\n                rewrite ^(.*)$ https:\/\/$host$1 permanent;\n            }\n    }\n}<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>\u6bcf\u6b21\u4fee\u6539nginx\u914d\u7f6e\u6587\u4ef6\u540e\u5fc5\u987b\u4f7f\u7528&nbsp;systemctl reload nginx&nbsp;\u547d\u4ee4\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/blockquote>\n\n\n\n<h3 id=\"\u591a\u7528\u6237\u5408\u79df\">\u591a\u7528\u6237\u5408\u79df<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>\u901a\u8fc7\u4fee\u6539nginx\u7684\u914d\u7f6e\u6587\u4ef6\u5b9e\u73b0ws path\u8def\u5f84\u5206\u6d41<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">location \/ray {   #\u5206\u6d41\u8def\u5f84\n    proxy_redirect off;\n    proxy_pass http:\/\/127.0.0.1:10000; #Xray\u7aef\u53e3\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection \"upgrade\";\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8282\u70b9\u642d\u5efa #\u66f4\u65b0\u8f6f\u4ef6\u6e90 apt update #\u542f\u7528 BBR TCP \u62e5\u585e\u63a7\u5236\u7b97\u6cd5 echo &#8220;net.cor &hellip; <a href=\"https:\/\/jjm6.com\/index.php\/2023\/07\/30\/%e9%80%9a%e8%bf%87x-ui%e9%9d%a2%e6%9d%bf%e6%90%ad%e5%bb%ba%e5%ae%9e%e7%8e%b0vmesswstlsweb%e4%bc%aa%e8%a3%85%e5%8d%95%e7%ab%af%e5%8f%a3%e5%a4%9a%e7%94%a8%e6%88%b7%e5%90%88%e7%a7%9f%e3%80%82\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u901a\u8fc7x-ui\u9762\u677f\u642d\u5efa\u5b9e\u73b0vmess+ws+tls+web\u4f2a\u88c5\u5355\u7aef\u53e3\u591a\u7528\u6237\u5408\u79df\u3002\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":1,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":43,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/posts\/42\/revisions\/43"}],"wp:attachment":[{"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jjm6.com\/index.php\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}