-
Notifications
You must be signed in to change notification settings - Fork 419
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
Wiki中的Gfwlist模式 #146
Comments
这样就不会把 gfwlist 这个 ipset 销毁,所以不需要重启 dnsmasq 来重新添加 ip. |
有个人给我反映使用你wiki中的方法,把那条iptables加到 |
@cokebar 对于开机自动执行的话,我的目前的做法是在 |
我改了一下 ss-rules,加入 gfwlist,请 @aa65535 看一下这样行不行 gfwlist_init() {
ipt="iptables -t nat"
setname=$(ipset -n list | grep -w "gfwlist")
if [ ! "$setname" ]; then
ipset create gfwlist hash:ip
fi
$ipt -I SS_SPEC_WAN_AC 1 -m set --match-set gfwlist dst -j SS_SPEC_WAN_FW
return 0
} 最后改为这样 flush_rules && ipset_init && ipt_nat && ipt_mangle && gfwlist_init && export_ipt_rules |
I tried your script, it works. one little problem: it can ONLY redirect TCP traffic. To redirect UDP as well, you could add this line |
@sotux gfwlist模式下 udp relay 意义不大 |
wan口掉线重拨后“iptables -t nat -I SS_SPEC_WAN_AC 1 -m set --match-set gfwlist dst -j SS_SPEC_WAN_FW”失效,需要重新运行才行,请问怎样设置才能wan口掉线重拨后自动运行这条指令? |
@LegendCHI 不知道下面这种方法行不行,没测试
|
@LegendCHI The following is excerpted from etc/uci-defaults/luci-shadowsocks, which is extracted from luci-app-shadowsocks package: `uci -q batch <<-EOF >/dev/null
EOF` But if you want to use gfwlist scheme, you'd better name the specified ipset name carefully, because /usr/bin/ss-rules (part of the luci-app-shadowsocks package) will only maintain ipset names started with ss_spec_, like ss_spec_gfwlist. |
@cokebar 非常感谢,按照你的方法,wan口在发生变化重新完成拨号后顺利的执行了iptables。 |
wiki中新建了一个gfwlist的ipset,然后添加一条命令,match gfwlist这个ipset的转发到SS_SPEC_WAN_FW,
但是有“每次重启 shadowsocks 后 SS_SPEC_WAN_AC 都会被销毁重建”的问题,因为执行ss-rules会首先flush rules。
但为何要建立一个gfwlist的ipset,为什么不直接使用ss_spec_dst_fw,dnsmasq解析后直接添加到ss_spec_dst_fw这个ipset中了,这样就没有这个问题了
The text was updated successfully, but these errors were encountered: