mirror of
https://github.com/2dust/v2rayN.git
synced 2026-09-28 17:58:06 +03:00
Add configurable TUN IPv4/IPv6 addresses
https://github.com/2dust/v2rayN/issues/9810
This commit is contained in:
@@ -95,6 +95,8 @@ public class OptionSettingViewModel : MyReactiveObject, ICloseable
|
||||
[Reactive] public string TunIcmpRouting { get; set; }
|
||||
[Reactive] public bool TunEnableLegacyProtect { get; set; }
|
||||
[Reactive] public string TunRouteExcludeAddress { get; set; }
|
||||
[Reactive] public string TunIpv4Address { get; set; }
|
||||
[Reactive] public string TunIpv6Address { get; set; }
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
@@ -214,6 +216,8 @@ public class OptionSettingViewModel : MyReactiveObject, ICloseable
|
||||
TunIcmpRouting = _config.TunModeItem.IcmpRouting;
|
||||
TunEnableLegacyProtect = _config.TunModeItem.EnableLegacyProtect;
|
||||
TunRouteExcludeAddress = Utils.List2String(_config.TunModeItem.RouteExcludeAddress, true);
|
||||
TunIpv4Address = _config.TunModeItem.Ipv4Address;
|
||||
TunIpv6Address = _config.TunModeItem.Ipv6Address;
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
@@ -378,6 +382,8 @@ public class OptionSettingViewModel : MyReactiveObject, ICloseable
|
||||
_config.TunModeItem.IcmpRouting = TunIcmpRouting;
|
||||
_config.TunModeItem.EnableLegacyProtect = TunEnableLegacyProtect;
|
||||
_config.TunModeItem.RouteExcludeAddress = Utils.String2List(TunRouteExcludeAddress);
|
||||
_config.TunModeItem.Ipv4Address = TunIpv4Address;
|
||||
_config.TunModeItem.Ipv6Address = TunIpv6Address;
|
||||
|
||||
//coreType
|
||||
await SaveCoreType();
|
||||
|
||||
Reference in New Issue
Block a user