Git Product home page Git Product logo

v2ray-openwrt's Introduction

目录

关于 v2ray-openwrt

本文为在路由器 openwrt 中使用 v2ray 的简单流程,相关的配置说明请参考官方文档。

如果你有类似 k2p 这种可以刷 padavan 固件的路由器,也可以自己打造一款科学上网神器。

想买路由?换路由?这里有一份秘籍可供参考

前段时间 v2ray 新增了 xtls 协议,性能大幅提升,但是从 4.33 开始由于某些原因又全面移除了该协议。

现在 xray 独立发布了,对于性能有要求的小伙伴可以前去体验 xtls 的效果。

xray 更新加入了 gRPC 协议,点击下面了解一下?

xray 新协议 gRPC 使用体验,性能优异,未来或可全面替代 ws

为了方便小伙伴们,这里给出参考配置文件:

注意替换 == 包含的内容为你自己的配置,路由部分使用自定义的 site 文件,支持 gw 上网及各种广告过滤。

此方案相对简单,适合对性能要求不高,只要能正常爬网即可的情况使用,有更高要求的请看下面的方案。

优化方案 v2ray-dnsmasq-dnscrypt

如果 v2ray 一站式服务的方式不能满足你的需求,或者遇到了性能瓶颈(下载慢),可以试试另外一种优化方案:

高速方案 openwrt-raspberry

使用树莓派 4B 安装 openwrt 配置独立服务 trojan/v2ray,千兆高速解决方案,更高!更快!更强!性价比超软路由!

安装方式

自行构建 ipk 安装包

看到小伙伴有这个想法,花了点时间,弄了个脚本,可以自行构建 ipk 包,方便到 openwrt 中安装

先克隆项目到某个 linux 环境下,windows 的 wsl 未做测试,理论上应该也可以

git clone https://github.com/felix-fly/v2ray-openwrt.git

进入项目目录,运行脚本,参数为 CPU 平台,版本不指定默认为最新版

./package.sh amd64

生成的 ipk 包在当前路径下,形如 v2ray-xxx.ipk

路由安装后需要自行修改配置文件

/etc/v2ray/config.json

对路由操作不熟悉的可以在打包前先修改

./package/data/etc/v2ray/config.json

需要使用 v2ray 路由策略也可以自行在此路径下加入 site.dat 等文件

可选的平台参数:

  • 386
  • amd64
  • armv5
  • armv6
  • armv7
  • arm64
  • mips
  • mipsle
  • mips64
  • mips64le

脚本安装(路由)

路由器 CPU 平台请自行查询确认,可选的平台参数同上

ssh 登陆到路由器执行脚本,注意替换平台名称,路由器需联网及已安装 wget。

wget https://raw.githubusercontent.com/felix-fly/v2ray-openwrt/master/install.sh
chmod +x install.sh
./install.sh 386

安装过程中需输入 server 域名及用户 id,对于 FPU 选项,如果 CPU 不支持硬件浮点计算,则需要开启 FPU。

脚本默认的 v2ray 版本可能不是最新,安装时可以手动输入当前最新版本。

手动安装方式(电脑)

下载 v2ray

release页面提供了各平台下的 v2ray 执行文件,可以直接下载使用。

默认已经过 upx 压缩,不支持压缩的保持不变。压缩包中仅包含 v2ray 执行文件,因为已经编译支持了 json 配置文件,运行不需要 v2ctl。

上传软件及客户端配置文件

mkdir /etc/config/v2ray
cd /etc/config/v2ray
# 上传v2ray、config.json文件到该目录下,配置文件根据个人需求修改
chmod +x v2ray

添加服务

vi /etc/config/v2ray/v2ray.service

贴入以下内容保存退出

#!/bin/sh /etc/rc.common
# "new(er)" style init script
# Look at /lib/functions/service.sh on a running system for explanations of what other SERVICE_
# options you can use, and when you might want them.

START=80
ROOT=/etc/config/v2ray
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1

start() {
  service_start $ROOT/v2ray
}

stop() {
  service_stop $ROOT/v2ray
}

服务自启动

chmod +x /etc/config/v2ray/v2ray.service
cp /etc/config/v2ray/v2ray.service /etc/init.d/v2ray
/etc/init.d/v2ray enable

开启

/etc/init.d/v2ray start

关闭

/etc/init.d/v2ray stop

配置透明代理(可选)

使用 iptables 实现,当前系统是否支持请先自行验证。开启UDP需要 iptables-mod-tproxy 模块,请确保已经安装好。

以下为 iptables 规则,直接在 ssh 中运行可以工作,但是路由重启后会失效,可以在 luci-网络-防火墙-自定义规则 下添加,如果当前系统没有该配置,可以使用开机自定义脚本实现,详情请咨询度娘。

规则中局域网的 ip 段(192.168.1.0)和 v2ray 监听的端口(12345)请结合实际情况修改。

# Only TCP
iptables -t nat -N V2RAY
iptables -t nat -A V2RAY -d 0.0.0.0 -j RETURN
iptables -t nat -A V2RAY -d 127.0.0.0 -j RETURN
iptables -t nat -A V2RAY -d 192.168.1.0/24 -j RETURN
# From lans redirect to Dokodemo-door's local port
iptables -t nat -A V2RAY -s 192.168.1.0/24 -p tcp -j REDIRECT --to-ports 12345
iptables -t nat -A PREROUTING -p tcp -j V2RAY
# With UDP support
ip rule add fwmark 1 table 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N V2RAY
iptables -t mangle -A V2RAY -d 0.0.0.0 -j RETURN
iptables -t mangle -A V2RAY -d 127.0.0.0 -j RETURN
iptables -t mangle -A V2RAY -d 192.168.1.0/24 -j RETURN
# From lans redirect to Dokodemo-door's local port
iptables -t mangle -A V2RAY -p tcp -s 192.168.1.0/24 -j TPROXY --on-port 12345 --tproxy-mark 1
iptables -t mangle -A V2RAY -p udp -s 192.168.1.0/24 -j TPROXY --on-port 12345 --tproxy-mark 1
iptables -t mangle -A PREROUTING -j V2RAY

尾声

v2ray 一直在变化,现在已经将 json 解析默认内置了,之前的内容已经没有意义,故清理掉了,喜欢自行编译的小伙伴继续慢慢折腾。。。

更新记录

2021-03-18

  • 增加 xray gRPC 协议的链接

2020-12-23

  • 添加目录
  • 整理文案

2020-12-22

  • 增加ipk打包脚本

2020-12-08

  • 增加xray链接

2020-11-23

  • 回退使用tls协议

2020-11-16

  • 修改脚本使用新配置文件
  • 脚本增加版本自定义

2020-11-13

  • 使用xtls协议
  • 优化文案

2020-07-08

  • 增加server配置说明
  • 优化文案

2020-06-09

  • 添加树莓派4b方案链接

2020-02-17

  • 增加了安装脚本

2019-12-21

  • 添加了自动build的action

2019-12-06

  • 增加UDP

2019-10-16

  • 使用最新代码编译 4.20.0
  • 简化流程
  • 增加了服务端配置样例

2019-07-02

  • 4.19.1

2019-05-31

  • linux各平台编译好的文件可在release下载

2019-05-21

  • 代码迁移至码云,修正链接地址

2019-03-13

  • 增加了内置json处理的相关说明

2019-03-12

  • 更新v2ray到4.18
  • 增加压缩流程

2018-12-10

  • 增加了客户端配置样例,方便使用

2018-11-03

  • 修改文件路径到/etc/config下,更新固件理论上应该可以保留,待测试

v2ray-openwrt's People

Contributors

felix-fly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v2ray-openwrt's Issues

树莓派3B+用什么版本V2RAY?

CPU是Broadcom BCM2837,经查询是ARM Cortex-A53 64位 (ARMv8系列) 1.2GHz (四核心) 。
没看见有V8的安装包,我可以尝试V7的安装包吗?

脚本问题疑问

platform="$1"
all=",386,amd64,armv5,armv6,armv7,arm64,mips,mipsle,mips64,mips64le,ppc64,ppc64le,s390x,"
result=$(echo $all | grep ",${platform},")
if [[ "$result" != "" ]]
then
echo "Your router platform: $platform"
else
echo "Unknown platform: $platform"
exit
fi

这里为什么不写成uname -m
platform=uname -a
让系统自动来判断架构?

V2ray_softloader有什么用

tar看到两个文件,有什么区别吗?我看install.sh安装脚本问是否开启FPU Support?FPU是浮点处理单元?那么开不开,性能有区别吗?

xtls好像要另外分出来

这礼拜xtls的作者好像要另外发布新的工具。
速度预期会比现在的v2ray/xtls/vless快。

如果原生不能支援Openwrt的话,跪求大佬帮忙发布Openwrt的版本。

感激

Error Invalid User

I got the following error:

2022/01/09 00:21:06 147.35.120.235:53890 rejected common/drain: common/drain: unable to drain connection > websocket: close 1006 (abnormal closure): unexpected EOF > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.

I found the solution is to edit the file: /etc/systemd/system/v2ray.service
But I don't know where the file v2ray.service is in openwrt?

v2ray_softfloat failed to start but v2ray_softfloat_json works well

./v2ray_softfloat -config=config.pb -format=pb -test
V2Ray 4.19 (Po) Custom
A unified platform for anti-censorship.
main: failed to create server > Serial: Unknown type: v2ray.core.proxy.dokodemo.Config

./v2ray_softfloat_json -config=config.pb -format=pb -test
V2Ray 4.19 (Po) Custom
A unified platform for anti-censorship.
Configuration OK.

hardware information:
主机型号 Phicomm PSG1208
架构 MediaTek MT7620A ver:2 eco:6
固件版本 OpenWrt 18.06.2 r7676-cddd7b4c77 / LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d)
内核版本 4.14.95

编译出错

pkg/mod/github.com/lucas-clemente/[email protected]/internal/qtls/qtls.go:79:25: cannot convert cert (type *tls.Certificate) to type *qtls.Certificate

mipsle的版本4.22.1開始無法執行(4.21.3前版本可以)

我的路由器是Newifi mini Y1,CPU‎: ‎MediaTek MT7620A。
用Openwrt官網的19.07.02。
https://downloads.openwrt.org/releases/19.07.2/targets/ramips/mt7620/

剛剛測試4.23.1、4.22.1,都會出現下面錯誤訊息。然後跑4.21.3、4.20.0、4.19.1都可正常執行。
都是跑softfloat的程式。

V2Ray 4.23.1 (user) 20200330-095530 (go1.14 linux/mipsle)
A unified platform for anti-censorship.
2020/05/04 03:45:05 Using config from env: /etc/config/v2ray/config.json
2020/05/04 03:45:05 [Info] v2ray.com/core/main/jsonem: Reading config: /etc/config/v2ray/config.json
SIGILL: illegal instruction
PC=0x89d60 m=0 sigcode=128

goroutine 1 [running]:
runtime.asyncPreempt()
/usr/local/go/src/runtime/preempt_mipsx.s:40 +0x7c fp=0x18fdae8 sp=0x18fd9f4 pc=0x89d60
v2ray.com/core/common/uuid.ParseString(0x192a7e0, 0x24, 0x0, 0x0, 0x0, 0x0, 0x1a5d8, 0x1814000)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/uuid/uuid.go:67 +0x5c fp=0x18fdb78 sp=0x18fdaec pc=0x249f38
v2ray.com/core/proxy/vmess.(*Account).AsAccount(0x190efc0, 0xa56980, 0x190efc0, 0x6fdb2d50, 0x190efc0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/proxy/vmess/account.go:41 +0x48 fp=0x18fdbcc sp=0x18fdb78 pc=0x697490
v2ray.com/core/common/protocol.(*User).GetTypedAccount(0x190ed40, 0x2509b8, 0x2509f4, 0x8, 0x7fd680)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/protocol/user.go:13 +0x238 fp=0x18fdc00 sp=0x18fdbcc pc=0x251b10
v2ray.com/core/common/protocol.(*User).ToMemoryUser(0x190ed40, 0x1, 0x1, 0x190a5c0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/protocol/user.go:22 +0x3c fp=0x18fdc20 sp=0x18fdc00 pc=0x251c8c
v2ray.com/core/common/protocol.NewServerSpecFromPB(0x190ed20, 0x1bb, 0x190a568, 0x1, 0x2, 0x0, 0x0, 0x0, 0x0, 0x184be40, ...)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/protocol/server_spec.go:65 +0xc8 fp=0x18fdc54 sp=0x18fdc20 pc=0x250a44
v2ray.com/core/proxy/vmess/outbound.New(0xa581c0, 0x190ea60, 0x190eba0, 0x122, 0x3, 0x18678ec)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/proxy/vmess/outbound/outbound.go:39 +0xe4 fp=0x18fdcd8 sp=0x18fdc54 pc=0x6a9d98
v2ray.com/core/proxy/vmess/outbound.init.2.func1(0xa581c0, 0x190ea60, 0x8e7840, 0x190eba0, 0x8e7801, 0xa56a00, 0x47e040, 0x18ee200)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/proxy/vmess/outbound/outbound.go:184 +0x64 fp=0x18fdcf4 sp=0x18fdcd8 pc=0x6ac008
v2ray.com/core/common.CreateObject(0xa581c0, 0x190ea60, 0x8e7840, 0x190eba0, 0x0, 0x897015bc, 0x190a4e0, 0x47d2dc)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/type.go:32 +0x228 fp=0x18fdd38 sp=0x18fdcf4 pc=0x1b1288
v2ray.com/core/app/proxyman/outbound.NewHandler(0xa581c0, 0x190ea60, 0x1910210, 0xfb5e0f01, 0xf3d4fb, 0x1, 0x1867a30)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/app/proxyman/outbound/handler.go:61 +0x158 fp=0x18fdd98 sp=0x18fdd38 pc=0x47e084
v2ray.com/core/app/proxyman/outbound.init.0.func2(0xa581c0, 0x190ea60, 0x8f8da0, 0x1910210, 0x266201, 0x1104ec, 0x20, 0x8cc220)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/app/proxyman/outbound/outbound.go:168 +0x64 fp=0x18fddb8 sp=0x18fdd98 pc=0x480c0c
v2ray.com/core/common.CreateObject(0xa581c0, 0x190ea60, 0x8f8da0, 0x1910210, 0x8cb5c0, 0x1910240, 0xa581c0, 0x190ea60)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/type.go:32 +0x228 fp=0x18fddfc sp=0x18fddb8 pc=0x1b1288
v2ray.com/core.CreateObject(0x1910240, 0x8f8da0, 0x1910210, 0x6fdb2b78, 0x184b980, 0x0, 0x0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/functions.go:21 +0x68 fp=0x18fde20 sp=0x18fddfc pc=0x263d9c
v2ray.com/core.AddOutboundHandler(0x1910240, 0x1910210, 0x0, 0x0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/v2ray.go:125 +0xa4 fp=0x18fde4c sp=0x18fde20 pc=0x264b68
v2ray.com/core.addOutboundHandlers(0x1910240, 0x190a388, 0x1, 0x2, 0x0, 0x0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/v2ray.go:141 +0x78 fp=0x18fde68 sp=0x18fde4c pc=0x264d78
v2ray.com/core.New(0x187f860, 0x4, 0x18244c0, 0x1d)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/v2ray.go:211 +0x2e4 fp=0x18fdef4 sp=0x18fde68 pc=0x265138
main.startV2Ray(0x1854060, 0x180c100, 0x0, 0x0)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/main/main.go:121 +0x300 fp=0x18fdf4c sp=0x18fdef4 pc=0x7aa670
main.main()
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/main/main.go:146 +0xb8 fp=0x18fdfc0 sp=0x18fdf4c pc=0x7aa9fc
runtime.main()
/usr/local/go/src/runtime/proc.go:203 +0x284 fp=0x18fdfec sp=0x18fdfc0 pc=0x51048
runtime.goexit()
/usr/local/go/src/runtime/asm_mipsx.s:651 +0x4 fp=0x18fdfec sp=0x18fdfec pc=0x895e0

goroutine 6 [select]:
v2ray.com/core/common/log.(*generalLogger).run(0x180a040)
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/log/logger.go:54 +0x19c
created by v2ray.com/core/common/log.(*generalLogger).Handle
/home/runner/work/v2ray-openwrt/v2ray-openwrt/v2ray-core/common/log/logger.go:77 +0xc0

r0 0x0 r1 0x55
r2 0x18fdb43 r3 0x192a7e0
r4 0x1d5 r5 0x8f73e0
r6 0x4 r7 0x6fdb2d50
r8 0x0 r9 0x1914c00
r10 0x0 r11 0x0
r12 0x18 r13 0x1916648
r14 0x191665c r15 0x0
r16 0x1 r17 0x0
r18 0x8 r19 0x0
r20 0x190efc0 r21 0x190efe0
r22 0x94e574 r23 0x4
r24 0x65663931 r25 0x0
r26 0x0 r27 0x0
r28 0x8a13230d r29 0x18fd9f4
r30 0x18000e0 r31 0x249f38
pc 0x89d60 link 0x249f38
lo 0x0 hi 0x0

謝謝

/etc/init.d/v2ray start后没有任何进程和log怎么办?

我的是极路由2,mt7260a 芯片, 下载v2ray-linux-mipsle.tar.gz这个版本,安装后,启动看不到进程,也没log,系统log和内核log都没有信息。
直接运行service_start /etc/config/v2ray/v2ray,提示没有service_start这个命令。
仔细看了文件和权限配置都没有看出问题。

请教如何解决?

Newifi3 配对的 Release.

Newifi3 应该选哪个release v2ray-linux-mips/mipsl3? 是不是下载 到 openwrt 客户端 直接运行,还有服务端?已能V2ray 客户端 "ws + TLS" 连上了 v2ray 服务端。
运行是exec直接下载V2ray-core, 还是只有V2ray 配置?已在luci-app-v2ray 配置了 V2ray,是不是要重置?
还没有转DNS到 V2ray 服务端,觉得有点难,想找一个简单配置。
主要Brower 用。在firefox 加了 socks5。

最新4.22.1 似乎不支持tls 1.3

我的v2ray仅支持tls1.3,4.22.1(4.22.0同样)报错无法连接,
** remote error: tls: protocol version not supported] > v2ray.com/core/common/retry: all retry attempts failed**
能检查一下是tls 1.3相关的编译配置不正确吗?

mipsle 启动失败

试了下官网版本mipsle,正常运行。但是太大了,试了下作者压缩的,失败了,log如下
10B95C41E8554EC0F21FD257C6DF61A3
期待解惑~

v2ray-openwrt CPU持续 10%占用

环境说明:
主机型号 HiWiFi HC5962
架构 MediaTek MT7621 ver:1 eco:3
固件版本 OpenWrt 18.06.8 r7989-82fbd85747 / LuCI openwrt-18.06 branch (git-20.029.49294-41e2258)
v2ray 4.24.2

故障现象:CPU持续 10%占用

故障原因:
luci-app-v2ray 需要显示版本信息,就会调用这个命令来获取版本信息

/usr/bin/v2ray --version 无法显示版本信息,导致不停的调用

换成原版v2ray 没有此问题

Merlin路由器安装

你好。非常感谢你这个项目。
我用AC3100路由器,原版Merlin 384.14。和我的环境还有些不同,路由器全是只读或者临时目录,只能装在U盘上,按你的方案折腾了好久才装上并运行,但是有几个问题:
1、怎么知道是否运行成功了?下面是ps结果

ps | grep v*

v2ray.service:ROOT=/mnt/sda4/v2ray
v2ray.service: /jffs/scripts/service-start $ROOT/v2ray
v2ray.service: /jffs/scripts/service-stop $ROOT/v2ray
Binary file v2ray_armv7 matches
2、假设运行成功了,怎么知道是否成功连接了服务器?
3、假设路由器连接服务器成功了,连接路由器的设备需要怎么设置来翻墙?

多谢。

v2ray关闭后无法上网

v2ray开启后确实可以用,但是stop就不能上网了,好像是DNS有问题,这正常嘛。

过高的虚拟内存占用

在openwrt上运行会产生很高的虚存占用,大约在600多m,请问产生这种情况的原因是什么?这对路由器的软硬件会有负面影响么?

V2Ray mipsle client error.

Hello! I try to run my client config and get this:
main: failed to create server > v2ray.com/core/app/router: this rule has no effective fields.
(ws config)
MT7621A

请问 k3 官改系统下如何运行?

运行的 v4.41.0 的 v2ray-linux-armv5.tar.gz 里面的文件
看日志是执行成功了的,如图所示:
image
配置文件如下:

{
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },
    {
      "tag": "http",
      "port": 10809,
      "listen": "127.0.0.1",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "udp": false,
        "allowTransparent": false
      }
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "110.81.209.555",
            "port": 443,
            "users": [
              {
                "id": "1e9a0e99-4937-4e81-8c18-xxxxxx",
                "alterId": 0,
                "email": "[email protected]",
                "security": "auto",
                "encryption": "none",
                "flow": "xtls-rprx-direct"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "xtls",
        "xtlsSettings": {
          "allowInsecure": false,
          "serverName": "www.123.xyz"
        }
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      }
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "rules": [{
        "type": "field",
        "domain" : ["ext:site.dat:gw"],
        "outboundTag": "proxy"
      }, {
        "type": "field",
        "domain" : ["ext:site.dat:ad"],
        "outboundTag": "blocked"
      }]
    }
  }
}

但是接入该路由器下的设备无法访问gsite

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.