Commit e57895fe authored by nanahira's avatar nanahira

changes while deploying

parent 5c3adadb
[defaults] [defaults]
host_key_checking = False host_key_checking = False
strategy_plugins = mitogen-0.2.9/ansible_mitogen/plugins/strategy strategy_plugins = mitogen-0.2.9/ansible_mitogen/plugins/strategy
strategy = mitogen_linear strategy = mitogen_free
...@@ -3,18 +3,19 @@ router id {{address}}; ...@@ -3,18 +3,19 @@ router id {{address}};
protocol device { protocol device {
} }
protocol direct { #protocol direct {
disabled; # disabled;
ipv4; # ipv4;
ipv6; # ipv6;
} #}
{% for interface in lan_interfaces %}
protocol direct { protocol direct {
ipv4 { ipv4;
import all;
};
ipv6; ipv6;
interface "{{interface}}";
} }
{% endfor %}
protocol kernel { protocol kernel {
ipv4 { ipv4 {
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
# conn: '{{item}}' # conn: '{{item}}'
# with_items: '{{ connections }}' # with_items: '{{ connections }}'
# when: "item.protocol == 'null'" # when: "item.protocol == 'null'"
- name: 'loop through list from a variable' # - name: 'loop through list from a variable'
include_tasks: 'protocols/{{item.protocol}}/configure.yaml' # include_tasks: 'protocols/{{item.protocol}}/configure.yaml'
vars: # vars:
conn: '{{item}}' # conn: '{{item}}'
with_items: '{{ connections }}' # with_items: '{{ connections }}'
# when: "item.protocol != 'null'" # when: "item.protocol != 'null'"
- name: 'frps' - name: 'frps'
include_tasks: 'protocols/wgfrp/frps.yaml' include_tasks: 'protocols/wgfrp/frps.yaml'
......
#!/usr/bin/env bash #!/usr/bin/env bash
{% for net in route_lists.mycard %}
ip rule del pref 299 to {{net}} lookup main
{% endfor %}
# 针对网关设置mark # 针对网关设置mark
{% for gateway in gateways %} {% for gateway in gateways %}
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
ipset restore -f /etc/wireguard/{{list}}.ipset ipset restore -f /etc/wireguard/{{list}}.ipset
{% endfor %} {% endfor %}
{% for net in route_lists.mycard %}
ip rule add pref 299 to {{net}} lookup main
{% endfor %}
# 针对网关设置mark # 针对网关设置mark
{% for gateway in gateways %} {% for gateway in gateways %}
......
...@@ -56,7 +56,7 @@ class InventoryBuilder { ...@@ -56,7 +56,7 @@ class InventoryBuilder {
plan.gatewayAddress = hosts[plan.gateway].address; plan.gatewayAddress = hosts[plan.gateway].address;
} }
// 所有内网网段 // 所有内网网段
this.route_lists.mycard = ["10.199.0.0/16", "10.200.0.0/15"]; this.route_lists.mycard = ["10.198.0.0/16", "10.200.0.0/15"];
for (const h in this.hosts) { for (const h in this.hosts) {
const host = this.hosts[h] const host = this.hosts[h]
for (const c of host.subnets.split(",")) { for (const c of host.subnets.split(",")) {
......
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