mirror of https://github.com/2dust/v2rayN
Add basic rules for sing-box
parent
a262c1e98d
commit
6340764a6c
|
@ -136,7 +136,6 @@ namespace v2rayN.Base
|
|||
var data = new byte[read];
|
||||
buffer.ToList().CopyTo(0, data, 0, read);
|
||||
|
||||
// TODO:
|
||||
totalRead += read;
|
||||
|
||||
TimeSpan ts = (DateTime.Now - totalDatetime);
|
||||
|
|
|
@ -326,13 +326,28 @@ namespace v2rayN.Handler
|
|||
{
|
||||
try
|
||||
{
|
||||
var routing = ConfigHandler.GetDefaultRouting(ref _config);
|
||||
if (routing != null)
|
||||
if (_config.routingBasicItem.enableRoutingAdvanced)
|
||||
{
|
||||
var rules = Utils.FromJson<List<RulesItem>>(routing.ruleSet);
|
||||
foreach (var item in rules!)
|
||||
var routing = ConfigHandler.GetDefaultRouting(ref _config);
|
||||
if (routing != null)
|
||||
{
|
||||
if (item.enabled)
|
||||
var rules = Utils.FromJson<List<RulesItem>>(routing.ruleSet);
|
||||
foreach (var item in rules!)
|
||||
{
|
||||
if (item.enabled)
|
||||
{
|
||||
routingUserRule(item, singboxConfig.route.rules);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var lockedItem = ConfigHandler.GetLockedRoutingItem(ref _config);
|
||||
if (lockedItem != null)
|
||||
{
|
||||
var rules = Utils.FromJson<List<RulesItem>>(lockedItem.ruleSet);
|
||||
foreach (var item in rules!)
|
||||
{
|
||||
routingUserRule(item, singboxConfig.route.rules);
|
||||
}
|
||||
|
|
|
@ -484,7 +484,6 @@ namespace v2rayN.Handler
|
|||
switch (i.streamSecurity)
|
||||
{
|
||||
case "tls":
|
||||
// TODO tls config
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -499,13 +498,10 @@ namespace v2rayN.Handler
|
|||
case "tcp":
|
||||
string t1 = q["type"] ?? "none";
|
||||
i.headerType = t1;
|
||||
// TODO http option
|
||||
|
||||
break;
|
||||
|
||||
case "kcp":
|
||||
i.headerType = q["type"] ?? "none";
|
||||
// TODO kcp seed
|
||||
break;
|
||||
|
||||
case "ws":
|
||||
|
|
Loading…
Reference in New Issue