2019年6月10日星期一

V2Ray FOR Padavan 透明代理 \ GFWLIST \ 大陆白名单 \ 去广告

准备:
5MB以上storage空间padavan路由固件;(如何编译增大storage空间点这里
v2ray服务端信息(ws tls);
工具:WinSCP、Notepad++

NEWIFI3 D2\K2P 固件和所需工具网盘地址
密码
74y1

操作简要:(默认192.168.2.1 admin admin)
v2ray文件夹WinSCP上传到/etc/srotage - 改gfwlist-config.json - 全775权限 - 《在防火墙规则启动后执行》添加启动脚本-烧录-完成

效果:v2ray透明代理自启动,实现去广告和国外代理,GFWLIST\绕过国内域名。






youtube操作视频:
https://www.youtube.com/watch?v=iknZZz0ZeN0







走代理:单线程约14000kbps,由单核主频决定;
多线程峰值4MB/S。

感谢:
forever8938技術支持
flyash iptable和精简V2RAY文件
hanwckf源码

教程到这里就结束了,有什么问题请在下方留言。







------------------------参数细节-----------------------------------------

ws tls服务端可用233boy一键脚本(准备好域名,ip指向服务器)。
bash <(curl -s -L https://git.io/v2ray.sh)

-----------------------------#iptables 规则---------------------------------------

#!/bin/sh
# set iptables rules
iptables -t nat -N V2RAY
iptables -t nat -A V2RAY -d 0.0.0.0/8 -j RETURN
iptables -t nat -A V2RAY -d 127.0.0.0/8 -j RETURN
iptables -t nat -A V2RAY -d 192.168.0.0/16 -j RETURN
iptables -t nat -A V2RAY -p tcp --dport 20:500 -j REDIRECT --to-ports 12345
#iptables -t nat -A V2RAY -p udp --dport 1:1000 -j REDIRECT --to-ports 12345
#ALL TCP & UDP to-ports 12345
#iptables -t nat -A V2RAY -p tcp -j REDIRECT --to-ports 12345
#iptables -t nat -A V2RAY -p udp -j REDIRECT --to-ports 12345
iptables -t nat -A PREROUTING -p tcp -j V2RAY
------------------------------------------------------------------------------------------
不处理访问局域网数据;
TCP port 20到500转发V2Ray。(绕过BT流量同时照顾手机APP)
相关#可改udp转发、全部转发等。

-----------------gfwlist-config.json填写v2ray服务端信息------------------------------------------------



{
    "log": {
        "access": "./access.log",
        "error": "./error.log",
        "loglevel": "warning"
    },
    "inbounds": [{
        "port": 12345,
        "protocol": "dokodemo-door",
        "sniffing": {
          "enabled": true,
          "destOverride": ["http", "tls"]
        },
        "settings": {
          "network": "tcp",
          "timeout": 30,
          "followRedirect": true
        }
    }],
    "outbounds": [{
        "protocol": "freedom",
        "settings": {}
    }, {
        "protocol": "blackhole",
        "settings": {},
        "tag": "blocked"
    }, {
        "protocol": "vmess",
        "tag": "proxy",
        "settings": {
            "vnext": [{
                "address": "====yourdomain.com====",
                "port": 443,
                "users": [{
                    "id": "====your id ====",
                    "security": "none",
                    "alterId" : 64
                }]
            }]
        },
        "streamSettings": {
            "network" : "ws",
            "security": "tls",
            "wsSettings" : {
                "path" : "====your path ===="
            },
            "tlsSettings" : {
                "allowInsecure" : true
            }
        }
    }],
    "routing": {
        "strategy": "rules",
        "settings": {
            "rules": [{
                "type": "field",
                "domain" : ["ext:site.dat:gw", "ip111cn.appspot.com"],
                "outboundTag": "proxy"
            }, {
                "type": "field",
                "domain" : ["ext:site.dat:ad"],
                "outboundTag": "blocked"
            }]
        }
    }
}


-----------------------------------------------------------------

这三个替换成你的节点信息。
"address": "====yourdomain.com=========",
 "id": "============your id ============",
"path": "========your path =============="


"address": "www.yourwebside.com",
"id": "9da-85ff-435b-9786-41758",
"path": "/fuckgfw"
有TLS加密,"security": 可选none;



----------------------------------------------------------------------------

体验干净清爽。移动设备telegram whatsapp正常收发,油管APP秒载入。
微信,speedtest测速全部正常。

#下面这则脚本决定启用白名单还是GFWLIST
#放在高级-自定义设置-脚本-在防火墙规则启动后执行的底部
/etc/storage/v2ray/iptables.sh && /etc/storage/v2ray/GFWLIST.sh
#每次开机,Padavan会执行脚本启动etc/storage/v2ray一套。



软重启路由会比往常慢(自动燒錄進flash耗時)。

3 条评论:

  1. 连续几天试了恩山里面的含有v2ray的固件,没有一个可能搞的通的,直到用了你这个,总算是在路由器上搞通了,特来感谢

    回复删除
  2. 您好,在路由器上插u盘可以吗

    回复删除
  3. 您好,你这个是加了混淆,请问不用混淆的配置是怎样的,我服务器没有配置网站伪装。用的是官方的一键脚本

    回复删除

设置debian/ubuntu 2分钟后 定时重启

 #使用以下命令,安装at并安排系统在两分钟后执行重启: apt-get install at -y && echo "shutdown -r now" | sudo at now + 2 minutes