update 2024-01-18 16:21:55
This commit is contained in:
parent
139bbb9083
commit
60b85713d5
|
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_ARCH_LINKEASE:=$(ARCH)
|
||||
|
||||
PKG_NAME:=linkease
|
||||
PKG_VERSION:=1.3.3
|
||||
PKG_VERSION:=1.3.5
|
||||
PKG_RELEASE:=$(PKG_ARCH_LINKEASE)-2
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://fw0.koolcenter.com/binary/LinkEase/LinuxStorage/
|
||||
PKG_HASH:=9572e391abea8896ef50f5c53ee9893d06bd4e9ef849ac7148de4e54a7f55447
|
||||
PKG_HASH:=cbd58d21c950b0dc9111a998dc4e887226581360de4b1adbf8dff5f51acbf582
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ Fork this repository and:
|
|||
* 2023-12-20 chore: bump version
|
||||
* 2023-12-22 chore: optimize list folded format; add roundRobin balancer
|
||||
* 2024-01-04 chore: start later than sysntpd; change firewall include file path
|
||||
* 2024-01-18 feat: make "Resolve Domain via DNS" available to all outbounds
|
||||
|
||||
## Changelog since 3.1.0
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@ import { cursor } from "uci";
|
|||
export function load_config() {
|
||||
const uci = cursor();
|
||||
uci.load("xray_core");
|
||||
return uci.get_all("xray_core");
|
||||
return uci.get_all("xray_core") || {};
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import { lsdir } from "fs";
|
||||
import { fake_dns_domains } from "./fake_dns.mjs";
|
||||
import { balancer } from "./system.mjs";
|
||||
|
||||
const fallback_fast_dns = "223.5.5.5:53";
|
||||
const fallback_secure_dns = "8.8.8.8:53";
|
||||
|
@ -25,25 +24,6 @@ function split_ipv4_host_port(val, port_default) {
|
|||
};
|
||||
}
|
||||
|
||||
function upstream_domain_names(proxy, config) {
|
||||
let domain_names_set = {};
|
||||
let domain_extra_options = {};
|
||||
for (let b in ["tcp_balancer_v4", "tcp_balancer_v6", "udp_balancer_v4", "udp_balancer_v6"]) {
|
||||
for (let i in balancer(proxy, b, b)) {
|
||||
const server = config[substr(i, -9)];
|
||||
if (server) {
|
||||
if (!server["domain_resolve_dns"]) {
|
||||
domain_names_set[server["server"]] = true;
|
||||
} else {
|
||||
domain_extra_options[server["server"]] = server["domain_resolve_dns"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// todo: add dialer proxy references here
|
||||
return [keys(domain_names_set), domain_extra_options];
|
||||
}
|
||||
|
||||
function domain_rules(proxy, k) {
|
||||
if (proxy[k] == null) {
|
||||
return [];
|
||||
|
@ -116,11 +96,25 @@ export function dns_server_outbound() {
|
|||
export function dns_conf(proxy, config, manual_tproxy, fakedns) {
|
||||
const fast_dns_object = split_ipv4_host_port(proxy["fast_dns"] || fallback_fast_dns, 53);
|
||||
const default_dns_object = split_ipv4_host_port(proxy["default_dns"] || fallback_default_dns, 53);
|
||||
const upstream_domain_options = upstream_domain_names(proxy, config);
|
||||
|
||||
let domain_names_set = {};
|
||||
let domain_extra_options = {};
|
||||
|
||||
for (let server in filter(values(config), i => i[".type"] == "servers")) {
|
||||
if (iptoarr(server["server"])) {
|
||||
continue;
|
||||
}
|
||||
if (server["domain_resolve_dns"]) {
|
||||
domain_extra_options[server["server"]] = server["domain_resolve_dns"];
|
||||
} else {
|
||||
domain_names_set[`domain:${server["server"]}`] = true;
|
||||
}
|
||||
}
|
||||
|
||||
let servers = [
|
||||
...fake_dns_domains(fakedns),
|
||||
...map(keys(upstream_domain_options[1]), function (k) {
|
||||
const i = split_ipv4_host_port(upstream_domain_options[1][k]);
|
||||
...map(keys(domain_extra_options), function (k) {
|
||||
const i = split_ipv4_host_port(domain_extra_options[k]);
|
||||
i["domains"] = [`domain:${k}`];
|
||||
i["skipFallback"] = true;
|
||||
return i;
|
||||
|
@ -129,7 +123,7 @@ export function dns_conf(proxy, config, manual_tproxy, fakedns) {
|
|||
{
|
||||
address: fast_dns_object["address"],
|
||||
port: fast_dns_object["port"],
|
||||
domains: [...upstream_domain_options[0], ...fast_domain_rules(proxy)],
|
||||
domains: [...keys(domain_names_set), ...fast_domain_rules(proxy)],
|
||||
skipFallback: true,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -13,19 +13,23 @@ import { blackhole_outbound, direct_outbound, server_outbound } from "./feature/
|
|||
import { api_conf, balancer, logging, metrics_conf, policy, system_route_rules } from "./feature/system.mjs";
|
||||
|
||||
function inbounds(proxy, config, extra_inbound) {
|
||||
const tproxy_sniffing = proxy["tproxy_sniffing"];
|
||||
const route_only = proxy["route_only"];
|
||||
const conn_idle = proxy["conn_idle"];
|
||||
|
||||
let i = [
|
||||
socks_inbound("0.0.0.0", proxy["socks_port"] || 1080, "socks_inbound"),
|
||||
http_inbound("0.0.0.0", proxy["http_port"] || 1081, "http_inbound"),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_v4"] || 1082, "tproxy_tcp_inbound_v4", proxy["tproxy_sniffing"], proxy["route_only"], ["http", "tls"], "0", "tcp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_v6"] || 1083, "tproxy_tcp_inbound_v6", proxy["tproxy_sniffing"], proxy["route_only"], ["http", "tls"], "0", "tcp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_v4"] || 1084, "tproxy_udp_inbound_v4", proxy["tproxy_sniffing"], proxy["route_only"], ["quic"], "0", "udp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_v6"] || 1085, "tproxy_udp_inbound_v6", proxy["tproxy_sniffing"], proxy["route_only"], ["quic"], "0", "udp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_v4"] || 1082, "tproxy_tcp_inbound_v4", tproxy_sniffing, route_only, ["http", "tls"], "0", "tcp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_v6"] || 1083, "tproxy_tcp_inbound_v6", tproxy_sniffing, route_only, ["http", "tls"], "0", "tcp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_v4"] || 1084, "tproxy_udp_inbound_v4", tproxy_sniffing, route_only, ["quic"], "0", "udp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_v6"] || 1085, "tproxy_udp_inbound_v6", tproxy_sniffing, route_only, ["quic"], "0", "udp", "tproxy", conn_idle),
|
||||
...extra_inbounds(proxy, extra_inbound),
|
||||
...dns_server_inbounds(proxy),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_f4"] || 1086, "tproxy_tcp_inbound_f4", "1", "0", ["fakedns"], "1", "tcp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_f6"] || 1087, "tproxy_tcp_inbound_f6", "1", "0", ["fakedns"], "1", "tcp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_f4"] || 1088, "tproxy_udp_inbound_f4", "1", "0", ["fakedns"], "1", "udp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_f6"] || 1089, "tproxy_udp_inbound_f6", "1", "0", ["fakedns"], "1", "udp", "tproxy", proxy["conn_idle"]),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_f4"] || 1086, "tproxy_tcp_inbound_f4", "1", "0", ["fakedns"], "1", "tcp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_tcp_f6"] || 1087, "tproxy_tcp_inbound_f6", "1", "0", ["fakedns"], "1", "tcp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_f4"] || 1088, "tproxy_udp_inbound_f4", "1", "0", ["fakedns"], "1", "udp", "tproxy", conn_idle),
|
||||
dokodemo_inbound("0.0.0.0", proxy["tproxy_port_udp_f6"] || 1089, "tproxy_udp_inbound_f6", "1", "0", ["fakedns"], "1", "udp", "tproxy", conn_idle),
|
||||
];
|
||||
if (proxy["web_server_enable"] == "1") {
|
||||
push(i, https_inbound(proxy, config));
|
||||
|
@ -274,13 +278,13 @@ function gen_config() {
|
|||
const geoip_existence = index(share_dir, "geoip.dat") > 0;
|
||||
|
||||
const config = load_config();
|
||||
const general = config[filter(keys(config), k => config[k][".type"] == "general")[0]];
|
||||
const bridge = map(filter(keys(config), k => config[k][".type"] == "bridge") || [], k => config[k]);
|
||||
const fakedns = map(filter(keys(config), k => config[k][".type"] == "fakedns") || [], k => config[k]);
|
||||
const extra_inbound = map(filter(keys(config), k => config[k][".type"] == "extra_inbound") || [], k => config[k]);
|
||||
const manual_tproxy = map(filter(keys(config), k => config[k][".type"] == "manual_tproxy") || [], k => config[k]);
|
||||
const custom_configuration_hook = loadstring(general["custom_configuration_hook"] || "return i => i;")();
|
||||
const bridge = filter(values(config), v => v[".type"] == "bridge") || [];
|
||||
const fakedns = filter(values(config), v => v[".type"] == "fakedns") || [];
|
||||
const extra_inbound = filter(values(config), v => v[".type"] == "extra_inbound") || [];
|
||||
const manual_tproxy = filter(values(config), v => v[".type"] == "manual_tproxy") || [];
|
||||
|
||||
const general = filter(values(config), k => k[".type"] == "general")[0] || {};
|
||||
const custom_configuration_hook = loadstring(general["custom_configuration_hook"] || "return i => i;")();
|
||||
return custom_configuration_hook({
|
||||
inbounds: inbounds(general, config, extra_inbound),
|
||||
outbounds: outbounds(general, config, manual_tproxy, bridge, extra_inbound, fakedns),
|
||||
|
|
|
@ -176,7 +176,7 @@ return view.extend({
|
|||
o.default = "UseIP";
|
||||
o.modalonly = true;
|
||||
|
||||
o = ss.taboption('general', form.Value, 'domain_resolve_dns', _('Resolve Domain via DNS'), _("Specify a DNS to resolve server hostname. Only works for main balancers (those on General Settings tab)."));
|
||||
o = ss.taboption('general', form.Value, 'domain_resolve_dns', _('Resolve Domain via DNS'), _("Specify a DNS to resolve server hostname. Be careful of possible recursion."));
|
||||
o.datatype = 'hostport';
|
||||
o.modalonly = true;
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_ARCH_quickstart:=$(ARCH)
|
||||
|
||||
PKG_NAME:=quickstart
|
||||
PKG_VERSION:=0.8.3
|
||||
PKG_VERSION:=0.8.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/linkease/istore-packages/releases/download/prebuilt/
|
||||
PKG_HASH:=f8f23fb5865cac6926a8debc87646cd6b65e3c1cf3d04e659b8043f6d826926c
|
||||
PKG_HASH:=6747fbf779f869c6c63961f1b17f5e9bb5f26652afd3b3b7541e6d8b8ee4646f
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202401110041
|
||||
GEOIP_VER:=202401180041
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=37ec29d3aec3d22a575da7d6e858e22a492eafb8abc34a0b288d353acf6ee1a2
|
||||
HASH:=82abcfbb9b2e92b7f1ede47bc8318e58232f773c9541f2c82d05e6fb5f473fd1
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20240105034708
|
||||
|
|
Loading…
Reference in New Issue