refactor: Полное удаление функционала Tor и очистка локализаций
This commit is contained in:
@@ -2,7 +2,7 @@ name: Build packages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- "*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
release_tag:
|
release_tag:
|
||||||
@@ -87,11 +87,6 @@ jobs:
|
|||||||
name: release-files-${{ needs.preparation.outputs.version }}
|
name: release-files-${{ needs.preparation.outputs.version }}
|
||||||
path: ./filtered-bin/release
|
path: ./filtered-bin/release
|
||||||
|
|
||||||
- name: Delete old release
|
|
||||||
run: gh release delete ${{ needs.preparation.outputs.version }} --cleanup-tag --yes || true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
if: ${{ inputs.release_notes == '' }}
|
if: ${{ inputs.release_notes == '' }}
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|||||||
@@ -2843,32 +2843,4 @@ msgstr "Закрыть"
|
|||||||
msgid "Cannot save settings"
|
msgid "Cannot save settings"
|
||||||
msgstr "Не удалось сохранить настройки"
|
msgstr "Не удалось сохранить настройки"
|
||||||
|
|
||||||
msgid "Install Tor"
|
|
||||||
msgstr "Установить Tor"
|
|
||||||
|
|
||||||
msgid "The tor package is required to use the Darknet gateway. Do you want to install it automatically? (This will take about a minute)"
|
|
||||||
msgstr "Для работы шлюза Darknet необходим пакет tor. Хотите установить его автоматически? (Это займёт около минуты)"
|
|
||||||
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Отмена"
|
|
||||||
|
|
||||||
msgid "Installing Tor..."
|
|
||||||
msgstr "Установка Tor..."
|
|
||||||
|
|
||||||
msgid "Please wait. Installing via package manager..."
|
|
||||||
msgstr "Пожалуйста, подождите. Идёт установка через пакетный менеджер..."
|
|
||||||
|
|
||||||
msgid "Tor successfully installed! Please select the action again."
|
|
||||||
msgstr "Tor успешно установлен! Пожалуйста, выберите действие снова."
|
|
||||||
|
|
||||||
msgid "Failed to install Tor. Code: "
|
|
||||||
msgstr "Не удалось установить Tor. Код: "
|
|
||||||
|
|
||||||
msgid "Command execution error: "
|
|
||||||
msgstr "Ошибка выполнения команды: "
|
|
||||||
|
|
||||||
msgid "Install"
|
|
||||||
msgstr "Установить"
|
|
||||||
|
|
||||||
msgid "The tor package is not installed."
|
|
||||||
msgstr "Пакет tor не установлен."
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "fe-app-tachyon",
|
"name": "fe-app-tachyon",
|
||||||
"version": "1.2.12",
|
"version": "1.2.17",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "fe-app-tachyon",
|
"name": "fe-app-tachyon",
|
||||||
"version": "1.2.12",
|
"version": "1.2.17",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/parser": "7.28.4",
|
"@babel/parser": "7.28.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fe-app-tachyon",
|
"name": "fe-app-tachyon",
|
||||||
"version": "1.2.12",
|
"version": "1.2.17",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -2627,8 +2627,6 @@ var Tachyon;
|
|||||||
AvailableMethods2["CHECK_ZAPRET_RUNTIME"] = "check_zapret_runtime";
|
AvailableMethods2["CHECK_ZAPRET_RUNTIME"] = "check_zapret_runtime";
|
||||||
AvailableMethods2["CHECK_ZAPRET2_RUNTIME"] = "check_zapret2_runtime";
|
AvailableMethods2["CHECK_ZAPRET2_RUNTIME"] = "check_zapret2_runtime";
|
||||||
AvailableMethods2["CHECK_BYEDPI_RUNTIME"] = "check_byedpi_runtime";
|
AvailableMethods2["CHECK_BYEDPI_RUNTIME"] = "check_byedpi_runtime";
|
||||||
AvailableMethods2["CHECK_TOR_RUNTIME"] = "check_tor_runtime";
|
|
||||||
AvailableMethods2["INSTALL_TOR"] = "install_tor";
|
|
||||||
AvailableMethods2["CHECK_INBOUNDS_CONFIG"] = "check_inbounds_config";
|
AvailableMethods2["CHECK_INBOUNDS_CONFIG"] = "check_inbounds_config";
|
||||||
AvailableMethods2["GET_STATUS"] = "get_status";
|
AvailableMethods2["GET_STATUS"] = "get_status";
|
||||||
AvailableMethods2["GET_OUTBOUND_METADATA"] = "get_outbound_metadata";
|
AvailableMethods2["GET_OUTBOUND_METADATA"] = "get_outbound_metadata";
|
||||||
@@ -2849,15 +2847,6 @@ var TachyonShellMethods = {
|
|||||||
checkByedpiRuntime: async () => callBaseMethod(
|
checkByedpiRuntime: async () => callBaseMethod(
|
||||||
Tachyon.AvailableMethods.CHECK_BYEDPI_RUNTIME
|
Tachyon.AvailableMethods.CHECK_BYEDPI_RUNTIME
|
||||||
),
|
),
|
||||||
checkTorRuntime: async () => callBaseMethod(
|
|
||||||
Tachyon.AvailableMethods.CHECK_TOR_RUNTIME
|
|
||||||
),
|
|
||||||
installTor: async () => callBaseMethod(
|
|
||||||
Tachyon.AvailableMethods.INSTALL_TOR,
|
|
||||||
[],
|
|
||||||
"/usr/bin/tachyon",
|
|
||||||
{ timeout: 120000 }
|
|
||||||
),
|
|
||||||
checkInboundsConfig: async () => callBaseMethod(
|
checkInboundsConfig: async () => callBaseMethod(
|
||||||
Tachyon.AvailableMethods.CHECK_INBOUNDS_CONFIG
|
Tachyon.AvailableMethods.CHECK_INBOUNDS_CONFIG
|
||||||
),
|
),
|
||||||
@@ -13496,8 +13485,7 @@ function notifyActionProvidersAvailabilityChanged(systemInfo) {
|
|||||||
detail: {
|
detail: {
|
||||||
zapretInstalled: Boolean(systemInfo.zapret_installed),
|
zapretInstalled: Boolean(systemInfo.zapret_installed),
|
||||||
zapret2Installed: Boolean(systemInfo.zapret2_installed),
|
zapret2Installed: Boolean(systemInfo.zapret2_installed),
|
||||||
byedpiInstalled: Boolean(systemInfo.byedpi_installed),
|
byedpiInstalled: Boolean(systemInfo.byedpi_installed)
|
||||||
torInstalled: Boolean(systemInfo.tor_installed)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3998,9 +3998,8 @@ function ensureActionProvidersAvailabilityLoaded() {
|
|||||||
main.TachyonShellMethods.checkZapretRuntime(),
|
main.TachyonShellMethods.checkZapretRuntime(),
|
||||||
main.TachyonShellMethods.checkZapret2Runtime(),
|
main.TachyonShellMethods.checkZapret2Runtime(),
|
||||||
main.TachyonShellMethods.checkByedpiRuntime(),
|
main.TachyonShellMethods.checkByedpiRuntime(),
|
||||||
main.TachyonShellMethods.checkTorRuntime(),
|
|
||||||
])
|
])
|
||||||
.then(([zapretResult, zapret2Result, byedpiResult, torResult]) => {
|
.then(([zapretResult, zapret2Result, byedpiResult]) => {
|
||||||
const zapret =
|
const zapret =
|
||||||
zapretResult && zapretResult.status === "fulfilled"
|
zapretResult && zapretResult.status === "fulfilled"
|
||||||
? zapretResult.value
|
? zapretResult.value
|
||||||
@@ -4013,10 +4012,7 @@ function ensureActionProvidersAvailabilityLoaded() {
|
|||||||
byedpiResult && byedpiResult.status === "fulfilled"
|
byedpiResult && byedpiResult.status === "fulfilled"
|
||||||
? byedpiResult.value
|
? byedpiResult.value
|
||||||
: null;
|
: null;
|
||||||
const tor =
|
|
||||||
torResult && torResult.status === "fulfilled"
|
|
||||||
? torResult.value
|
|
||||||
: null;
|
|
||||||
|
|
||||||
actionProvidersAvailabilityState.loaded = true;
|
actionProvidersAvailabilityState.loaded = true;
|
||||||
actionProvidersAvailabilityState.zapretInstalled = Boolean(
|
actionProvidersAvailabilityState.zapretInstalled = Boolean(
|
||||||
@@ -4031,9 +4027,7 @@ function ensureActionProvidersAvailabilityLoaded() {
|
|||||||
actionProvidersAvailabilityState.byedpiInstalled = Boolean(
|
actionProvidersAvailabilityState.byedpiInstalled = Boolean(
|
||||||
byedpi && byedpi.success && byedpi.data && byedpi.data.byedpi_installed,
|
byedpi && byedpi.success && byedpi.data && byedpi.data.byedpi_installed,
|
||||||
);
|
);
|
||||||
actionProvidersAvailabilityState.torInstalled = Boolean(
|
|
||||||
tor && tor.success && tor.data && tor.data.tor_installed,
|
|
||||||
);
|
|
||||||
return actionProvidersAvailabilityState;
|
return actionProvidersAvailabilityState;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -4041,7 +4035,7 @@ function ensureActionProvidersAvailabilityLoaded() {
|
|||||||
actionProvidersAvailabilityState.zapretInstalled = false;
|
actionProvidersAvailabilityState.zapretInstalled = false;
|
||||||
actionProvidersAvailabilityState.zapret2Installed = false;
|
actionProvidersAvailabilityState.zapret2Installed = false;
|
||||||
actionProvidersAvailabilityState.byedpiInstalled = false;
|
actionProvidersAvailabilityState.byedpiInstalled = false;
|
||||||
actionProvidersAvailabilityState.torInstalled = false;
|
|
||||||
// singBoxExtended is set via systemInfo, keep existing value
|
// singBoxExtended is set via systemInfo, keep existing value
|
||||||
return actionProvidersAvailabilityState;
|
return actionProvidersAvailabilityState;
|
||||||
})
|
})
|
||||||
@@ -4064,9 +4058,7 @@ function isByedpiInstalledForUi() {
|
|||||||
return actionProvidersAvailabilityState.byedpiInstalled;
|
return actionProvidersAvailabilityState.byedpiInstalled;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTorInstalledForUi() {
|
|
||||||
return actionProvidersAvailabilityState.torInstalled;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isSingBoxExtendedForUi() {
|
function isSingBoxExtendedForUi() {
|
||||||
return actionProvidersAvailabilityState.singBoxExtended;
|
return actionProvidersAvailabilityState.singBoxExtended;
|
||||||
@@ -4099,8 +4091,7 @@ function getActionOptionLabel(action) {
|
|||||||
return "Zapret2";
|
return "Zapret2";
|
||||||
case "byedpi":
|
case "byedpi":
|
||||||
return "ByeDPI";
|
return "ByeDPI";
|
||||||
case "tor":
|
|
||||||
return "Route via Tor Darknet";
|
|
||||||
case "awg":
|
case "awg":
|
||||||
return "AmneziaWG";
|
return "AmneziaWG";
|
||||||
case "warp":
|
case "warp":
|
||||||
@@ -4206,7 +4197,7 @@ function populateActionOptionValues(option) {
|
|||||||
if (isByedpiInstalledForUi()) {
|
if (isByedpiInstalledForUi()) {
|
||||||
option.value("byedpi", getActionOptionLabel("byedpi"));
|
option.value("byedpi", getActionOptionLabel("byedpi"));
|
||||||
}
|
}
|
||||||
option.value("tor", getActionOptionLabel("tor"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getConfigListValues(section_id, key) {
|
function getConfigListValues(section_id, key) {
|
||||||
@@ -7123,38 +7114,7 @@ function createSectionContent(section) {
|
|||||||
|
|
||||||
const super_validate = o.validate;
|
const super_validate = o.validate;
|
||||||
o.validate = function(section_id, value) {
|
o.validate = function(section_id, value) {
|
||||||
if (value === "tor" && !isTorInstalledForUi()) {
|
|
||||||
ui.showModal(_("Install Tor"), [
|
|
||||||
E("p", _("The tor package is required to use the Darknet gateway. Do you want to install it automatically? (This will take about a minute)")),
|
|
||||||
E("div", { class: "right" }, [
|
|
||||||
E("button", {
|
|
||||||
class: "cbi-button cbi-button-neutral",
|
|
||||||
click: ui.hideModal
|
|
||||||
}, _("Cancel")),
|
|
||||||
E("button", {
|
|
||||||
class: "cbi-button cbi-button-action important",
|
|
||||||
click: function() {
|
|
||||||
ui.showModal(_("Installing Tor..."), [
|
|
||||||
E("p", { class: "spinning" }, _("Please wait. Installing via package manager..."))
|
|
||||||
]);
|
|
||||||
main.TachyonShellMethods.installTor().then(function(res) {
|
|
||||||
ui.hideModal();
|
|
||||||
if (res && res.success) {
|
|
||||||
ui.addNotification(null, E("p", _("Tor successfully installed! Please select the action again.")));
|
|
||||||
actionProvidersAvailabilityState.torInstalled = true;
|
|
||||||
} else {
|
|
||||||
ui.addNotification(null, E("p", _("Failed to install Tor. Code: ") + (res ? (res.error || res.code || "timeout") : "unknown")));
|
|
||||||
}
|
|
||||||
}).catch(function(err) {
|
|
||||||
ui.hideModal();
|
|
||||||
ui.addNotification(null, E("p", _("Command execution error: ") + err.message));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, _("Install"))
|
|
||||||
])
|
|
||||||
]);
|
|
||||||
return _("The tor package is not installed.");
|
|
||||||
}
|
|
||||||
return super_validate ? super_validate.apply(this, [section_id, value]) : true;
|
return super_validate ? super_validate.apply(this, [section_id, value]) : true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2843,32 +2843,4 @@ msgstr "Закрыть"
|
|||||||
msgid "Cannot save settings"
|
msgid "Cannot save settings"
|
||||||
msgstr "Не удалось сохранить настройки"
|
msgstr "Не удалось сохранить настройки"
|
||||||
|
|
||||||
msgid "Install Tor"
|
|
||||||
msgstr "Установить Tor"
|
|
||||||
|
|
||||||
msgid "The tor package is required to use the Darknet gateway. Do you want to install it automatically? (This will take about a minute)"
|
|
||||||
msgstr "Для работы шлюза Darknet необходим пакет tor. Хотите установить его автоматически? (Это займёт около минуты)"
|
|
||||||
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Отмена"
|
|
||||||
|
|
||||||
msgid "Installing Tor..."
|
|
||||||
msgstr "Установка Tor..."
|
|
||||||
|
|
||||||
msgid "Please wait. Installing via package manager..."
|
|
||||||
msgstr "Пожалуйста, подождите. Идёт установка через пакетный менеджер..."
|
|
||||||
|
|
||||||
msgid "Tor successfully installed! Please select the action again."
|
|
||||||
msgstr "Tor успешно установлен! Пожалуйста, выберите действие снова."
|
|
||||||
|
|
||||||
msgid "Failed to install Tor. Code: "
|
|
||||||
msgstr "Не удалось установить Tor. Код: "
|
|
||||||
|
|
||||||
msgid "Command execution error: "
|
|
||||||
msgstr "Ошибка выполнения команды: "
|
|
||||||
|
|
||||||
msgid "Install"
|
|
||||||
msgstr "Установить"
|
|
||||||
|
|
||||||
msgid "The tor package is not installed."
|
|
||||||
msgstr "Пакет tor не установлен."
|
|
||||||
|
|||||||
@@ -3978,6 +3978,11 @@ msgstr ""
|
|||||||
msgid "Destination IP or CIDR"
|
msgid "Destination IP or CIDR"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Forced destination routing"
|
||||||
|
|
||||||
|
msgid "Destination IP or CIDR"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Forced destination routing"
|
msgid "Forced destination routing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -3986,3 +3991,33 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "All Routes"
|
msgid "All Routes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Install Tor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The tor package is required to use the Darknet gateway. Do you want to install it automatically? (This will take about a minute)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Installing Tor..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Please wait. Installing via package manager..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Tor successfully installed! Please select the action again."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Failed to install Tor. Code: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Command execution error: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Install"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The tor package is not installed."
|
||||||
|
msgstr ""
|
||||||
|
|||||||
@@ -813,13 +813,13 @@ function rule_action(section) {
|
|||||||
function rule_action_supported(action) {
|
function rule_action_supported(action) {
|
||||||
return contains([ "connection", "proxy", "outbound", "vpn", "awg", "warp",
|
return contains([ "connection", "proxy", "outbound", "vpn", "awg", "warp",
|
||||||
"anytls", "snell", "mieru", "sudoku", "masque", "openvpn",
|
"anytls", "snell", "mieru", "sudoku", "masque", "openvpn",
|
||||||
"bypass", "block", "dns", "zapret", "zapret2", "byedpi", "tor" ], as_string(action));
|
"bypass", "block", "dns", "zapret", "zapret2", "byedpi" ], as_string(action));
|
||||||
}
|
}
|
||||||
|
|
||||||
function server_routing_section_action_supported(action) {
|
function server_routing_section_action_supported(action) {
|
||||||
return contains([ "connection", "proxy", "outbound", "vpn", "awg", "warp",
|
return contains([ "connection", "proxy", "outbound", "vpn", "awg", "warp",
|
||||||
"anytls", "snell", "mieru", "sudoku", "masque", "openvpn",
|
"anytls", "snell", "mieru", "sudoku", "masque", "openvpn",
|
||||||
"zapret", "zapret2", "byedpi", "tor" ], as_string(action));
|
"zapret", "zapret2", "byedpi" ], as_string(action));
|
||||||
}
|
}
|
||||||
|
|
||||||
function duration_to_seconds_value(value) {
|
function duration_to_seconds_value(value) {
|
||||||
|
|||||||
@@ -1095,7 +1095,6 @@ function build_system_info() {
|
|||||||
zapret2_installed,
|
zapret2_installed,
|
||||||
byedpi_version,
|
byedpi_version,
|
||||||
byedpi_installed,
|
byedpi_installed,
|
||||||
tor_installed: command_exists("tor") ? 1 : 0,
|
|
||||||
openwrt_version: openwrt_release(),
|
openwrt_version: openwrt_release(),
|
||||||
device_model,
|
device_model,
|
||||||
generated_at: int(clock()[0])
|
generated_at: int(clock()[0])
|
||||||
@@ -2578,19 +2577,7 @@ else if (mode == "check-zapret2-runtime")
|
|||||||
else if (mode == "check-byedpi-runtime")
|
else if (mode == "check-byedpi-runtime")
|
||||||
exit(module_passthrough(BYEDPI_RUNTIME_UC, [ "check" ]));
|
exit(module_passthrough(BYEDPI_RUNTIME_UC, [ "check" ]));
|
||||||
else if (mode == "check-tor-runtime") {
|
else if (mode == "check-tor-runtime") {
|
||||||
print(sprintf("%J", { success: true, data: { tor_installed: command_exists("tor") } }));
|
print(sprintf("%J", { success: true, data: { tor_installed: 0 } }));
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
else if (mode == "install-tor") {
|
|
||||||
let code = 1;
|
|
||||||
if (command_exists("apk")) {
|
|
||||||
system("apk update >/dev/null 2>&1");
|
|
||||||
code = system("apk add tor >/dev/null 2>&1");
|
|
||||||
} else {
|
|
||||||
system("opkg update >/dev/null 2>&1");
|
|
||||||
code = system("opkg install tor >/dev/null 2>&1");
|
|
||||||
}
|
|
||||||
print(sprintf("%J", { success: command_exists("tor"), code: code }));
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
else if (mode == "neutralize-zapret-defaults")
|
else if (mode == "neutralize-zapret-defaults")
|
||||||
|
|||||||
@@ -493,26 +493,10 @@ function base_config(settings, service_address, runtime_context) {
|
|||||||
for (let inbound in dns_config.inbounds)
|
for (let inbound in dns_config.inbounds)
|
||||||
push(inbounds, inbound);
|
push(inbounds, inbound);
|
||||||
|
|
||||||
let has_tor = false;
|
|
||||||
for (let sec in uci_core.section_objects(CONFIG_NAME, "section")) {
|
|
||||||
if (option(sec, "action", "") == "tor") {
|
|
||||||
has_tor = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let default_outbounds = [
|
let default_outbounds = [
|
||||||
{ type: "direct", tag: runtime_constants.DIRECT_OUTBOUND_TAG },
|
{ type: "direct", tag: runtime_constants.DIRECT_OUTBOUND_TAG },
|
||||||
{ type: "direct", tag: runtime_constants.BYPASS_OUTBOUND_TAG }
|
{ type: "direct", tag: runtime_constants.BYPASS_OUTBOUND_TAG }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (has_tor) {
|
|
||||||
push(default_outbounds, {
|
|
||||||
type: "tor",
|
|
||||||
tag: "tor-out",
|
|
||||||
executable_path: option(settings, "tor_executable_path", "/usr/sbin/tor")
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
runtime_context = object_or_empty(runtime_context);
|
runtime_context = object_or_empty(runtime_context);
|
||||||
runtime_context.dns_health_inbounds = dns_config.sniff_inbounds;
|
runtime_context.dns_health_inbounds = dns_config.sniff_inbounds;
|
||||||
@@ -1525,7 +1509,7 @@ function apply_section_detour_to_connection_outbounds(config, start_index, detou
|
|||||||
|
|
||||||
function mixed_proxy_enabled_action(action) {
|
function mixed_proxy_enabled_action(action) {
|
||||||
return action == "connection" || action == "proxy" || action == "outbound" || action == "vpn" ||
|
return action == "connection" || action == "proxy" || action == "outbound" || action == "vpn" ||
|
||||||
action == "awg" || action == "byedpi" || action == "zapret" || action == "zapret2" || action == "tor";
|
action == "awg" || action == "byedpi" || action == "zapret" || action == "zapret2";
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_mixed_proxy_for_section(config, section, service_address) {
|
function add_mixed_proxy_for_section(config, section, service_address) {
|
||||||
@@ -2560,16 +2544,6 @@ function add_byedpi_outbound(config, section, sections) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_tor_outbound(config, section) {
|
|
||||||
push(config.outbounds, {
|
|
||||||
type: "socks",
|
|
||||||
tag: outbound_tag(section[".name"]),
|
|
||||||
server: "127.0.0.1",
|
|
||||||
server_port: 9050,
|
|
||||||
version: "5"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function ensure_community_ruleset(config, section_name, community) {
|
function ensure_community_ruleset(config, section_name, community) {
|
||||||
if (!runtime_rulesets.is_community(community))
|
if (!runtime_rulesets.is_community(community))
|
||||||
runtime_generate_unsupported("unknown community list " + community);
|
runtime_generate_unsupported("unknown community list " + community);
|
||||||
@@ -3050,8 +3024,6 @@ function add_outbound_for_section(config, section, taken, sections) {
|
|||||||
add_zapret2_outbound(config, section, sections);
|
add_zapret2_outbound(config, section, sections);
|
||||||
else if (action == "byedpi")
|
else if (action == "byedpi")
|
||||||
add_byedpi_outbound(config, section, sections);
|
add_byedpi_outbound(config, section, sections);
|
||||||
else if (action == "tor")
|
|
||||||
add_tor_outbound(config, section);
|
|
||||||
else if (action == "bypass") {
|
else if (action == "bypass") {
|
||||||
/* route-only action */
|
/* route-only action */
|
||||||
}
|
}
|
||||||
@@ -3072,7 +3044,7 @@ function reserve_section_outbound_tags(sections, taken) {
|
|||||||
if (connections.is_connections_action(action) ||
|
if (connections.is_connections_action(action) ||
|
||||||
action == "awg" || action == "warp" || action == "byedpi" || action == "zapret" || action == "zapret2" ||
|
action == "awg" || action == "warp" || action == "byedpi" || action == "zapret" || action == "zapret2" ||
|
||||||
action == "anytls" || action == "snell" || action == "mieru" || action == "sudoku" ||
|
action == "anytls" || action == "snell" || action == "mieru" || action == "sudoku" ||
|
||||||
action == "masque" || action == "openvpn" || action == "tor")
|
action == "masque" || action == "openvpn")
|
||||||
taken[outbound_tag(section[".name"])] = true;
|
taken[outbound_tag(section[".name"])] = true;
|
||||||
|
|
||||||
if (!connections.is_connections_action(action))
|
if (!connections.is_connections_action(action))
|
||||||
@@ -3099,7 +3071,7 @@ function add_service_route_rules(config, sections) {
|
|||||||
if (connections.is_connections_action(action) ||
|
if (connections.is_connections_action(action) ||
|
||||||
action == "awg" || action == "warp" || action == "byedpi" || action == "zapret" || action == "zapret2" ||
|
action == "awg" || action == "warp" || action == "byedpi" || action == "zapret" || action == "zapret2" ||
|
||||||
action == "anytls" || action == "snell" || action == "mieru" || action == "sudoku" ||
|
action == "anytls" || action == "snell" || action == "mieru" || action == "sudoku" ||
|
||||||
action == "masque" || action == "openvpn" || action == "tor") {
|
action == "masque" || action == "openvpn") {
|
||||||
first = section;
|
first = section;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ function target(section, outbound_tag_name) {
|
|||||||
action == "masque" || action == "openvpn" ||
|
action == "masque" || action == "openvpn" ||
|
||||||
action == "byedpi" || action == "zapret" || action == "zapret2")
|
action == "byedpi" || action == "zapret" || action == "zapret2")
|
||||||
return { action: "route", outbound: outbound_tag_name };
|
return { action: "route", outbound: outbound_tag_name };
|
||||||
if (action == "tor")
|
|
||||||
return { action: "route", outbound: "tor-out" };
|
|
||||||
if (action == "bypass")
|
if (action == "bypass")
|
||||||
return { action: "route", outbound: runtime_constants.BYPASS_OUTBOUND_TAG };
|
return { action: "route", outbound: runtime_constants.BYPASS_OUTBOUND_TAG };
|
||||||
if (action == "block")
|
if (action == "block")
|
||||||
|
|||||||
Reference in New Issue
Block a user