Skip to content

Commit 194c240

Browse files
authored
Add ICMP routing (2dust#8894)
1 parent db9fe9c commit 194c240

17 files changed

Lines changed: 108 additions & 0 deletions

v2rayN/ServiceLib/Global.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,5 +675,14 @@ public class Global
675675
""
676676
];
677677

678+
public static readonly List<string> TunIcmpRoutingPolicies =
679+
[
680+
"rule",
681+
"direct",
682+
"unreachable",
683+
"drop",
684+
"reply",
685+
];
686+
678687
#endregion const
679688
}

v2rayN/ServiceLib/Handler/ConfigHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public static class ConfigHandler
9191
{
9292
EnableTun = false,
9393
Mtu = 9000,
94+
IcmpRouting = Global.TunIcmpRoutingPolicies.First(),
9495
};
9596
config.GuiItem ??= new();
9697
config.MsgUIItem ??= new();

v2rayN/ServiceLib/Models/ConfigItems.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public class TunModeItem
144144
public string Stack { get; set; }
145145
public int Mtu { get; set; }
146146
public bool EnableIPv6Address { get; set; }
147+
public string IcmpRouting { get; set; }
147148
}
148149

149150
[Serializable]

v2rayN/ServiceLib/Resx/ResUI.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,4 +1692,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
16921692
<data name="TbUsername" xml:space="preserve">
16931693
<value>Username</value>
16941694
</data>
1695+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1696+
<value>ICMP routing policy</value>
1697+
</data>
16951698
</root>

v2rayN/ServiceLib/Resx/ResUI.fr.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,4 +1689,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
16891689
<data name="TbUsername" xml:space="preserve">
16901690
<value>Username</value>
16911691
</data>
1692+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1693+
<value>ICMP routing policy</value>
1694+
</data>
16921695
</root>

v2rayN/ServiceLib/Resx/ResUI.hu.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,4 +1692,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
16921692
<data name="TbUsername" xml:space="preserve">
16931693
<value>Username</value>
16941694
</data>
1695+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1696+
<value>ICMP routing policy</value>
1697+
</data>
16951698
</root>

v2rayN/ServiceLib/Resx/ResUI.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,4 +1692,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
16921692
<data name="TbUsername" xml:space="preserve">
16931693
<value>Username</value>
16941694
</data>
1695+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1696+
<value>ICMP routing policy</value>
1697+
</data>
16951698
</root>

v2rayN/ServiceLib/Resx/ResUI.ru.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,4 +1692,7 @@
16921692
<data name="TbUsername" xml:space="preserve">
16931693
<value>Username</value>
16941694
</data>
1695+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1696+
<value>ICMP routing policy</value>
1697+
</data>
16951698
</root>

v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,4 +1689,7 @@
16891689
<data name="TbUsername" xml:space="preserve">
16901690
<value>用户名</value>
16911691
</data>
1692+
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
1693+
<value>ICMP 路由策略</value>
1694+
</data>
16921695
</root>

0 commit comments

Comments
 (0)