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

现在有无方案可以部署到路由器上,实现家庭路由器爬墙,就像ss一样,如果没有,有没有开发的计划?谢谢 #483

Closed
shouhengzhang opened this Issue Jul 19, 2017 · 17 comments

Comments

Projects
None yet
@shouhengzhang
Copy link

shouhengzhang commented Jul 19, 2017

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。
Please read the instruction and answer the following questions before submitting your issue. Thank you.

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.

  3. 你看到的不正常的现象是什么?
    What did you see?

  4. 你期待看到的正确表现是怎样的?
    What's your expectation?

  5. 请附上你的配置文件(提交 Issue 前请隐藏服务器端IP地址)。
    Please attach your configuration file (Mask IP addresses before submit this issue).

    Server Configuration File(服务器端配置文件):

    // 在这里附上服务器端配置文件
    // Please attach your server configuration file here.
Client Configuration File(客户端配置文件):
    // 在这里附上客户端配置文件
    // Please attach your client configuration file here.
  1. 请附上出错时软件输出的日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。
    Please attach the log file, especially the bottom lines if the file is large. Log file is usually /var/log/v2ray/error.log on Linux.

    Server Log File(服务器端日志):

    // 在这里附上服务器端日志
    // Please attach your server log here.
Client Log File(客户端日志):
    // 在这里附上客户端日志
    // Please attach your client log here.
@luolufang

This comment has been minimized.

Copy link

luolufang commented Jul 20, 2017

@wwqgtxx

This comment has been minimized.

Copy link

wwqgtxx commented Jul 21, 2017

@luolufang 我这里除了无法代理非TCP/UDP流量之外别的都没啥问题了,不知道你所说的真正的透明代理是什么。只不过V2RAY的内存占用量实在是有点大,以后打算弄个软路由来跑

@chnt7305

This comment has been minimized.

Copy link

chnt7305 commented Jul 26, 2017

@wwqgtxx
请问你用的是什么方案,有具体教程吗?

@cristhevirgin

This comment has been minimized.

Copy link

cristhevirgin commented Jul 26, 2017

why i cant use this, sir?

@xm0625

This comment has been minimized.

Copy link

xm0625 commented Jul 28, 2017

dnsmasq+ipset+iptables+pdnsd(tcp query only)+redsocks2(tcp)+v2ray(socks5)

@fanck0605

This comment has been minimized.

Copy link

fanck0605 commented Jul 30, 2017

@chnt7305
v2ray.zip

1.将附件包内配置文件复制到路由器上对应文件夹,从官方released下载对应v2ray主程序,重命名v2ray并复制到 /usr/bin/
2.赋予/etc/init.d/v2ray及/usr/bin/v2ray可执行权限,并在LuCI里启用v2ray。
3.电脑或手机上配置自带的代理指向 [路由器IP]:1080 即可。
4.如若需要透明代理,请将客户端的传入协议修改为 Dokodemo 并配置 iptables

注:
1.配置文件按需更改
2.启动脚本是自己写的,如有错误请纠正
3.启动脚本通过start_stop_daemon启动v2ray,原版LEDE可能需要安装相关软件包,PandoraBox自带

@chnt7305

This comment has been minimized.

Copy link

chnt7305 commented Jul 31, 2017

@fanck0605 我没有在文件夹内找到 luci 的相关信息,请问这是一个可视化操作方案吗?还是命令行操作方式?

@fanck0605

This comment has been minimized.

Copy link

fanck0605 commented Aug 1, 2017

@chnt7305 这不是一个可视化的操作方案,仅能在luci界面中启动,关闭该应用,或者设置自启动
image
当然你也可以用"/etc/init.d/v2ray enable && /etc/init.d/v2ray start"来设置自启动并启动v2ray

@chnt7305

This comment has been minimized.

Copy link

chnt7305 commented Aug 1, 2017

@fanck0605 好的,十分感谢!

@techotaku

This comment has been minimized.

Copy link

techotaku commented Aug 10, 2017

@chnt7305 @fanck0605 关于 “配置iptables”这一步,做了个LuCI辅助工具,欢迎品尝…… https://github.com/techotaku/luci-app-transparent-proxy

@chnt7305

This comment has been minimized.

Copy link

chnt7305 commented Aug 10, 2017

@techotaku 非常感谢!

@fanck0605

This comment has been minimized.

Copy link

fanck0605 commented Aug 13, 2017

@techotaku 感谢分享!

@duanhai

This comment has been minimized.

Copy link

duanhai commented Aug 16, 2017

我使用的是LEDE-X64 用@fanck0605 的脚本无法做到守护进程,使用了 @techotaku 的一段脚本能关闭bash后也能后台运行v2ray了

https://gist.github.com/techotaku/6bd6a8453b266aca1104775c1d5f945d

/etc/init.d/v2ray
START=90

USE_PROCD=1
start_service() {
	mkdir /var/log/v2ray > /dev/null 2>&1
	procd_open_instance
	procd_set_param respawn
	procd_set_param command /usr/bin/v2ray -config /etc/v2ray/config.json
	procd_set_param file /etc/v2ray/config.json
	procd_set_param stdout 1
	procd_set_param stderr 1
	procd_set_param pidfile /var/run/v2ray.pid
	procd_close_instance
}

接下来试试techotaku写的透明代理,😄.

@DarienRaymond

This comment has been minimized.

Copy link
Contributor

DarienRaymond commented Aug 29, 2017

官方暂时没有计划做路由器的整合。

@techotaku

This comment has been minimized.

Copy link

techotaku commented Jan 1, 2018

@hutozh 麻烦去我那边开个issue贴一下症状、配置和log我看看……按我的测试一直到v2ray 3.4都是能用的。这个luci 基于 iptables,原理和那个教程一样,按理说 iptables 命令自己是不需要更新的。

@hutozh

This comment has been minimized.

Copy link

hutozh commented Jan 2, 2018

@techotaku 已开,麻烦您给看一下,非常感谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment