153 Commits
v2.12 ... v4.18

Author SHA1 Message Date
233boy
3af96ec0bc add (add) command usage tips 2024-02-01 13:16:01 +08:00
233boy
59bc26b457 fix openai err #1227 2023-10-27 08:58:33 +08:00
233boy
61cdfc5bbe fix typo 2023-10-26 21:27:35 +08:00
233boy
51ff04fa02 Merge pull request #1226 from clark233/master
Update README.md
2023-10-26 21:24:26 +08:00
Clark Fan
cad75208d0 Update README.md
Fix typo
2023-10-26 17:53:06 +08:00
233boy
25c14b8520 fix openai block 2023-10-25 21:49:20 +08:00
233boy
463ff482ea fix get ip err 2023-08-08 15:12:44 +08:00
233boy
83d1e045a9 fix jq install; dns check 2023-08-07 12:24:23 +08:00
233boy
67387eb0a1 fix ping host ip type 2023-07-12 20:38:19 +08:00
233boy
5c6f48df83 fix no-auto-tls err 2023-06-29 13:36:54 +08:00
233boy
4771de764d add *TLS protocol change port 2023-06-08 12:06:47 +08:00
233boy
44e340914d fix yum install epel-release 2023-05-29 18:09:16 +08:00
233boy
62433b88f3 URL add aid 0 2023-05-28 11:26:31 +08:00
233boy
b0207515a0 fix api fail and test run 2023-05-27 08:07:12 +08:00
233boy
bf8867cc63 remove qrencode install 2023-05-24 21:36:36 +08:00
233boy
b09b8b5c51 fix config read err 2023-05-23 23:48:34 +08:00
233boy
05e3c685c8 fix old core err; update tips 2023-05-20 13:16:55 +08:00
233boy
bfff42a4a6 fix URL 2023-05-17 17:31:00 +08:00
233boy
ec504a23d3 add socks url and listen string 2023-05-17 13:50:23 +08:00
233boy
07af4a2adc add socks 2023-05-16 18:37:20 +08:00
233boy
61e55aed2f v4 2023-05-14 00:55:46 +08:00
233boy
b8ca53054d prefer ipv4, fix #995 #996 2022-11-10 09:59:57 +08:00
233boy
ab15bf6f7f support ipv6 2022-11-03 20:33:48 +08:00
233boy
166884121f fix caddy link #964 2022-10-15 13:22:56 +08:00
233boy
c92f1a9236 Merge pull request #964 from TheM4hd1/patch-1
Update download-caddy.sh
2022-10-15 13:20:28 +08:00
Mahdi Makhdumi
c8bb84523a Update download-caddy.sh
Fixed link versioning.
2022-10-14 16:46:38 +03:30
233boy
c8583eb601 fix #960 2022-10-14 10:00:21 +08:00
233boy
7dddce121b fix #949 2022-10-06 08:10:25 +08:00
233boy
776d7e6887 add LimitNOFILE 2022-10-05 09:36:53 +08:00
233boy
b4153f2241 fix bug 2022-09-09 14:13:48 +08:00
233boy
abc0500fea fix bug; 2022-09-09 10:22:17 +08:00
233boy
d0a936920f fix v2 ver args err 2022-09-09 00:20:56 +08:00
233boy
7584ebf73a fix new v2-core v5 ver run error 2022-09-09 00:09:05 +08:00
233boy
78213f1f8a del: remove 32bit system support 2022-06-08 14:28:55 +08:00
233boy
fcf613dbee add: show qrcode 2022-06-06 20:17:20 +08:00
233boy
9b158e47fc fix #881 2022-06-03 21:55:24 +08:00
233boy
39193def31 fix: dns 8888 to dns.google 2022-05-26 13:34:30 +08:00
233boy
9c63512887 update: caddy1 to caddy2 2022-05-25 22:19:43 +08:00
233boy
7f76440136 update caddy.service 2022-05-22 15:39:25 +08:00
233boy
7028fbe679 use ping check domain 2022-02-13 14:27:53 +08:00
233boy
ebd4ea926f del invaild opt 2022-02-05 12:13:52 +08:00
233boy
79be7a13d0 fix #822 2022-01-20 20:59:16 +08:00
233boy
f0b3f4395f fix VMessAEAD 2022-01-09 01:53:59 +08:00
233boy
91134794ab fix VMessAEAD 2022-01-08 14:54:03 +08:00
233boy
ba174ff07a fix bug 2022-01-08 14:31:55 +08:00
233boy
956f9aaa61 fix bug 2022-01-04 20:44:23 +08:00
233boy
b319e963de dont auto enable bbr 2021-12-04 21:42:50 +08:00
233boy
c940374011 update dns addr 2021-08-24 10:55:00 +08:00
233boy
e8339d0652 support vless url 2021-05-14 19:01:45 +08:00
233boy
bf04951379 update ss ciphers 2021-04-22 17:40:09 +08:00
233boy
644ea3eb37 fix bug 2020-11-08 22:32:08 +08:00
233boy
e034413047 fix bug 2020-11-08 21:57:35 +08:00
233boy
8e944269f7 add VLESS_WebSocket_TLS 2020-11-08 18:19:44 +08:00
233boy
750dcfc5d6 fix alterid issue 2020-09-15 16:33:44 +08:00
233boy
8b2e5b45c2 alterId set to 0 2020-09-12 12:52:34 +08:00
233boy
db577f8999 fix cannot running 2020-08-30 10:07:02 +08:00
233boy
b916f2865a Merge pull request #637 from jiahaoliang/patch-1
fix for new release structure of v2ray
2020-08-30 10:00:25 +08:00
Jiahao Liang
5b08b49223 fix for new release structure of v2ray 2020-08-18 16:16:25 +08:00
233boy
d6b5f0ab0e fix caddy download link 2020-07-22 17:01:22 +08:00
233boy
f946429fe8 use v2fly releases 2020-06-11 18:24:56 +08:00
233boy
96c4be3001 Merge branch 'master' of github.com:233boy/v2ray 2020-03-24 16:45:41 +08:00
233boy
ed619a6b2c fix v2ray download error! 2020-03-24 16:45:30 +08:00
233boy
929e9d404e Merge pull request #532 from zytomorrow/master
fix: dnsserver失效
2020-03-19 18:49:42 +08:00
zytomorrow
f7f3d4c8fb fix: dnsserver失效 2020-03-19 13:36:34 +08:00
233boy
05b345cce1 tg channel 2020-01-16 17:54:30 +08:00
233boy
dc36df7959 update ver 2020-01-15 21:40:16 +08:00
233boy
0587560602 update config 2020-01-04 12:21:28 +08:00
233boy
1b7042f6f2 update clients dns 2019-12-31 11:53:45 +08:00
233boy
35cc43c045 fix error 2019-12-30 19:10:48 +08:00
233boy
5dd0aac87b support DOH 2019-12-29 19:06:36 +08:00
233boy
5c0193f847 fix caddy.service not found. fix #397 #398 2019-11-12 15:30:54 +08:00
233boy
d568ae0299 update caddy.service 2019-11-11 15:43:31 +08:00
233boy
3a2b81cdf7 fix caddy cannot running. fix #392, fix #392 2019-11-08 14:28:04 +08:00
233boy
af60aac5dd enable sniffing 2019-11-07 10:38:15 +08:00
233boy
5ea36e805e fix domain check bug. 2019-11-01 19:02:04 +08:00
233boy
5ba3d52f78 Merge pull request #384 from zqigolden/fix$domain
Fix a bug when applying ws+tls method
2019-11-01 18:57:57 +08:00
zqigolden
29c99e16b1 Update v2ray.sh 2019-11-01 17:42:30 +08:00
233boy
e01ba62266 fix quic issues #371 2019-11-01 10:14:58 +08:00
233boy
6288fcfbf1 remove random create caddy email 2019-10-29 12:25:09 +08:00
233boy
3c3eb91d7d fix ping not support '-4' option. #367, #370 2019-10-27 19:16:34 +08:00
233boy
344a7becbe only check ipv4 addr, fix #367, fix #370 2019-10-26 22:25:39 +08:00
233boy
97d78c8284 use new caddy.service 2019-10-12 17:31:39 +08:00
233boy
eab685736c update caddy service 2019-10-11 14:14:37 +08:00
233boy
37bd9a1d32 fix bug 2019-09-24 14:34:02 +08:00
233boy
5fbdf86918 ...fix caddy running issue. mdzz 2019-09-24 12:02:45 +08:00
233boy
f5b943f8b7 fix caddy cannot running issue 2019-09-22 10:30:43 +08:00
233boy
ebcbbc2e52 use dnspod public dns 2019-09-12 11:24:31 +08:00
233boy
87340c995e update rules 2019-06-25 19:11:55 +08:00
233boy
6058e148f1 fix bug 2019-06-25 11:42:38 +08:00
233boy
966bf6f733 update dns config 2019-06-25 11:35:11 +08:00
233boy
db4b81048a support padavan v2ray 2019-06-23 22:22:33 +08:00
233boy
f515968ebf fix #249 2019-06-22 10:57:43 +08:00
233boy
dc21125153 close #248 2019-06-20 14:41:54 +08:00
233boy
03a274c72f support ARM cpu. close #248 2019-06-20 14:38:58 +08:00
233boy
aacf1cf7ab update bbr check 2019-06-14 10:22:56 +08:00
233boy
4555f1ad9a fix v2ray command not found 2019-06-14 09:03:15 +08:00
233boy
5c647ffcc3 update caddy service 2019-06-08 10:39:08 +08:00
233boy
e43667561d update domain 2019-05-06 16:04:37 +08:00
233boy
69fb87beaa Merge pull request #193 from Asnxthaony/patch-1
 Optimize install speed
2019-05-06 13:25:25 +08:00
Asnxthaony
c6640f9d02 Optimize install speed 2019-05-04 16:08:56 +08:00
233boy
b6381cabdf fix v2ray client file download and ss qr create 2019-03-12 18:17:12 +08:00
233boy
f4808e2305 fix qrcode fix 2019-03-11 20:47:19 +08:00
233boy
0cdd7be335 fix bug 2019-03-02 16:36:57 +08:00
233boy
6f301cab82 Merge pull request #131 from boypt/masterbr
参数选择分支
2019-02-24 15:53:21 +08:00
BOYPT
c8393caf51 online branch 2019-02-24 15:11:35 +08:00
233boy
9d6febc8b2 update 2019-02-17 23:15:24 +08:00
233boy
e9ab14add2 Update README.md 2019-02-01 19:03:40 +08:00
233boy
1778651394 update link 2019-01-21 23:04:19 +08:00
233boy
077ef7f74e update domain!!! 2019-01-21 22:45:16 +08:00
233boy
cbaf657340 Merge pull request #107 from boypt/patch-1
fix: 如果执行安装前存在/etc/v2ray目录会导致git clone 出错
2019-01-21 14:51:02 +08:00
Preston Ma
9a71576d5e fix: 如果执行安装前存在/etc/v2ray目录会导致git clone 出错
重现方法
```
mkdir -p /etc/v2ray/
cd /etc/v2ray/
bash <(curl -s -L https://233now.com/v2ray.sh)
```
原因:740行的`[ -d /etc/v2ray ] && rm -rf /etc/v2ray`,如果恰好用户在当前这个目录,被删除后git就找不到了..
解决:git clone时候先跳去别的目录,pushd/popd命令就比较合适了。
2019-01-21 11:47:09 +08:00
233boy
141a0fb58d tg proxy secret add "dd" prefix 2019-01-13 15:53:09 +08:00
233boy
b9282f75c1 update domain 2019-01-08 23:27:55 +08:00
233boy
d140b3bc3d fix dynamicPort bugs 2019-01-06 16:22:36 +08:00
233boy
620ec46f5a v3 boom 2019-01-05 16:04:16 +08:00
233boy
3ecb6847e6 centos7 not config iptables 2018-12-16 22:07:15 +08:00
233boy
cee9bb6fb0 fix ip addr issue 2018-12-08 13:32:01 +08:00
233boy
0b7542db23 close #85 2018-12-07 16:29:02 +08:00
233boy
5871d57acb sync time: v2ray time 2018-11-25 11:39:45 +08:00
233boy
b361a420e2 update domain 2018-11-20 15:42:08 +08:00
233boy
7d9cf1a03f fix time issue 2018-11-14 21:38:23 +08:00
233boy
2437f5e4ef use https 2018-11-03 22:04:29 +08:00
233boy
077585ceb4 curl header add no cache 2018-10-12 11:06:55 +08:00
233boy
12043c2a4b update 2018-10-12 11:00:44 +08:00
233boy
2fd7b60265 bug fix 2018-10-12 10:43:37 +08:00
233boy
f7994300c7 update 2018-10-11 21:20:16 +08:00
233boy
2d01747037 update link 2018-10-10 17:05:18 +08:00
233boy
76495c810b update domain name 2018-10-10 17:03:00 +08:00
233boy
f3d3c7635f check git clone status 2018-10-04 13:14:10 +08:00
233boy
19b4aa817b add qr tips 2018-09-19 15:56:44 +08:00
233boy
7ffafe039c update domain name 2018-09-07 12:26:38 +08:00
233boy
31a548defc add daemon 2018-08-31 15:36:21 +08:00
233boy
a6a348b476 [tips] v2ray command not found 2018-08-29 12:51:47 +08:00
233boy
b062531cd3 [fix] v2ray command not found 2018-08-17 17:50:46 +08:00
233boy
ec9a353de1 bug fix 2018-08-11 11:38:42 +08:00
233boy
a3dd64ac8f close #51 2018-07-26 09:33:58 +08:00
233boy
69b5eb60b8 Fix issue #51 2018-07-26 09:27:30 +08:00
233boy
462fe888c6 boring... 2018-06-15 00:00:35 +08:00
233boy
9168af9b0a [fix] base64 disable line wrapping 2018-06-14 23:53:38 +08:00
233boy
d8515991d1 support socks5 2018-05-26 22:45:31 +08:00
233boy
001fd37343 [fix] ss config issues 2018-05-13 14:19:33 +08:00
233boy
276f17a3f1 add ws host 2018-05-07 16:38:22 +08:00
233boy
9383e69aaa update ws_tls config 2018-05-07 14:18:15 +08:00
233boy
f8dd41b947 [fix] host issues 2018-05-06 22:26:20 +08:00
233boy
351cc96c5c [fix] dynamic port issues 2018-05-06 17:46:07 +08:00
233boy
01a3083312 bug fix 2018-05-06 00:10:49 +08:00
233boy
a5a67f68b3 [add] v2ray reinstall 2018-05-05 23:41:26 +08:00
233boy
1268ebbd1e skip cache 2018-05-05 23:29:38 +08:00
233boy
3abdf6aa44 bug fix 2018-05-05 23:16:48 +08:00
233boy
e0be1f6587 update download config filename 2018-05-05 22:42:17 +08:00
233boy
90b5dc024e [fix] h2 path issues 2018-05-05 12:12:06 +08:00
233boy
90a1e2be7c support h2 2018-05-02 21:58:07 +08:00
233boy
18148145ca [fix] download client config issues 2018-04-24 12:03:27 +08:00
57 changed files with 3037 additions and 224019 deletions

View File

@@ -1,3 +0,0 @@
提问之前,请先查阅:[V2Ray 一键安装脚本疑问集合](https://233blog.com/post/27/)
若需要发起提问,请删除这些内容

31
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Main
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: get ver
run: |
echo "$(cat v2ray.sh | grep ver=)" >> $GITHUB_ENV
echo "old=$(git tag | tail -n1)" >> $GITHUB_ENV
# - name: test
# if: env.is_sh_ver == env.old
# run: |
# echo not found new version.
# exit 1
- name: zip
run: zip -9vr code.zip . -x .\*
- name: release
uses: softprops/action-gh-release@v1
with:
files: code.zip
tag_name: ${{ env.is_sh_ver }}

120
README.md
View File

@@ -1,2 +1,120 @@
# v2ray
# 介绍
最好用的 V2Ray 一键安装脚本 &amp; 管理脚本
# 特点
- 快速安装
- 超级好用
- 零学习成本
- 自动化 TLS
- 简化所有流程
- 屏蔽 BT
- 屏蔽中国 IP
- 使用 API 操作
- 兼容 V2Ray 命令
- 强大的快捷参数
- 支持所有常用协议
- 一键添加 Shadowsocks
- 一键添加 VMess-(TCP/mKCP/QUIC)
- 一键添加 VMess-(WS/H2/gRPC)-TLS
- 一键添加 VLESS-(WS/H2/gRPC)-TLS
- 一键添加 Trojan-(WS/H2/gRPC)-TLS
- 一键添加 VMess-(TCP/mKCP/QUIC) 动态端口
- 一键启用 BBR
- 一键更改伪装网站
- 一键更改 (端口/UUID/密码/域名/路径/加密方式/SNI/动态端口/等...)
- 还有更多...
# 设计理念
设计理念为:**高效率,超快速,极易用**
脚本基于作者的自身使用需求,以 **多配置同时运行** 为核心设计
并且专门优化了,添加、更改、查看、删除、这四项常用功能
你只需要一条命令即可完成 添加、更改、查看、删除、等操作
例如,添加一个配置仅需不到 1 秒!瞬间完成添加!其他操作亦是如此!
脚本的参数非常高效率并且超级易用,请掌握参数的使用
# 脚本说明
[V2Ray 一键安装脚本](https://github.com/233boy/v2ray/wiki/V2Ray%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC)
# 搭建教程
[V2Ray搭建详细图文教程](https://github.com/233boy/v2ray/wiki/V2Ray%E6%90%AD%E5%BB%BA%E8%AF%A6%E7%BB%86%E5%9B%BE%E6%96%87%E6%95%99%E7%A8%8B)
# 帮助
使用: `v2ray help`
```
V2Ray script v4.0 by 233boy
Usage: v2ray [options]... [args]...
基本:
v, version 显示当前版本
ip 返回当前主机的 IP
get-port 返回一个可用的端口
一般:
a, add [protocol] [args... | auto] 添加配置
c, change [name] [option] [args... | auto] 更改配置
d, del [name] 删除配置**
i, info [name] 查看配置
qr [name] 二维码信息
url [name] URL 信息
log 查看日志
logerr 查看错误日志
更改:
dp, dynamicport [name] [start | auto] [end] 更改动态端口
full [name] [...] 更改多个参数
id [name] [uuid | auto] 更改 UUID
host [name] [domain] 更改域名
port [name] [port | auto] 更改端口
path [name] [path | auto] 更改路径
passwd [name] [password | auto] 更改密码
type [name] [type | auto] 更改伪装类型
method [name] [method | auto] 更改加密方式
seed [name] [seed | auto] 更改 mKCP seed
new [name] [...] 更改协议
web [name] [domain] 更改伪装网站
进阶:
dd, ddel [name...] 删除多个配置**
fix [name] 修复一个配置
fix-all 修复全部配置
fix-caddyfile 修复 Caddyfile
fix-config.json 修复 config.json
管理:
un, uninstall 卸载
u, update [core | sh | caddy] [ver] 更新
U, update.sh 更新脚本
s, status 运行状态
start, stop, restart [caddy] 启动, 停止, 重启
t, test 测试运行
reinstall 重装脚本
测试:
client, genc [name] 显示用于客户端 JSON, 仅供参考
debug [name] 显示一些 debug 信息, 仅供参考
gen [...] 同等于 add, 但只显示 JSON 内容, 不创建文件, 测试使用
no-auto-tls [...] 同等于 add, 但禁止自动配置 TLS, 可用于 *TLS 相关协议
xapi [...] 同等于 v2ray api, 但 API 后端使用当前运行的 V2Ray 服务
其他:
bbr 启用 BBR, 如果支持
bin [...] 运行 V2Ray 命令, 例如: v2ray bin help
api, convert, tls, run, uuid [...] 兼容 V2Ray 命令
h, help 显示此帮助界面
谨慎使用 del, ddel, 此选项会直接删除配置; 无需确认
反馈问题) https://github.com/233boy/v2ray/issues
文档(doc) https://233boy.com/v2ray/v2ray-script/
```

View File

@@ -1,63 +0,0 @@
# -----------------------------------
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# -----------------------------------
# ---- 再次提醒 ----
# 大胸弟...如果你看到了这个...记得不要修改或更改这个文件
# ---- 说明 ----
# 嗯……这个文件呢,是用来备份一些设置的
# 我懒...不想用 JQ 去解析 JSON....
# 那就把 V2Ray 配置文件的一些重要参数提取出来
# 然后..在修改 V2Ray 配置的时候再重写一下就 OK 啦...
# 嗯…笨笨的方法
# ---- V2Ray 传输协议 -----
v2ray_transport=1
#---- V2Ray 端口 -----
v2ray_port=2333
#---- UUID -----
v2ray_id=23332333-2333-2333-2333-233boy233boy
#---- alterId -----
alterId=233
#---- V2Ray 动态端口开始 -----
v2ray_dynamicPort_start=10000
#---- V2Ray 动态端口结束 -----
v2ray_dynamicPort_end=20000
#---- 域名 -----
domain=233blog.com
#---- caddy -----
caddy_status=
#---- Shadowsocks -----
shadowsocks_status=
#---- Shadowsocks 端口 -----
ssport=6666
#---- Shadowsocks 密码 -----
sspass=233blog.com
#---- Shadowsocks 加密协议 -----
ssciphers=chacha20-ietf
#---- 屏蔽广告 -----
blocked_ad_status=
#---- 网站伪装 -----
ws_path_status=
#---- 伪装的路径 -----
ws_path=233blog
#---- 伪装的网址 -----
proxy_site=https://liyafly.com

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,115 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "h2",
"security": "tls",
"tlsSettings": {
"serverName": "233blog.com",
"allowInsecure": false
},
"httpSettings": {
"path": "/233blog"
}
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1,144 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"request": {
"version": "1.1",
"method": "GET",
"path": [
"/"
],
"headers": {
"Host": [
"www.cloudflare.com",
"www.amazon.com"
],
"User-Agent": [
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
],
"Accept": [
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
],
"Accept-language": [
"zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Cache-Control": [
"no-cache"
],
"Pragma": "no-cache"
}
}
}
}
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1,119 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "kcp",
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none"
}
}
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1,104 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1,107 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "ws"
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1,115 +0,0 @@
{
"log": {
"error": "error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "233blog.com",
"port": 2333,
"users": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"alterId": 233,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"serverName": "233blog.com",
"allowInsecure": false
},
"wsSettings": {
"path": "/233blog"
}
},
"mux": {
"enabled": true
}
},
"inboundDetour": [
{
"port": 6666,
"listen": "127.0.0.1",
"protocol": "http",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

View File

@@ -1 +0,0 @@
## 欢迎 PR 要屏蔽的域名

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# 生成要屏蔽的域名... MVPS HOSTS....
curl "http://winhelp2002.mvps.org/hosts.txt" -o hosts.txt
sed -i '/^#/d; /localhost/d; /^$/d; s/0.0.0.0 //g; s/ //' hosts.txt
sed -i 's/#\(.*\)//g' hosts.txt
sed -i '/^\s*$/d' hosts.txt
sed -i 's/^/"/; s/\s*$/",/' hosts.txt
sed -i '$s/,//' hosts.txt

View File

@@ -1,96 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,154 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,109 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,165 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
},
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-encoding": [
"gzip"
],
"Content-Type": [
"text/html; charset=utf-8"
],
"Cache-Control": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"X-Frame-Options": [
"deny"
],
"X-XSS-Protection": [
"1; mode=block"
],
"X-content-type-options": [
"nosniff"
]
}
}
}
}
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,75 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "kcp",
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none"
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,102 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "kcp"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "kcp"
}
}
],
"transport": {
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none"
}
}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,88 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "kcp",
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none"
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,113 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "kcp"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
},
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "kcp"
}
}
],
"transport": {
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none"
}
}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,60 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,82 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,73 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,93 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
},
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,63 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "ws"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,88 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "ws"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "ws"
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,76 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "ws"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

View File

@@ -1,99 +0,0 @@
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 2333,
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "23332333-2333-2333-2333-233boy233boy",
"level": 1,
"alterId": 233
}
],
"detour": {
"to": "dynamic"
}
},
"streamSettings": {
"network": "ws"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": 6666,
"settings": {
"method": "chacha20-ietf",
"password": "233blog.com",
"udp": true,
"level": 1,
"ota": false
}
},
{
"protocol": "vmess",
"port": "10000-20000",
"tag": "dynamic",
"settings": {
"udp": true,
"default": {
"level": 1,
"alterId": 32
}
},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "ws"
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

2463
install.sh

File diff suppressed because it is too large Load Diff

20
src/bbr.sh Normal file
View File

@@ -0,0 +1,20 @@
_open_bbr() {
sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control = bbr" >>/etc/sysctl.conf
echo "net.core.default_qdisc = fq" >>/etc/sysctl.conf
sysctl -p &>/dev/null
echo
_green "..已经启用 BBR 优化...."
echo
}
_try_enable_bbr() {
local _test1=$(uname -r | cut -d\. -f1)
local _test2=$(uname -r | cut -d\. -f2)
if [[ $_test1 -eq 4 && $_test2 -ge 9 ]] || [[ $_test1 -ge 5 ]]; then
_open_bbr
else
err "不支持启用 BBR 优化."
fi
}

51
src/caddy.sh Normal file
View File

@@ -0,0 +1,51 @@
caddy_config() {
is_caddy_site_file=$is_caddy_conf/${host}.conf
case $1 in
new)
mkdir -p $is_caddy_dir $is_caddy_dir/sites $is_caddy_conf
cat >$is_caddyfile <<-EOF
# don't edit this file #
# for more info, see https://233boy.com/$is_core/caddy-auto-tls/
# 不要编辑这个文件 #
# 更多相关请阅读此文章: https://233boy.com/$is_core/caddy-auto-tls/
# https://caddyserver.com/docs/caddyfile/options
{
admin off
}
import $is_caddy_conf/*.conf
import $is_caddy_dir/sites/*.conf
EOF
;;
*ws*)
cat >${is_caddy_site_file} <<<"
${host}:${tlsport} {
reverse_proxy ${path} 127.0.0.1:${port}
import ${is_caddy_site_file}.add
}"
;;
*h2*)
cat >${is_caddy_site_file} <<<"
${host}:${tlsport} {
reverse_proxy ${path} h2c://127.0.0.1:${port}
import ${is_caddy_site_file}.add
}"
;;
*grpc*)
cat >${is_caddy_site_file} <<<"
${host}:${tlsport} {
reverse_proxy /${path}/* h2c://127.0.0.1:${port}
import ${is_caddy_site_file}.add
}"
;;
proxy)
cat >${is_caddy_site_file}.add <<<"
reverse_proxy https://$proxy_site {
header_up Host {upstream_hostport}
}"
;;
esac
[[ $1 != "new" && $1 != 'proxy' ]] && {
[[ ! -f ${is_caddy_site_file}.add ]] && echo "# see https://233boy.com/$is_core/caddy-auto-tls/" >${is_caddy_site_file}.add
}
}

1892
src/core.sh Normal file

File diff suppressed because it is too large Load Diff

71
src/download.sh Normal file
View File

@@ -0,0 +1,71 @@
get_latest_version() {
case $1 in
core)
name=$is_core_name
url="https://api.github.com/repos/${is_core_repo}/releases/latest?v=$RANDOM"
;;
sh)
name="$is_core_name 脚本"
url="https://api.github.com/repos/$is_sh_repo/releases/latest?v=$RANDOM"
;;
caddy)
name="Caddy"
url="https://api.github.com/repos/$is_caddy_repo/releases/latest?v=$RANDOM"
;;
esac
latest_ver=$(_wget -qO- $url | grep tag_name | egrep -o 'v([0-9.]+)')
[[ ! $latest_ver ]] && {
err "获取 ${name} 最新版本失败."
}
unset name url
}
download() {
latest_ver=$2
[[ ! $latest_ver ]] && get_latest_version $1
# tmp dir
tmpdir=$(mktemp -u)
[[ ! $tmpdir ]] && {
tmpdir=/tmp/tmp-$RANDOM
}
mkdir -p $tmpdir
case $1 in
core)
name=$is_core_name
tmpfile=$tmpdir/$is_core.zip
link="https://github.com/${is_core_repo}/releases/download/${latest_ver}/${is_core}-linux-${is_core_arch}.zip"
download_file
unzip -qo $tmpfile -d $is_core_dir/bin
chmod +x $is_core_bin
;;
sh)
name="$is_core_name 脚本"
tmpfile=$tmpdir/sh.zip
link="https://github.com/${is_sh_repo}/releases/download/${latest_ver}/code.zip"
download_file
unzip -qo $tmpfile -d $is_sh_dir
chmod +x $is_sh_bin
;;
caddy)
name="Caddy"
tmpfile=$tmpdir/caddy.tar.gz
# https://github.com/caddyserver/caddy/releases/download/v2.6.4/caddy_2.6.4_linux_amd64.tar.gz
link="https://github.com/${is_caddy_repo}/releases/download/${latest_ver}/caddy_${latest_ver:1}_linux_${caddy_arch}.tar.gz"
download_file
[[ ! $(type -P tar) ]] && {
rm -rf $tmpdir
err "请安装 tar"
}
tar zxf $tmpfile -C $tmpdir
cp -f $tmpdir/caddy $is_caddy_bin
chmod +x $is_caddy_bin
;;
esac
rm -rf $tmpdir
unset latest_ver
}
download_file() {
if ! _wget -t 5 -c $link -O $tmpfile; then
rm -rf $tmpdir
err "\n下载 ${name} 失败.\n"
fi
}

92
src/help.sh Normal file
View File

@@ -0,0 +1,92 @@
show_help() {
case $1 in
api | convert | tls | run | uuid | version)
$is_core_bin help $1 ${@:2}
;;
*)
[[ $1 ]] && warn "未知选项 '$1'"
msg "$is_core_name script $is_sh_ver by $author"
msg "Usage: $is_core [options]... [args]... "
msg
help_info=(
"基本:"
" v, version 显示当前版本"
" ip 返回当前主机的 IP"
# " pbk 同等于 $is_core x25519"
" get-port 返回一个可用的端口\n"
# " ss2022 返回一个可用于 Shadowsocks 2022 的密码\n"
"一般:"
" a, add [protocol] [args... | auto] 添加配置"
" c, change [name] [option] [args... | auto] 更改配置"
" d, del [name] 删除配置**"
" i, info [name] 查看配置"
" qr [name] 二维码信息"
" url [name] URL 信息"
" log 查看日志"
" logerr 查看错误日志\n"
"更改:"
" dp, dynamicport [name] [start | auto] [end] 更改动态端口"
" full [name] [...] 更改多个参数"
" id [name] [uuid | auto] 更改 UUID"
" host [name] [domain] 更改域名"
" port [name] [port | auto] 更改端口"
" path [name] [path | auto] 更改路径"
" passwd [name] [password | auto] 更改密码"
# " key [name] [Private key | atuo] [Public key] 更改密钥"
" type [name] [type | auto] 更改伪装类型"
" method [name] [method | auto] 更改加密方式"
# " sni [name] [ ip | domain] 更改 serverName"
" seed [name] [seed | auto] 更改 mKCP seed"
" new [name] [...] 更改协议"
" web [name] [domain] 更改伪装网站\n"
"进阶:"
" dd, ddel [name...] 删除多个配置**"
" fix [name] 修复一个配置"
" fix-all 修复全部配置"
" fix-caddyfile 修复 Caddyfile"
" fix-config.json 修复 config.json\n"
"管理:"
" un, uninstall 卸载"
" u, update [core | sh | caddy] [ver] 更新"
" U, update.sh 更新脚本"
" s, status 运行状态"
" start, stop, restart [caddy] 启动, 停止, 重启"
" t, test 测试运行"
" reinstall 重装脚本\n"
"测试:"
" client, genc [name] 显示用于客户端 JSON, 仅供参考"
" debug [name] 显示一些 debug 信息, 仅供参考"
" gen [...] 同等于 add, 但只显示 JSON 内容, 不创建文件, 测试使用"
" no-auto-tls [...] 同等于 add, 但禁止自动配置 TLS, 可用于 *TLS 相关协议"
" xapi [...] 同等于 $is_core api, 但 API 后端使用当前运行的 $is_core_name 服务\n"
"其他:"
" bbr 启用 BBR, 如果支持"
" bin [...] 运行 $is_core_name 命令, 例如: $is_core bin help"
" api, convert, tls, run, uuid [...] 兼容 $is_core_name 命令"
" h, help 显示此帮助界面\n"
)
for v in "${help_info[@]}"; do
msg "$v"
done
msg "谨慎使用 del, ddel, 此选项会直接删除配置; 无需确认"
msg "反馈问题) $(msg_ul https://github.com/${is_sh_repo}/issues) "
msg "文档(doc) $(msg_ul https://233boy.com/$is_core/$is_core-script/)"
;;
esac
}
about() {
####### 要点13脸吗只会改我链接的小人 #######
unset c n m s b
msg
msg "网站: $(msg_ul https://233boy.com)"
msg "频道: $(msg_ul https://t.me/tg2333)"
msg "群组: $(msg_ul https://t.me/tg233boy)"
msg "Github: $(msg_ul https://github.com/${is_sh_repo})"
msg "Twitter: $(msg_ul https://twitter.com/ai233boy)"
msg "$is_core_name site: $(msg_ul https://www.v2fly.org)"
msg "$is_core_name core: $(msg_ul https://github.com/${is_core_repo})"
msg
####### 要点13脸吗只会改我链接的小人 #######
}

142
src/init.sh Normal file
View File

@@ -0,0 +1,142 @@
#!/bin/bash
author=233boy
# github=https://github.com/233boy/v2ray
# bash fonts colors
red='\e[31m'
yellow='\e[33m'
gray='\e[90m'
green='\e[92m'
blue='\e[94m'
magenta='\e[95m'
cyan='\e[96m'
none='\e[0m'
_red() { echo -e ${red}$@${none}; }
_blue() { echo -e ${blue}$@${none}; }
_cyan() { echo -e ${cyan}$@${none}; }
_green() { echo -e ${green}$@${none}; }
_yellow() { echo -e ${yellow}$@${none}; }
_magenta() { echo -e ${magenta}$@${none}; }
_red_bg() { echo -e "\e[41m$@${none}"; }
_rm() {
rm -rf "$@"
}
_cp() {
cp -rf "$@"
}
_sed() {
sed -i "$@"
}
_mkdir() {
mkdir -p "$@"
}
is_err=$(_red_bg 错误!)
is_warn=$(_red_bg 警告!)
err() {
echo -e "\n$is_err $@\n"
[[ $is_dont_auto_exit ]] && return
exit 1
}
warn() {
echo -e "\n$is_warn $@\n"
}
# yum or apt-get
cmd=$(type -P apt-get || type -P yum)
# x64
case $(arch) in
amd64 | x86_64)
is_core_arch="64"
caddy_arch="amd64"
;;
*aarch64* | *armv8*)
is_core_arch="arm64-v8a"
caddy_arch="arm64"
;;
*)
err "此脚本仅支持 64 位系统..."
;;
esac
is_core=v2ray
is_core_name=V2Ray
is_core_dir=/etc/$is_core
is_core_bin=$is_core_dir/bin/$is_core
is_core_repo=v2fly/$is_core-core
is_conf_dir=$is_core_dir/conf
is_log_dir=/var/log/$is_core
is_sh_bin=/usr/local/bin/$is_core
is_sh_dir=$is_core_dir/sh
is_sh_repo=$author/$is_core
is_pkg="wget unzip jq qrencode"
is_config_json=$is_core_dir/config.json
is_caddy_bin=/usr/local/bin/caddy
is_caddy_dir=/etc/caddy
is_caddy_repo=caddyserver/caddy
is_caddyfile=$is_caddy_dir/Caddyfile
is_caddy_conf=$is_caddy_dir/$author
is_caddy_service=$(systemctl list-units --full -all | grep caddy.service)
tlsport=443
# core ver
is_core_ver=$($is_core_bin version | head -n1 | cut -d " " -f1-2)
if [[ $(grep -o ^[0-9] <<<${is_core_ver#* }) -lt 5 ]]; then
# core version less than 5, e.g, v4.45.2
is_core_ver_lt_5=1
if [[ $(grep 'run -config' /lib/systemd/system/v2ray.service) ]]; then
sed -i 's/run //' /lib/systemd/system/v2ray.service
systemctl daemon-reload
fi
else
is_with_run_arg=run
if [[ ! $(grep 'run -config' /lib/systemd/system/v2ray.service) ]]; then
sed -i 's/-config/run -config/' /lib/systemd/system/v2ray.service
systemctl daemon-reload
fi
fi
if [[ $(pgrep -f $is_core_bin) ]]; then
is_core_status=$(_green running)
else
is_core_status=$(_red_bg stopped)
is_core_stop=1
fi
if [[ -f $is_caddy_bin && -d $is_caddy_dir && $is_caddy_service ]]; then
is_caddy=1
is_caddy_ver=$($is_caddy_bin version | head -n1 | cut -d " " -f1)
if [[ $(pgrep -f $is_caddy_bin) ]]; then
is_caddy_status=$(_green running)
else
is_caddy_status=$(_red_bg stopped)
is_caddy_stop=1
fi
fi
# load bash script.
load() {
. $is_sh_dir/src/$1
}
# wget add --no-check-certificate
_wget() {
# [[ $proxy ]] && export https_proxy=$proxy
wget --no-check-certificate "$@"
}
load core.sh
# old sh ver
is_old_dir=/etc/v2ray/233boy
is_old_conf=/etc/v2ray/233blog_v2ray_backup.conf
if [[ -f $is_old_conf && -d $is_old_dir ]]; then
load old.sh
fi
[[ ! $args ]] && args=main
main $args

140
src/old.sh Normal file
View File

@@ -0,0 +1,140 @@
is_old_list=(
TCP
TCP_HTTP
WebSocket
"WebSocket + TLS"
HTTP/2
mKCP
mKCP_utp
mKCP_srtp
mKCP_wechat-video
mKCP_dtls
mKCP_wireguard
QUIC
QUIC_utp
QUIC_srtp
QUIC_wechat-video
QUIC_dtls
QUIC_wireguard
TCP_dynamicPort
TCP_HTTP_dynamicPort
WebSocket_dynamicPort
mKCP_dynamicPort
mKCP_utp_dynamicPort
mKCP_srtp_dynamicPort
mKCP_wechat-video_dynamicPort
mKCP_dtls_dynamicPort
mKCP_wireguard_dynamicPort
QUIC_dynamicPort
QUIC_utp_dynamicPort
QUIC_srtp_dynamicPort
QUIC_wechat-video_dynamicPort
QUIC_dtls_dynamicPort
QUIC_wireguard_dynamicPort
VLESS_WebSocket_TLS
)
# del old file
del_old_file() {
# old sh bin
_v2ray_sh="/usr/local/sbin/v2ray"
rm -rf $_v2ray_sh $is_old_conf $is_old_dir $is_core_dir/233blog_v2ray_config.json /usr/bin/v2ray
# del alias
sed -i "#$_v2ray_sh#d" /root/.bashrc
exit
}
# read old config
. $is_old_conf
is_old=${is_old_list[$v2ray_transport - 1]}
case $v2ray_transport in
3 | 20)
is_old_use=
;;
4)
is_old_use=ws
;;
5)
is_old_use=h2
;;
33)
is_old_use=vws
;;
*)
is_test_old_use=($(sed 's/_dynamicPort//;s/_/ /' <<<$is_old))
is_old_use=${is_test_old_use[0]#m}
is_old_header_type=${is_test_old_use[1]}
[[ ! $is_old_header_type ]] && is_old_header_type=none
;;
esac
if [[ $is_old_use && ! $is_old_header_type ]]; then
# not use caddy auto tls
[[ ! $caddy ]] && is_old_use=
fi
# add old config
if [[ $is_old_use ]]; then
is_tmp_list=("删除旧配置" "恢复: $is_old")
ask list is_do_upgrade null "\n是否恢复旧配置:\n"
[[ $REPLY == '1' ]] && {
_green "\n删除完成!\n"
del_old_file
}
_green "\n开始恢复...\n"
# upgrade caddy
if [[ $caddy ]]; then
get install-caddy
# bak caddy files
mv -f $is_caddyfile $is_caddyfile.233.bak
mv -f $is_caddy_dir/sites $is_caddy_dir/sites.233.bak
load caddy.sh
caddy_config new
fi
is_change=1
is_dont_auto_exit=1
is_dont_show_info=1
if [[ $shadowsocks ]]; then
for v in ${ss_method_list[@]}; do
[[ $(egrep -i "^${ssciphers}$" <<<$v) ]] && ss_method=$v && break
done
if [[ $ss_method ]]; then
add ss $ssport $sspass $ss_method
fi
fi
if [[ $socks ]]; then
add socks $socks_port $socks_username $socks_userpass
fi
port=$v2ray_port
uuid=$v2ray_id
is_no_kcp_seed=1
header_type=$is_old_header_type
[[ $caddy ]] && host=$domain
path=/$path
[[ ! $path_status ]] && path=
if [[ $(grep dynamic <<<$is_old) ]]; then
is_dynamic_port=1
is_dynamic_port_range="$v2ray_dynamicPort_start-$v2ray_dynamicPort_end"
add ${is_old_use}d
else
add $is_old_use
fi
if [[ $path_status ]]; then
change $is_config_name web $proxy_site
fi
is_dont_auto_exit=
is_dont_show_info=
[[ $is_api_fail ]] && manage restart &
[[ $caddy ]] && manage restart caddy
info $is_config_name
else
ask string y "是否删除旧配置? [y]:"
_green "\n删除完成!\n"
fi
del_old_file

59
src/systemd.sh Normal file
View File

@@ -0,0 +1,59 @@
install_service() {
case $1 in
xray | v2ray)
is_doc_site=https://xtls.github.io/
[[ $1 == 'v2ray' ]] && is_doc_site=https://www.v2fly.org/
cat >/lib/systemd/system/$is_core.service <<<"
[Unit]
Description=$is_core_name Service
Documentation=$is_doc_site
After=network.target nss-lookup.target
[Service]
#User=nobody
User=root
NoNewPrivileges=true
ExecStart=$is_core_bin run -config $is_config_json -confdir $is_conf_dir
Restart=on-failure
RestartPreventExitStatus=23
LimitNPROC=10000
LimitNOFILE=1048576
PrivateTmp=true
ProtectSystem=full
#CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target"
;;
caddy)
cat >/lib/systemd/system/caddy.service <<<"
#https://github.com/caddyserver/dist/blob/master/init/caddy.service
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target
[Service]
Type=notify
User=root
Group=root
ExecStart=$is_caddy_bin run --environ --config $is_caddyfile
ExecReload=$is_caddy_bin reload --config $is_caddyfile
TimeoutStopSec=5s
LimitNPROC=10000
LimitNOFILE=1048576
PrivateTmp=true
ProtectSystem=full
#AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target"
;;
esac
# enable, reload
systemctl enable $1
systemctl daemon-reload
}

View File

@@ -1,75 +0,0 @@
#!/bin/bash
uuid=$(cat /proc/sys/kernel/random/uuid)
cat >/etc/v2ray/233blog_v2ray_backup.conf.tmp <<-EOF
# -----------------------------------
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# -----------------------------------
# ---- 再次提醒 ----
# 大胸弟...如果你看到了这个...记得不要修改或更改这个文件
# ---- 说明 ----
# 嗯……这个文件呢,是用来备份一些设置的
# 我懒...不想用 JQ 去解析 JSON....
# 那就把 V2Ray 配置文件的一些重要参数提取出来
# 然后..在修改 V2Ray 配置的时候再重写一下就 OK 啦...
# 嗯…笨笨的方法
# ---- V2Ray 传输协议 -----
v2ray_transport=$v2ray_transport
#---- V2Ray 端口 -----
v2ray_port=$v2ray_port
#---- UUID -----
v2ray_id=$uuid
#---- alterId -----
alterId=233
#---- V2Ray 动态端口开始 -----
v2ray_dynamicPort_start=$v2ray_dynamicPort_start
#---- V2Ray 动态端口结束 -----
v2ray_dynamicPort_end=$v2ray_dynamicPort_end
#---- 域名 -----
domain=$domain
#---- caddy -----
caddy_status=$caddy_installed
#---- Shadowsocks -----
shadowsocks_status=$shadowsocks
#---- Shadowsocks 端口 -----
ssport=$ssport
#---- Shadowsocks 密码 -----
sspass=$sspass
#---- Shadowsocks 加密协议 -----
ssciphers=$ssciphers
#---- 屏蔽广告 -----
blocked_ad_status=$is_blocked_ad
#---- 网站伪装 -----
ws_path_status=$is_ws_path
#---- 伪装的路径 -----
ws_path=$ws_path
#---- 伪装的网址 -----
proxy_site=$proxy_site
EOF
rm -rf $backup
mv -f /etc/v2ray/233blog_v2ray_backup.conf.tmp /etc/v2ray/233blog_v2ray_backup.conf
echo
echo -e " .... 哇哦.. .."
echo
echo -e " 请使用命令$yellow v2ray reload $none重新加载配置...以避免发生莫名其妙的问题"
echo
exit 1

View File

@@ -1,104 +0,0 @@
#!/bin/bash
backup="/etc/v2ray/233blog_v2ray_backup.txt"
v2ray_transport=$(sed -n '17p' $backup)
v2ray_port=$(sed -n '19p' $backup)
v2ray_id=$(sed -n '21p' $backup)
v2ray_dynamicPort_start=$(sed -n '23p' $backup)
v2ray_dynamicPort_end=$(sed -n '25p' $backup)
domain=$(sed -n '27p' $backup)
caddy_status=$(sed -n '29p' $backup)
shadowsocks_status=$(sed -n '31p' $backup)
ssport=$(sed -n '33p' $backup)
sspass=$(sed -n '35p' $backup)
ssciphers=$(sed -n '37p' $backup)
blocked_ad_status=$(sed -n '39p' $backup)
ws_path_status=$(sed -n '41p' $backup)
ws_path=$(sed -n '43p' $backup)
proxy_site=$(sed '$!d' $backup)
if [[ $caddy_status == "true" ]]; then
caddy_installed=true
fi
if [[ $shadowsocks_status == "true" ]]; then
shadowsocks=true
fi
if [[ $blocked_ad_status == "true" ]]; then
is_blocked_ad=true
fi
if [[ $ws_path_status == "true" ]]; then
is_ws_path=true
fi
cat >/etc/v2ray/233blog_v2ray_backup.conf <<-EOF
# -----------------------------------
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# 警告...请不要修改或删除这个文件...谢谢
# -----------------------------------
# ---- 再次提醒 ----
# 大胸弟...如果你看到了这个...记得不要修改或更改这个文件
# ---- 说明 ----
# 嗯……这个文件呢,是用来备份一些设置的
# 我懒...不想用 JQ 去解析 JSON....
# 那就把 V2Ray 配置文件的一些重要参数提取出来
# 然后..在修改 V2Ray 配置的时候再重写一下就 OK 啦...
# 嗯…笨笨的方法
# ---- V2Ray 传输协议 -----
v2ray_transport=$v2ray_transport
#---- V2Ray 端口 -----
v2ray_port=$v2ray_port
#---- UUID -----
v2ray_id=$v2ray_id
#---- alterId -----
alterId=233
#---- V2Ray 动态端口开始 -----
v2ray_dynamicPort_start=$v2ray_dynamicPort_start
#---- V2Ray 动态端口结束 -----
v2ray_dynamicPort_end=$v2ray_dynamicPort_end
#---- 域名 -----
domain=$domain
#---- caddy -----
caddy_status=$caddy_installed
#---- Shadowsocks -----
shadowsocks_status=$shadowsocks
#---- Shadowsocks 端口 -----
ssport=$ssport
#---- Shadowsocks 密码 -----
sspass=$sspass
#---- Shadowsocks 加密协议 -----
ssciphers=$ssciphers
#---- 屏蔽广告 -----
blocked_ad_status=$is_blocked_ad
#---- 网站伪装 -----
ws_path_status=$is_ws_path
#---- 伪装的路径 -----
ws_path=$ws_path
#---- 伪装的网址 -----
proxy_site=$proxy_site
EOF
cp -f /etc/v2ray/233boy/v2ray/v2ray.sh /usr/local/bin/v2ray
chmod +x /usr/local/bin/v2ray
rm -rf $backup
echo
echo -e " 哇哦.. 由于大佬你是从 1.xx 升级到 2.xx 管理脚本的.."
echo
echo -e " 请使用命令$yellow v2ray reload $none重新加载配置...以避免发生莫名其妙的问题"
echo
exit 1

File diff suppressed because it is too large Load Diff

3838
v2ray.sh

File diff suppressed because it is too large Load Diff