-
Notifications
You must be signed in to change notification settings - Fork 103
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
关于 -R选项 一个问题 #26
Comments
只需要将 -R 选项放在 -b/-B 选项之前,他就有效了。
谢谢你,我现在才知道可以这么做,哈哈。 |
$ ipt2socks -R
2020-06-25 21:48:42 INF: [main] server address: 127.0.0.1#1080
2020-06-25 21:48:42 INF: [main] listen address: 0.0.0.0#60080
2020-06-25 21:48:42 INF: [main] listen address: ::#60080
2020-06-25 21:48:42 INF: [main] udp cache maximum size: 256
2020-06-25 21:48:42 INF: [main] udp socket idle timeout: 60
2020-06-25 21:48:42 INF: [main] number of worker threads: 1
2020-06-25 21:48:42 INF: [main] enable tcp transparent proxy
2020-06-25 21:48:42 INF: [main] enable udp transparent proxy
2020-06-25 21:48:42 INF: [main] use redirect instead of tproxy
^C $ ipt2socks -R -b127.0.0.1 -B::1
2020-06-25 21:48:54 INF: [main] server address: 127.0.0.1#1080
2020-06-25 21:48:54 INF: [main] listen address: 127.0.0.1#60080
2020-06-25 21:48:54 INF: [main] listen address: ::1#60080
2020-06-25 21:48:54 INF: [main] udp cache maximum size: 256
2020-06-25 21:48:54 INF: [main] udp socket idle timeout: 60
2020-06-25 21:48:54 INF: [main] number of worker threads: 1
2020-06-25 21:48:54 INF: [main] enable tcp transparent proxy
2020-06-25 21:48:54 INF: [main] enable udp transparent proxy
2020-06-25 21:48:54 INF: [main] use redirect instead of tproxy |
至于要不要改变这个默认行为,我个人愚见,就不改了(懒得改了~~)。我想大多数人也是不知道这个 sysctl 选项的。如果确实关心监听地址为 0:0:0:0,那么自己调换下选项的顺序即可,问题也不大。 |
还有这种操作,好的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-R选项:使用 REDIRECT(DNAT) 而非 TPROXY(针对 TCP)。
-R 选项为什么会让
-b 127.0.0.1
设置无效,直接绑定0.0.0.0?我记得REDIRECT同样可以转发数据到127.0.0.1,只是要设置内核参数
net.ipv4.conf.all.route_localnet=1
The text was updated successfully, but these errors were encountered: