Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教我设置透明代理 也开启tproxy,额外代理也添加IP了就是不行 #448

Open
dahuahe opened this issue Mar 4, 2022 · 3 comments

Comments

@dahuahe
Copy link

dahuahe commented Mar 4, 2022

添加的额外的代理列表
10.11.0.0/16

@dahuahe
Copy link
Author

dahuahe commented Mar 4, 2022

是不是因为这个是保留地址所以没有成功?如何剔除保留地址呢?或者有没有其他办法?感恩!

@WordsWorthLess
Copy link

WordsWorthLess commented Mar 6, 2022

是不是因为这个是保留地址所以没有成功?如何剔除保留地址呢?或者有没有其他办法?感恩!

剔除该ip段的保留地址的方法:
ssh到路由器,编辑 /etc/init.d/v2ray 这个脚本
找到这个函数

create_v2ray_ipset() 

里面有一行代码

         local reserved_v4="$(cat >&1 <<-EOF
                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.88.99.0/24
                192.168.0.0/16
                192.18.0.0/15
                198.51.100.0/24
                203.0.113.0/24
                224.0.0.0/4
                240.0.0.0/4
                255.255.255.255
        EOF
        )"

替换成

         local reserved_v4="$(cat >&1 <<-EOF
                0.0.0.0/8
                10.0.0.0/13
                10.8.0.0/15
                10.10.0.0/16
                10.12.0.0/14
                10.16.0.0/12
                10.32.0.0/11
                10.64.0.0/10
                10.128.0.0/9
                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.88.99.0/24
                192.168.0.0/16
                192.18.0.0/15
                198.51.100.0/24
                203.0.113.0/24
                224.0.0.0/4
                240.0.0.0/4
                255.255.255.255
        EOF
        )"

然后保存

@WordsWorthLess
Copy link

如果想开启fakedns也可以用类似方法把需要的ip段剔除, 不然这些保留ip段就无法流入到iptables的v2ray链
XTLS/Xray-core/issues/898#issue-1103230375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants