proxylang 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-B_eJXR4E.js → build-LwRF2Zm0.js} +19 -8
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2520,6 +2520,7 @@ const targetCatalog = deepFreeze([
|
|
|
2520
2520
|
//#region src/engines/sing-box/render.ts
|
|
2521
2521
|
const DIRECT = "pl-direct";
|
|
2522
2522
|
const DNS = "pl-dns";
|
|
2523
|
+
const RULESET_DIRECT = "pl-ruleset-direct";
|
|
2523
2524
|
const actionTag = (a, name) => a.type === "route" ? name(a.to) : a.type === "direct" ? DIRECT : "pl-reject";
|
|
2524
2525
|
function singCondition(condition) {
|
|
2525
2526
|
switch (condition.type) {
|
|
@@ -2610,14 +2611,24 @@ function singbox(plan, secret) {
|
|
|
2610
2611
|
inbound: ["pl-dns-listener"],
|
|
2611
2612
|
action: "hijack-dns"
|
|
2612
2613
|
});
|
|
2613
|
-
if (plan.nativeRuleSets.length)
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2614
|
+
if (plan.nativeRuleSets.length) {
|
|
2615
|
+
if (routedDns) outbounds.push({
|
|
2616
|
+
type: "direct",
|
|
2617
|
+
tag: RULESET_DIRECT,
|
|
2618
|
+
domain_resolver: {
|
|
2619
|
+
server: DNS,
|
|
2620
|
+
strategy: "prefer_ipv4"
|
|
2621
|
+
}
|
|
2622
|
+
});
|
|
2623
|
+
routing.rule_set = plan.nativeRuleSets.map((r) => ({
|
|
2624
|
+
type: "remote",
|
|
2625
|
+
tag: r.id,
|
|
2626
|
+
url: r.url,
|
|
2627
|
+
format: r.format,
|
|
2628
|
+
update_interval: `${r.intervalSeconds}s`,
|
|
2629
|
+
download_detour: routedDns ? RULESET_DIRECT : DIRECT
|
|
2630
|
+
}));
|
|
2631
|
+
}
|
|
2621
2632
|
if (model.fallback.type === "reject") rules.push(singAction(model.fallback, name));
|
|
2622
2633
|
else routing.final = actionTag(model.fallback, name);
|
|
2623
2634
|
const config = {
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as definitionDiagnostic, i as targetCatalog } from "./build-
|
|
2
|
+
import { C as definitionDiagnostic, i as targetCatalog } from "./build-LwRF2Zm0.js";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { lstat, open, stat } from "node:fs/promises";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as ProfileDefinitionError, T as inspectDefinition, _ as endpointSchema, a as defineBuild, b as nativeRuleSetSchema, c as dnsRulesSchema, d as tunnelSchema, f as created, g as requireKind, h as parsed, l as conditionSchema, m as inspectRecord, n as runBuild, o as secretSources, p as flatten, r as explainProfile, s as defineProfile, t as checkBuild, u as groupTestSchema, v as idSchema, w as exactDefinition, x as nodeSchema, y as matchSchema } from "./build-
|
|
1
|
+
import { S as ProfileDefinitionError, T as inspectDefinition, _ as endpointSchema, a as defineBuild, b as nativeRuleSetSchema, c as dnsRulesSchema, d as tunnelSchema, f as created, g as requireKind, h as parsed, l as conditionSchema, m as inspectRecord, n as runBuild, o as secretSources, p as flatten, r as explainProfile, s as defineProfile, t as checkBuild, u as groupTestSchema, v as idSchema, w as exactDefinition, x as nodeSchema, y as matchSchema } from "./build-LwRF2Zm0.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
//#region src/authoring/resources.ts
|
|
4
4
|
const builtin = (builtin) => created({ builtin }, "builtin");
|
package/package.json
CHANGED