zw963 / asuswrt-merlin-transparent-proxy

transparent proxy base on ss, v2ray, xray, ipset, iptables, chinadns on asuswrt merlin or side router.
MIT License
380 stars 80 forks source link

v2ray support #91

Closed kfstorm closed 4 years ago

kfstorm commented 5 years ago

If someone is interested in replacing shadowsocks with v2ray, here is an example: https://github.com/kfstorm/asuswrt-merlin-transparent-proxy.

zw963 commented 5 years ago

Cool,非常感兴趣, 有空一定研究下,谢谢!

zw963 commented 4 years ago

I update to use v2ray too, thank you!

zw963 commented 4 years ago

Hi, @kfstorm , 我读到了 这个 博客,一片很好的文章,其中讲到了 v2ray 中内置的 DNS 路由功能, 我还为尝试,不知你是否有做过测试, 用该功能取代 dnscrypt ?

kfstorm commented 4 years ago

这个我没有试过。当时想的是v2ray只是用来替换ss,所以我没有配置DNS,只是在inbound里加了sniffing,在路由规则里定义了geosite:cngeoip:cn走直连。保留了路由表里的CHINAIPS和CHINAIP。我理解的是CHINAIPS可以转换为v2ray里的一个自定义geoip文件,不过似乎没有必要在v2ray里设置dns的配置(我的dnscrypt服务器和v2ray服务器是同一台)。

不过v2ray只能嗅探http和tls流量,如果从电脑端发出来的流量是其他tcp流量或者udp流量,那么路由器上的v2ray是没办法自行查询dns的,因为不知道域名。如果有国外网站的dns被污染成一个国内ip了,流量又不是HTTP(S),那么v2ray也只好按直连处理了,即使没有配置国内ip走直连的规则,远端v2ray也只能把流量发送给被污染的IP。所以我觉得dnscrypt还是有存在的必要的,他排除了非HTTP请求被污染的风险。除非终端的DNS请求能直接被v2ray代理而不走运营商的DNS服务器?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Billy.Zheng notifications@github.com Sent: Sunday, September 22, 2019 9:47:25 AM To: zw963/asuswrt-merlin-transparent-proxy asuswrt-merlin-transparent-proxy@noreply.github.com Cc: Kai Yang kfstorm-notify@outlook.com; Mention mention@noreply.github.com Subject: Re: [zw963/asuswrt-merlin-transparent-proxy] v2ray support (#91)

Hi, @kfstormhttps://github.com/kfstorm , 我读到了 这个https://medium.com/@TachyonDevel/%E6%BC%AB%E8%B0%88%E5%90%84%E7%A7%8D%E9%BB%91%E7%A7%91%E6%8A%80%E5%BC%8F-dns-%E6%8A%80%E6%9C%AF%E5%9C%A8%E4%BB%A3%E7%90%86%E7%8E%AF%E5%A2%83%E4%B8%AD%E7%9A%84%E5%BA%94%E7%94%A8-62c50e58cbd0 博客,一片很好的文章,其中讲到了 v2ray 中内置的 DNS 路由功能, 我还为尝试,不知你是否有做过测试, 用该功能取代 dnscrypt ?

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/zw963/asuswrt-merlin-transparent-proxy/issues/91?email_source=notifications&email_token=AA3VK5Q7UXICJ22JD4S5S23QK3FC3A5CNFSM4IJC5M4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7I4W4I#issuecomment-533842801, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA3VK5XFS7SLOBW32IH24SLQK3FC3ANCNFSM4IJC5M4A.

zw963 commented 4 years ago

明白了, 谢谢, 看样子我的 v2ray 脚本还有改进的空间 (我的理解是可以使用 geoip:cn 来取代我目前那一大堆 iptables, 只需要保留 dnscrypt, 这才应该是目前使用 v2ray 的最佳方案吧。

kfstorm commented 4 years ago

是的,应该是可以用geoip:cn来替换iptables里的东西的。

Get Outlook for iOShttps://aka.ms/o0ukef


From: Billy.Zheng notifications@github.com Sent: Monday, September 23, 2019 11:09:26 PM To: zw963/asuswrt-merlin-transparent-proxy asuswrt-merlin-transparent-proxy@noreply.github.com Cc: Kai Yang kfstorm-notify@outlook.com; Mention mention@noreply.github.com Subject: Re: [zw963/asuswrt-merlin-transparent-proxy] v2ray support (#91)

明白了, 谢谢, 看样子我的 v2ray 脚本还有改进的空间 (我的理解是可以使用 geoip:cn 来取代我目前那一大堆 iptables, 只需要保留 dnscrypt, 这才应该是目前使用 v2ray 的最佳方案吧。

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/zw963/asuswrt-merlin-transparent-proxy/issues/91?email_source=notifications&email_token=AA3VK5U6XJFB3JUPSZL6VS3QLDL2NA5CNFSM4IJC5M4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7LF6YQ#issuecomment-534142818, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA3VK5RQAPTMGQAW7MVVLFDQLDL2NANCNFSM4IJC5M4A.

gitx6 commented 4 years ago

换clash做客户端 https://github.com/KOP-XIAO/Clash-Merlin/wiki

zw963 commented 4 years ago

@wangxin6 , @kfstorm , 你们在安卓手机上用什么 v2ray 客户端?

我目前不得不保留老的 ss-server, 并且在手机上使用小火箭连接,因为它很稳定. 如果使用 shadowsocks 协议连接 v2ray server, 非常不稳定,而且最近莫名其妙不可用了。

gitx6 commented 4 years ago

Calsh A: https://github.com/ccg2018/ClashA/tree/master

docete commented 4 years ago

性能咋样?AC68U带着吃力吗?

zw963 commented 4 years ago

@kfstorm , v2ray 4.22.0 发布了, 也许你感兴趣。https://t.me/s/v2fly.

这个版本带来了

  1. DNS over HTTPS 百科 https://zh.wikipedia.org/wiki/DNS_over_HTTPS

  2. ExpectIPs in DNS 会对返回的 IP 的进行校验,只返回包含 expectIPs 列表中的地址

这两个具体介绍和使用方法在 https://v2ray.com/chapter_02/04_dns.html

zw963 commented 4 years ago

@kfstorm , maybe you want try this. (don't need ipset/dnsmasq/dnscrypt, V2ray only solution) i use it several weeks, work well for me.

https://github.com/zw963/asuswrt-merlin-v2ray