Commit 635ba586 authored by nanahira's avatar nanahira

fix gateway mark

parent 38e5d6be
......@@ -2,7 +2,10 @@
Address = {{address}}
PrivateKey = {{key}}
ListenPort = {{conn.localPort}}
{% if conn.localGatewayMark != "" %}
FwMark = {{conn.localGatewayMark}}
{% endif %}
MTU = {{conn.mtu|int - 80}}
Table = off
{% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
......
......@@ -4,7 +4,9 @@ PrivateKey = {{key}}
{% if conn.frpType == "frpc" %}
ListenPort = {{conn.localPort}}
{% endif %}
{% if conn.localGatewayMark != "" %}
FwMark = {{conn.localGatewayMark}}
{% endif %}
MTU = {{conn.mtu|int - 80}}
Table = off
{% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
......
......@@ -131,7 +131,7 @@ class InventoryBuilder {
const name = `mc${!outbound ? 'i' : '-'}${remote.name}`;
const localGatewayName = (cis ? params.lif : params.rif) || params.if;
const localGateway = localGatewayName ? this.gateways[local.name][localGatewayName] : _.find(this.gateways[local.name]);
const localGatewayMark = localGatewayName ? localGateway.mark : undefined;
const localGatewayMark = localGatewayName ? localGateway.mark : "";
const remoteGatewayName = (cis ? params.rif : params.lif) || params.if;
const remoteGateway = remoteGatewayName ? this.gateways[remote.name][remoteGatewayName] : _.find(this.gateways[remote.name]);
//const remoteGatewayMark = remoteGatewayName ? remoteGateway.mark : undefined;
......
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