Commit 85ef51a1 authored by nanahira's avatar nanahira

add a flag for global postup

parent c5607d68
......@@ -17,6 +17,10 @@
src: scripts/ipset.j2
dest: '/etc/wireguard/{{item}}.ipset'
with_items: '{{route_list_names}}'
- name: global-postup
shell: /etc/wireguard/global-postup.sh
args:
creates: /tmp/mycard_global_postup_done
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
- name: 'clean up null connections first'
include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
......
......@@ -37,4 +37,6 @@ iptables -t mangle -D PREROUTING -m set --match-set ladder_needed src -m set --m
ipset destroy {{list}}
{% endfor %}
rm -rf /tmp/mycard_global_postup_done
exit 0
......@@ -39,4 +39,6 @@ ip rule add pref 301 fwmark {{gateway.mark}} lookup {{gateway.mark}}
# 临时梯子
iptables -t mangle -A PREROUTING -m set --match-set ladder_needed src -m set --match-set gfwiplist dst -j MARK --set-xmark 812/0xffffffff
echo 1 > /tmp/mycard_global_postup_done
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment