Comments (4)
参考了这个:https://gitee.com/felix-fly/v2ray-dnsmasq-dnscrypt
该项目的cn.conf要用ipset读取, 在iptables中直接绕过。
我根据该项目的思路进行改写:
/etc/init.d/v2ray
# ToutyRater/v2ray-guide#24
ipset -R < /etc/v2ray/cn.conf # load the cn.conf
iptables-restore --noflush <<-EOF 2>/dev/null
*nat
:V2RAY -
$(for s in $server_ips ; do echo "-A V2RAY -d $s -j RETURN" ; done)
$(for r in $reserved_ips ; do echo "-A V2RAY -d $r -j RETURN" ; done)
-A V2RAY -m set --match-set cn dst -j RETURN # return the traffic directly
-A V2RAY -p tcp -j REDIRECT --to-ports $port
-A PREROUTING -p tcp -j V2RAY
#-A OUTPUT -p tcp -j V2RAY
COMMIT
EOF
cn.conf
create cn hash:net family inet hashsize 1024 maxelem 65536
add cn 1.0.1.0/24
add cn 1.0.2.0/23
...
add cn 223.255.252.0/23
据此可以再添加一个custom.conf,用同样的方法直接避开v2ray。
from luci-app-v2ray.
目前自己fork了一个版本加入了这个功能,但是还有待完善:
- ipset成为项目依赖包
- 无GUI界面
- UDP转发未做相应处理。
不过明显改善当前ssh断联的情况。
from luci-app-v2ray.
服务重启的时候会将所有包含 V2RAY 的规则给清除掉,所以你指定一个不含 V2RAY 的表名就行了
luci-app-v2ray/root/etc/init.d/v2ray
Line 288 in 88a4a3d
from luci-app-v2ray.
服务重启的时候会将所有包含 V2RAY 的规则给清除掉,所以你指定一个不含 V2RAY 的表名就行了
luci-app-v2ray/root/etc/init.d/v2ray
Line 288 in 88a4a3d
是我想在luci中的firewall中配置规则,然后这里的规则重启防火墙才能生效,但也会导致目前正在运行的V2RAY规则被清空。
from luci-app-v2ray.
Related Issues (20)
- [Bounty] 持续性更新维护 HOT 5
- OpenWrt 22.03 version is not supported HOT 6
- 如何让ping和ssh 直连? HOT 2
- OpenWrt 22.03适配 HOT 39
- dokodemo_door代理端口异常 HOT 1
- webRTC leak
- bug报告:luci-app-v2ray总是自动给json文件添加不必要的斜杠
- v2ray 服务起不来 HOT 1
- CHNRoute和GFWlist更新失败 HOT 1
- whats this error
- public key is missing in website HOT 2
- 为什么v2ray-core 安装后 /etc/init.d/v2ray 文件会与luci-app-v2ray 的冲突导致安装失败? HOT 5
- Cannot open file kuoruan-public.keyecho
- Unknown package 'luci-app-v2ray'.
- freedom功能增强 HOT 1
- 为什么opkg源中要移除luci-app-v2ray这个包?
- I get http error 403 when trying to get the public key
- Service not starting
- daemon.err v2ray: Invalid V2Ray file. 无法启动v2ray HOT 1
- 如何配置进站出站? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luci-app-v2ray.