{"id":13545544,"url":"https://github.com/crazypeace/v2ray_wss","last_synced_at":"2026-02-16T08:31:01.290Z","repository":{"id":45821376,"uuid":"464029681","full_name":"crazypeace/v2ray_wss","owner":"crazypeace","description":"V2ray v4.45.2，VLESS_WebSocket_TLS模式 / Vmess_WebSocket_TLS模式，极简一键脚本, CaddyV2前置解除TLS和path。支持带参数 域名 IP栈 UUID path 减少安装过程中的交互","archived":false,"fork":false,"pushed_at":"2025-03-18T05:38:07.000Z","size":264,"stargazers_count":384,"open_issues_count":2,"forks_count":117,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-18T06:32:19.010Z","etag":null,"topics":["caddy","tls","v2ray","vless","vmess","websocket"],"latest_commit_sha":null,"homepage":"https://zelikk.blogspot.com/2022/11/v2ray-vless-vmess-websocket-cdn-tls-caddy-v2.html","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazypeace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-02-27T03:44:39.000Z","updated_at":"2025-03-18T05:38:11.000Z","dependencies_parsed_at":"2023-02-15T22:00:50.303Z","dependency_job_id":"85870eb1-1801-4003-9252-94803746e27e","html_url":"https://github.com/crazypeace/v2ray_wss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fv2ray_wss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fv2ray_wss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fv2ray_wss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazypeace%2Fv2ray_wss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazypeace","download_url":"https://codeload.github.com/crazypeace/v2ray_wss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246841723,"owners_count":20842637,"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":["caddy","tls","v2ray","vless","vmess","websocket"],"created_at":"2024-08-01T11:01:05.316Z","updated_at":"2026-02-16T08:31:01.236Z","avatar_url":"https://github.com/crazypeace.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003cdetails\u003e\n    \u003csummary\u003e重要更新记录 (点击展开)\u003c/summary\u003e\n    \n# 2022-10-30\n脚本把VLESS协议搭好后，会提示你要不要切换为Vmess协议。\n直接回车默认为`不要切换`。输入`Y`再回车就会切换为Vmess协议，并显示链接和二维码。\n\n本质上就是执行了一下下面这条命令而已。意思是把config.json文件中的vless替换为vmess\n```\nsed -i \"s/vless/vmess/g\" /usr/local/etc/v2ray/config.json\n```\n\n所以如果你想vmess换成vless，就用下面这条命令\n```\nsed -i \"s/vmess/vless/g\" /usr/local/etc/v2ray/config.json\n```\n\n当然每次换完要记得重启v2ray\n```\nservice v2ray restart\n```\n\n# 2022-9-19 \nHax / Woiden 站长时不时的把机器人验证调得很难，于是续期非常容易失败。\n那么把搭梯子的脚本简单化\n```\napt update \u0026\u0026 apt install -y curl \u0026\u0026 bash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) 你的域名 6 你的UUID 你的path\n```\n跑这条命令之前，把CDN关闭。跑完之后再把CDN打开。\n这样搭出来的梯子，你的翻墙客户端节点信息不用改。\n\n# 2022-9-8\n本脚本指定安装V2ray v4.45.2 (v5之前的最后一个v4)\n\n相关信息\nhttps://github.com/v2fly/fhs-install-v2ray/issues/243\n\u003c/details\u003e\n    \n# 说明\n这个一键脚本超级简单。有效语句11行(其中BBR 5行, 安装V2Ray 1行, 安装Caddy 5行)+Caddy配置文件18行(其中你需要修改4行)+V2Ray配置文件89行(其中你需要修改2行), 其它都是用来检验小白输入错误参数或者搭建条件不满足的。\n\n你如果不放心开源的脚本，你可以自己执行那11行有效语句，再修改配置文件中的6行，也能达到一样的效果。\n\n# 一键安装\n```\napt update\napt install -y curl\n```\n```\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh)\n```\n\n脚本中很大部分都是在校验用户的输入。其实照着下面的步骤自己配置就行了。\n\n# 具体手搓步骤 (点击展开)\n\u003cdetails\u003e\n    \u003csummary\u003e(点击展开)\u003c/summary\u003e\n    \n# 打开BBR\n```\nsed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf\nsed -i '/net.core.default_qdisc/d' /etc/sysctl.conf\necho \"net.ipv4.tcp_congestion_control = bbr\" \u003e\u003e/etc/sysctl.conf\necho \"net.core.default_qdisc = fq\" \u003e\u003e/etc/sysctl.conf\nsysctl -p \u003e/dev/null 2\u003e\u00261\n```\n\n# 安装V2ray v4.45.2\nsource: https://github.com/v2fly/fhs-install-v2ray\n```\nbash \u003c(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --version 4.45.2\n```\n\n# 安装CaddyV2最新版本\nsource: https://caddyserver.com/docs/install#debian-ubuntu-raspbian\n\n```\nsudo apt install -y debian-keyring debian-archive-keyring apt-transport-https\ncurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg\ncurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list\nsudo apt update\nsudo apt install caddy\n```\n\n如果已经装过了Caddy, 重装的时候脚本会问你\n```\nFile '/usr/share/keyrings/caddy-stable-archive-keyring.gpg' exists. Overwrite? (y/N)\n```\n输入 y 回车。\n\n# 配置 /usr/local/etc/v2ray/config.json\n```\n{ // VLESS + WebSocket + TLS\n    \"log\": {\n        \"access\": \"/var/log/v2ray/access.log\",\n        \"error\": \"/var/log/v2ray/error.log\",\n        \"loglevel\": \"warning\"\n    },\n    \"inbounds\": [\n        {\n            \"listen\": \"127.0.0.1\",        \n            \"port\": 你的v2ray内部端口,             // ***改这里\n            \"protocol\": \"vless\",\n            \"settings\": {\n                \"clients\": [\n                    {\n                        \"id\": \"你的v2rayID\",             // ***改这里\n                        \"level\": 1,\n                        \"alterId\": 0\n                    }\n                ],\n                \"decryption\": \"none\"\n            },\n            \"streamSettings\": {\n                \"network\": \"ws\"\n            },\n            \"sniffing\": {\n                \"enabled\": true,\n                \"destOverride\": [\n                    \"http\",\n                    \"tls\"\n                ]\n            }\n        }\n    ],\n    \"outbounds\": [\n        {\n            \"protocol\": \"freedom\",\n            \"settings\": {\n                \"domainStrategy\": \"UseIP\"\n            },\n            \"tag\": \"direct\"\n        },\n        {\n            \"protocol\": \"blackhole\",\n            \"settings\": {},\n            \"tag\": \"blocked\"\n        }\n    ],\n    \"dns\": {\n        \"servers\": [\n            \"https+local://8.8.8.8/dns-query\",\n            \"8.8.8.8\",\n            \"1.1.1.1\",\n            \"localhost\"\n        ]\n    },\n    \"routing\": {\n        \"domainStrategy\": \"IPOnDemand\",\n        \"rules\": [\n            {\n                \"type\": \"field\",\n                \"ip\": [\n                    \"0.0.0.0/8\",\n                    \"10.0.0.0/8\",\n                    \"100.64.0.0/10\",\n                    \"127.0.0.0/8\",\n                    \"169.254.0.0/16\",\n                    \"172.16.0.0/12\",\n                    \"192.0.0.0/24\",\n                    \"192.0.2.0/24\",\n                    \"192.168.0.0/16\",\n                    \"198.18.0.0/15\",\n                    \"198.51.100.0/24\",\n                    \"203.0.113.0/24\",\n                    \"::1/128\",\n                    \"fc00::/7\",\n                    \"fe80::/10\"\n                ],\n                \"outboundTag\": \"blocked\"\n            },\n            {\n                \"type\": \"field\",\n                \"protocol\": [\n                    \"bittorrent\"\n                ],\n                \"outboundTag\": \"blocked\"\n            }\n        ]\n    }\n}\n```\n\n# 配置 /etc/caddy/Caddyfile\n```\n你的域名     # 改这里\n{\n    tls Y3JhenlwZWFjZQ@gmail.com\n    encode gzip\n\n    handle_path /分流path {     # 改这里\n        reverse_proxy localhost:你的v2ray内部端口     # 改这里\n    }\n    handle {\n        reverse_proxy https://你反代伪装的网站 {     # 改这里\n            trusted_proxies 0.0.0.0/0\n            header_up Host {upstream_hostport}\n        }\n    }\n}\n```\n\n如果想多用户使用，可以通过多path的方式\n```\n你的域名     # 改这里\n{\n    tls Y3JhenlwZWFjZQ@gmail.com\n    encode gzip\n\n@ws_path {\n    path /分流path1     # 改这里\n    path /分流path2     # 改这里\n    path /分流path3     # 改这里\n}\n\n    handle @ws_path {\n        uri path_regexp /.* /\n        reverse_proxy localhost:你的v2ray内部端口     # 改这里\n    }\n    handle {\n        reverse_proxy https://你反代伪装的网站 {     # 改这里\n            header_up Host {upstream_hostport}\n        }\n    }\n}\n```\n可参考视频 https://www.youtube.com/watch?v=bfZh_eaYJLE\u0026t=220s\n\n# 如果是 IPv6 only 的小鸡，用 WARP 添加 IPv4 出站能力\n```\nbash \u003c(curl -L git.io/warp.sh) 4\n```\n\n\u003c/details\u003e\n    \n# Uninstall\n```\nbash \u003c(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove\nrm /etc/apt/sources.list.d/caddy-stable.list\napt remove -y caddy\n```\n\n# 私货\n对于喜欢V2rayN PAC模式的朋友，欢迎使用支持VLESS链接导入功能的 [v2rayN-3.29-VLESS](https://github.com/crazypeace/v2rayN-3.29-VLESS)  \n最新版本支持了tls分片\n![v2rayN_2022-07-20_22-02-43](https://user-images.githubusercontent.com/665889/180002616-c2c6da3c-78b0-4f46-8fa9-34021590646f.png)\n\n# 带参数执行\n如果你已经很熟悉了, 安装过程中的参数都确认没问题. 可以带参数使用本脚本, 跳过脚本中的各种校验.\n```\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) \u003cdomain\u003e [netstack] [UUID] [path]\n```\n其中\n\n`domain`      你的域名\n\n`netstask`    6 表示 IPv6入站, 最后会安装WARP获得IPv4出站\n\n`UUID` 你的UUID\n\n`path` 你的path，如果不输入，会从UUID自动生成\n\n例如\n```\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) abc.mydomain.com\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) abccba.ipv6d.my.id 6\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) abccba.ipv6d.my.id 6 486572e1-11d5-4e93-a41d-d4b9775870bd\nbash \u003c(curl -L https://github.com/crazypeace/v2ray_wss/raw/main/install.sh) abccba.ipv6d.my.id 6 486572e1-11d5-4e93-a41d-d4b9775870bd somepath\n```\n\n## 用你的STAR告诉我这个Repo对你有用 Welcome STARs! :)\n\n[![Stargazers over time](https://starchart.cc/crazypeace/v2ray_wss.svg)](https://starchart.cc/crazypeace/v2ray_wss)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazypeace%2Fv2ray_wss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazypeace%2Fv2ray_wss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazypeace%2Fv2ray_wss/lists"}