mirror of https://github.com/2dust/v2rayN
Migrating the sing-box configuration to 1.10.0
https://sing-box.sagernet.org/migration/#tun-address-fields-are-mergedpull/6038/head
parent
d04cc53152
commit
9e84de8e76
|
@ -78,8 +78,7 @@
|
||||||
public int? listen_port { get; set; }
|
public int? listen_port { get; set; }
|
||||||
public string? domain_strategy { get; set; }
|
public string? domain_strategy { get; set; }
|
||||||
public string interface_name { get; set; }
|
public string interface_name { get; set; }
|
||||||
public string inet4_address { get; set; }
|
public List<string>? address { get; set; }
|
||||||
public string? inet6_address { get; set; }
|
|
||||||
public int? mtu { get; set; }
|
public int? mtu { get; set; }
|
||||||
public bool? auto_route { get; set; }
|
public bool? auto_route { get; set; }
|
||||||
public bool? strict_route { get; set; }
|
public bool? strict_route { get; set; }
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
"type": "tun",
|
"type": "tun",
|
||||||
"tag": "tun-in",
|
"tag": "tun-in",
|
||||||
"interface_name": "singbox_tun",
|
"interface_name": "singbox_tun",
|
||||||
"inet4_address": "172.19.0.1/30",
|
"address": [
|
||||||
"inet6_address": "fdfe:dcba:9876::1/126",
|
"172.18.0.1/30",
|
||||||
|
"fdfe:dcba:9876::1/126"
|
||||||
|
],
|
||||||
"mtu": 9000,
|
"mtu": 9000,
|
||||||
"auto_route": true,
|
"auto_route": true,
|
||||||
"strict_route": false,
|
"strict_route": false,
|
||||||
|
|
|
@ -558,7 +558,7 @@ namespace ServiceLib.Services.CoreConfig
|
||||||
//tunInbound.sniff_override_destination = _config.inbound[0].routeOnly ? false : _config.inbound[0].sniffingEnabled;
|
//tunInbound.sniff_override_destination = _config.inbound[0].routeOnly ? false : _config.inbound[0].sniffingEnabled;
|
||||||
if (_config.TunModeItem.EnableIPv6Address == false)
|
if (_config.TunModeItem.EnableIPv6Address == false)
|
||||||
{
|
{
|
||||||
tunInbound.inet6_address = null;
|
tunInbound.address = ["172.18.0.1/30"];
|
||||||
}
|
}
|
||||||
|
|
||||||
singboxConfig.inbounds.Add(tunInbound);
|
singboxConfig.inbounds.Add(tunInbound);
|
||||||
|
|
Loading…
Reference in New Issue