Dawnline 0.13.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
- "Internet like a home device" starts off on new servers: sending the tunnel through the home network costs speed. Both server wizards (the first one and "Add server") have the switch, and on it says what it costs. Servers that have it on keep it - With it off, Server → Access says what that means: DNS still goes through the router, its proxies and filters see the tunnel only once its interface is added to their source interfaces, and sites the router's DNS answers with proxy addresses won't open - With it on, established connections skip the second pass through netfilter in Dawnline's network namespace (a software flowtable): about 12% less router CPU per packet, and about a quarter more speed through a proxy on the router. Without kmod-nft-offload the old rules load and the service log says so - Its address at home stays the same when it is turned off and on again; it moved down by one each time (.254, .253, .252) - Less CPU for the same work: the background agent's once-a-second look at the tunnels, Status, Health and the portal no longer compile the same patterns again for each line, address and device. At idle the agent uses about a quarter of the CPU it did; a portal request 5-10 ms less - On LuCI's Bootstrap themes the admin looks as it does on Outline: cards and menus a step above the page, icon tiles that keep their colour, Outline's status colours in dark mode. The choices in Settings → Logs & history and Updates are LuCI's own controls in every theme - "Add from devices at home" keeps a device's name readable in a narrow window: its ports go under the name - DESIGN.md describes the portal's look, components and motion, and the rules send portal work there first. lint-ucode no longer ends a function at a brace inside a template literal
This commit is contained in:
1 parent
db9657c01c
commit
58492be021
44 files changed
+2269
-235
No files matched your search
+39
-1
@@ -1,8 +1,10 @@
|
||||
// dawnline.awg: disguise presets against their own validation, the parser
|
||||
// of `awg show all dump` on the output formats of AmneziaWG 1.0, 2.0 and 3.1
|
||||
// (the stand-in awg in fixtures/bin prints the fixture put at AWG_DUMP), and Reconnect.
|
||||
// (the stand-in awg in fixtures/bin prints the fixture put at AWG_DUMP),
|
||||
// Reconnect, and a device's configuration from the fixture model.
|
||||
import { readfile, writefile, unlink } from 'fs';
|
||||
import * as awg from 'dawnline.awg';
|
||||
import * as core from 'dawnline.core';
|
||||
|
||||
const AWG_DUMP = '/tmp/dawnline-tests/awg-dump';
|
||||
let fixtures = sourcepath(0, true) + '/fixtures';
|
||||
@@ -115,3 +117,39 @@ test('blocked reasons', () => {
|
||||
eq(awg.blocked_text(srv('has an invalid interface name "x"')), 'Home has an invalid interface name "x".', 'old fragment');
|
||||
eq(awg.blocked_note({ code: 'ifname', ifname: 'x' }), 'has an invalid interface name "x"', 'the log keeps the fragment');
|
||||
});
|
||||
|
||||
test('client_config: an IPv6 endpoint in brackets, without a regex', () => {
|
||||
let m = core.load();
|
||||
let srv = m.servers.main, dev = m.devices.alice_phone;
|
||||
let ep = (h) => {
|
||||
srv.endpoint = h;
|
||||
return match(awg.client_config(m, dev).conf, /\nEndpoint = ([^\n]*)\n/)?.[1];
|
||||
};
|
||||
eq(ep('vpn.example.com'), 'vpn.example.com:51820', 'a name');
|
||||
eq(ep('203.0.113.7'), '203.0.113.7:51820', 'IPv4');
|
||||
eq(ep('2001:db8::1'), '[2001:db8::1]:51820', 'IPv6');
|
||||
eq(ep('[2001:db8::1]'), '[2001:db8::1]:51820', 'IPv6 in brackets already');
|
||||
eq(ep(''), 'vpn.example.com:51820', 'the portal name when the server has none');
|
||||
// The regexes it stands for, on hosts changed at each character.
|
||||
for (let h in [ '2001:db8::1', '[::1]', 'a.b' ])
|
||||
for (let i = 0; i <= length(h); i++)
|
||||
for (let c in [ ':', '[', ']', 'a', '' ]) {
|
||||
let s = `${substr(h, 0, i)}${c}${substr(h, i + 1)}`;
|
||||
let want = match(s, /:/) && !match(s, /^\[/) ? `[${s}]` : s;
|
||||
eq(ep(s), `${want || 'vpn.example.com'}:51820`, s);
|
||||
}
|
||||
});
|
||||
|
||||
test('config_fingerprint leaves out the private key and the junk', () => {
|
||||
let m = core.load();
|
||||
let dev = m.devices.alice_phone;
|
||||
let f = awg.config_fingerprint(m, dev);
|
||||
ok(match(f, /^[0-9a-f]{8}$/), 'eight hex digits');
|
||||
dev.private_key = 'yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=';
|
||||
eq(awg.config_fingerprint(m, dev), f, 'a private key');
|
||||
m.servers.main.obf.jc = '7';
|
||||
eq(awg.config_fingerprint(m, dev), f, 'another junk count');
|
||||
m.servers.main.port = 51821;
|
||||
ok(awg.config_fingerprint(m, dev) != f, 'another port');
|
||||
eq(awg.config_fingerprint(m, null), null, 'no device');
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
// dawnline.core: the model read from the fixture config (real libuci), access
|
||||
// hours, quotas and the derived person state at an explicit time, address
|
||||
// allocation and the automatic MTU.
|
||||
// allocation, the automatic MTU, and other packages' port forwards.
|
||||
import { readfile, writefile, unlink } from 'fs';
|
||||
import * as core from 'dawnline.core';
|
||||
|
||||
// A local time that no time zone turns into another day.
|
||||
@@ -164,3 +165,29 @@ test('device_labels', () => {
|
||||
let p = { id: 'p', devices: [ 'd', 'c', 'b', 'a' ] };
|
||||
eq(core.device_labels(mm, p), { a: 'iphone', b: 'iphone-2', c: 'telefon', d: 'telefon-2' }, 'unique by age');
|
||||
});
|
||||
|
||||
test('wan_forwards leaves out Dawnline\'s own, without a regex', () => {
|
||||
// A firewall config for this case only (the container's own is put back).
|
||||
let path = '/etc/config/firewall', saved = readfile(path);
|
||||
let names = [ 'dawnline_portal', 'dawnline_', 'dawnline', 'Dawnline_x', 'xdawnline_y', 'dawnlinex_1', 'web' ];
|
||||
let conf = '';
|
||||
for (let i = 0; i < length(names); i++)
|
||||
conf += sprintf("config redirect '%s'\n\toption src 'wan'\n\toption proto 'udp'\n\toption src_dport '%d'\n\n", names[i], 6000 + i);
|
||||
writefile(path, conf);
|
||||
let got = null, err = null;
|
||||
try {
|
||||
got = core.wan_forwards('wan', 'udp');
|
||||
}
|
||||
catch (e) {
|
||||
err = e;
|
||||
}
|
||||
if (saved != null)
|
||||
writefile(path, saved);
|
||||
else
|
||||
unlink(path);
|
||||
if (err)
|
||||
die(err.message);
|
||||
// The names the pattern it stands for let through.
|
||||
eq(map(got, (f) => f.name), filter(names, (n) => !match(n, /^dawnline_/)), 'names');
|
||||
eq(got[0], { from: 6002, to: 6002, name: 'dawnline' }, 'a forward');
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
// dawnline.loop: the "like a home device" link's errors, stored as codes and
|
||||
// put into words when read.
|
||||
// put into words when read; the netns's MAC and which LAN address it may use.
|
||||
import * as loop from 'dawnline.loop';
|
||||
import { ip2int, parse_cidr } from 'dawnline.util';
|
||||
|
||||
test('error_text', () => {
|
||||
eq(loop.error_text(null), null, 'no error');
|
||||
@@ -10,3 +11,48 @@ test('error_text', () => {
|
||||
eq(loop.error_text({ code: 'setup', detail: 'ip: RTNETLINK answers: File exists' }), 'Setup failed: ip: RTNETLINK answers: File exists', 'setup');
|
||||
eq(loop.error_text('an old message'), 'an old message', 'older files: as written');
|
||||
});
|
||||
|
||||
test('lan_mac', () => {
|
||||
let mac = loop.lan_mac('d4:0d:ab:06:94:aa\n');
|
||||
// Pinned: another MAC after an update would make the netns look like someone else once.
|
||||
eq(mac, '7a:4e:71:7a:e0:83', 'hashed from the bridge MAC, as sysfs gives it');
|
||||
eq(loop.lan_mac('D4:0D:AB:06:94:AA'), mac, 'the same however it is written');
|
||||
ok(loop.lan_mac('d4:0d:ab:06:94:ab') != mac, 'another bridge, another MAC');
|
||||
for (let b in [ 'd4:0d:ab:06:94:aa', 'd4:0d:ab:06:94:ab', '00:00:00:00:00:00', 'ff:ff:ff:ff:ff:ff' ]) {
|
||||
let m = loop.lan_mac(b);
|
||||
ok(match(m, /^[0-9a-f]{2}(:[0-9a-f]{2}){5}$/), `${b}: a MAC`);
|
||||
let first = hex(substr(m, 0, 2));
|
||||
eq([ first & 1, first & 2 ], [ 0, 2 ], `${b}: unicast, locally administered`);
|
||||
}
|
||||
});
|
||||
|
||||
test('address_free', () => {
|
||||
let lan = parse_cidr('10.0.1.1/24');
|
||||
let facts = { pool: [ ip2int('10.0.1.100'), ip2int('10.0.1.249') ], statics: [ ip2int('10.0.1.50') ] };
|
||||
let ours = '7a:4e:71:7a:e0:83', old = '7e:8b:31:7d:04:ba', other = '3c:22:fb:01:02:03';
|
||||
let free = (ip, used, mine) => loop.address_free(ip2int(ip), lan, facts, used ?? {}, mine ?? [ ours, null ]);
|
||||
ok(free('10.0.1.254'), 'nobody on it');
|
||||
ok(free('10.0.1.254', { '10.0.1.254': ours }), 'the neighbour entry of the netns before it was created again');
|
||||
ok(free('10.0.1.254', { '10.0.1.254': old }, [ ours, old ]), 'the netns as it is now (an older version gave it a random MAC)');
|
||||
ok(!free('10.0.1.254', { '10.0.1.254': old }), 'a MAC that is not the netns\'s: someone else');
|
||||
ok(!free('10.0.1.254', { '10.0.1.254': other }, [ ours, null ]), 'another device');
|
||||
ok(!free('10.0.1.254', { '10.0.1.254': true }), 'an entry without a MAC');
|
||||
ok(!free('10.0.1.1'), 'the router');
|
||||
ok(!free('10.0.1.50'), 'a static lease');
|
||||
ok(!free('10.0.1.100') && !free('10.0.1.249'), 'the DHCP pool');
|
||||
ok(free('10.0.1.99') && free('10.0.1.250'), 'next to the pool');
|
||||
ok(!free('10.0.1.0') && !free('10.0.1.255'), 'the network and broadcast addresses');
|
||||
ok(loop.address_free(ip2int('10.0.1.120'), lan, { pool: null, statics: [] }, {}, [ ours ]), 'no DHCP on the LAN: the pool is free');
|
||||
});
|
||||
|
||||
// The netns's rules: the flowtable only on the netns's own links, never on
|
||||
// the root namespace's (the guard on dawn0 must see every packet).
|
||||
test('ns_rules', () => {
|
||||
let p = { address: '10.0.1.250', dns: '10.0.1.1' };
|
||||
let fast = loop.ns_rules(p, true), plain = loop.ns_rules(p, false);
|
||||
eq(map(match(fast, /devices = \{ ([^}]*) \}/g), (m) => m[1]), [ '"dlx1", "dll1"' ], 'one flowtable, on dlx1 and dll1 only');
|
||||
ok(!match(fast, /dlx0|dll0/), 'no root namespace link');
|
||||
ok(index(fast, 'ct state established meta l4proto { tcp, udp } flow add @ft') >= 0, 'established flows added');
|
||||
ok(index(plain, 'flowtable') < 0 && index(plain, 'flow add') < 0, 'plain: no flowtable');
|
||||
eq(replace(fast, /\n\tflowtable ft \{(\n\t\t[^\n]*)*\n\t\}|\n\t\tct state established meta l4proto \{ tcp, udp \} flow add @ft/g, ''), plain, 'otherwise the same rules');
|
||||
});
|
||||
@@ -55,6 +55,76 @@ test('valid_slug and valid_key', () => {
|
||||
ok(!util.valid_key(''), 'empty');
|
||||
});
|
||||
|
||||
test('valid_key without a regex', () => {
|
||||
let k = 'yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=';
|
||||
ok(util.valid_key('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop0='), 'letters');
|
||||
ok(util.valid_key('qrstuvwxyz0123456789+/qrstuvwxyz0123456789w='), 'digits, + and /');
|
||||
ok(!util.valid_key(`${k}=`), '45 characters');
|
||||
ok(!util.valid_key(substr(k, 1)), '43 characters');
|
||||
ok(!util.valid_key(replace(k, '+', '-')), 'URL-safe alphabet');
|
||||
ok(!util.valid_key(`${substr(k, 0, 20)}=${substr(k, 21)}`), 'padding inside');
|
||||
ok(!util.valid_key(`${substr(k, 0, 20)}\u0000${substr(k, 21)}`), 'NUL byte');
|
||||
ok(!util.valid_key(`${k}\u0000x`), 'NUL and more after the key');
|
||||
ok(!util.valid_key(` ${substr(k, 1)}`), 'space');
|
||||
ok(!util.valid_key(null), 'null');
|
||||
ok(!util.valid_key([ k ]), 'array');
|
||||
// The pattern it stands for, on keys changed at both ends and in the middle.
|
||||
let re = /^[A-Za-z0-9+\/]{42}[AEIMQUYcgkosw048]=$/;
|
||||
for (let i in [ 0, 1, 21, 41, 42, 43 ])
|
||||
for (let c in [ 'A', 'z', '0', '9', '+', '/', 'b', 'k', '=', '-', '_', ' ', '.', '\n' ]) {
|
||||
let s = `${substr(k, 0, i)}${c}${substr(k, i + 1)}`;
|
||||
eq(util.valid_key(s), match(s, re) != null, s);
|
||||
}
|
||||
});
|
||||
|
||||
test('valid_host without a regex', () => {
|
||||
ok(util.valid_host('a'), 'one character');
|
||||
ok(util.valid_host('xn--80ak6aa92e.com'), 'dashes inside a label');
|
||||
ok(util.valid_host('Router-1.LAN'), 'upper case');
|
||||
ok(!util.valid_host('example.com.'), 'trailing dot');
|
||||
ok(!util.valid_host('.example.com'), 'leading dot');
|
||||
ok(!util.valid_host('a-.example.com'), 'dash ending a label');
|
||||
ok(!util.valid_host('under_score.example'), 'underscore');
|
||||
ok(!util.valid_host('example.com\u0000x'), 'NUL byte');
|
||||
// The pattern it stands for (and the address checks after it), on names with
|
||||
// each character replaced, removed or with one inserted before it.
|
||||
let re = /^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
|
||||
let old = (s) => length(s) <= 253 && (match(s, re) != null || util.ip2int(s) != null || util.is_ip6(s));
|
||||
let label = replace(sprintf('%63s', ''), ' ', 'b');
|
||||
for (let h in [ 'vpn.example.com', 'a.b-c.d', `${label}.x`, `x.${label}`, '203.0.113.7', '2001:db8::1' ]) {
|
||||
let at = [];
|
||||
for (let i = 0; i <= length(h); i++)
|
||||
if (length(h) < 20 || i < 2 || i > length(h) - 3 || (i > 60 && i < 66))
|
||||
push(at, i);
|
||||
for (let i in at)
|
||||
for (let c in [ 'a', 'Z', '0', '-', '.', '_', ' ', '*', ':', '\n', '' ]) {
|
||||
let s = `${substr(h, 0, i)}${c}${substr(h, i + 1)}`, t = `${substr(h, 0, i)}${c}${substr(h, i)}`;
|
||||
eq(util.valid_host(s), old(s), s);
|
||||
eq(util.valid_host(t), old(t), t);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('valid_iface without a regex', () => {
|
||||
ok(util.valid_iface('wan'), 'wan');
|
||||
ok(util.valid_iface('lan.100'), 'dot');
|
||||
ok(util.valid_iface('@wan6'), 'alias');
|
||||
ok(!util.valid_iface(''), 'empty');
|
||||
ok(!util.valid_iface(replace(sprintf('%33s', ''), ' ', 'a')), '33 characters');
|
||||
ok(!util.valid_iface('wan\u0000x'), 'NUL byte');
|
||||
ok(!util.valid_iface(null), 'null');
|
||||
ok(!util.valid_iface([ 'wan' ]), 'array');
|
||||
// The pattern it stands for, as above.
|
||||
let re = /^[A-Za-z0-9_.@-]{1,32}$/;
|
||||
for (let n in [ 'wan', 'br-lan.10', 'A_z@0', replace(sprintf('%32s', ''), ' ', 'x') ])
|
||||
for (let i = 0; i <= length(n); i++)
|
||||
for (let c in [ 'a', 'Z', '9', '_', '.', '@', '-', ' ', '$', ';', '/', '\n', '' ]) {
|
||||
let s = `${substr(n, 0, i)}${c}${substr(n, i + 1)}`, t = `${substr(n, 0, i)}${c}${substr(n, i)}`;
|
||||
eq(util.valid_iface(s), match(s, re) != null, s);
|
||||
eq(util.valid_iface(t), match(t, re) != null, t);
|
||||
}
|
||||
});
|
||||
|
||||
test('ip2int / int2ip / cidr_any', () => {
|
||||
eq(util.ip2int('10.9.0.1'), 168361985, 'ip2int');
|
||||
eq(util.int2ip(168361985), '10.9.0.1', 'int2ip');
|
||||
@@ -85,6 +155,40 @@ test('parse_cidr', () => {
|
||||
ok(!util.in_cidr('10.9.1.1', util.parse_cidr('10.9.0.0/24')), 'not in_cidr');
|
||||
});
|
||||
|
||||
test('parse_cidr and cidr_any share one pattern', () => {
|
||||
// The patterns each had, on networks changed at each character.
|
||||
let old_any = (s) => {
|
||||
let m = match(s ?? '', /^([0-9.]+)(\/([0-9]+))?$/);
|
||||
if (!m)
|
||||
return null;
|
||||
let ip = util.ip2int(m[1]), prefix = m[3] != null ? +m[3] : 32;
|
||||
if (ip == null || prefix > 32)
|
||||
return null;
|
||||
let size = 1 << (32 - prefix);
|
||||
return { net: ip - ip % size, prefix, size, ip };
|
||||
};
|
||||
let old_cidr = (s) => {
|
||||
let m = match(s ?? '', /^([0-9.]+)\/([0-9]+)$/);
|
||||
if (!m)
|
||||
return null;
|
||||
let ip = util.ip2int(m[1]), prefix = +m[2];
|
||||
if (ip == null || prefix < 8 || prefix > 30)
|
||||
return null;
|
||||
let size = 1 << (32 - prefix);
|
||||
let net = ip - ip % size;
|
||||
return { net, prefix, size, first: net + 1, last: net + size - 2, ip };
|
||||
};
|
||||
for (let n in [ '10.9.0.0/24', '192.168.1.77/30', '0.0.0.0/8', '10.0.0.5', '1.2.3.4/32', '//', '' ])
|
||||
for (let i = 0; i <= length(n); i++)
|
||||
for (let c in [ '0', '9', '.', '/', ' ', 'a', '-', '\n', '' ]) {
|
||||
let s = `${substr(n, 0, i)}${c}${substr(n, i + 1)}`, t = `${substr(n, 0, i)}${c}${substr(n, i)}`;
|
||||
eq(util.parse_cidr(s), old_cidr(s), s);
|
||||
eq(util.parse_cidr(t), old_cidr(t), t);
|
||||
eq(util.cidr_any(s), old_any(s), s);
|
||||
eq(util.cidr_any(t), old_any(t), t);
|
||||
}
|
||||
});
|
||||
|
||||
test('cloudflare_ip', () => {
|
||||
ok(util.cloudflare_ip('104.16.1.1'), 'v4 range');
|
||||
ok(util.cloudflare_ip('2606:4700::1'), 'v6 range');
|
||||
@@ -140,3 +244,45 @@ test('text: ulength, ucut, translit, host_label, tunnel_name', () => {
|
||||
eq(util.host_label('!!!'), 'device', 'nothing left');
|
||||
eq(length(util.host_label(replace(sprintf('%50s', ''), ' ', 'x'))), 40, 'cut at 40');
|
||||
});
|
||||
|
||||
test('host_label, tunnel_name, slugify: dashes trimmed without a regex', () => {
|
||||
// What they were with the dash patterns and the device-name regex, on names
|
||||
// changed at each character (names come from uci, which holds no NUL byte).
|
||||
let old_label = (s) => {
|
||||
let l = replace(lc(util.translit(`${s ?? ''}`)), /[^a-z0-9]+/g, '-');
|
||||
l = replace(substr(replace(l, /^-+|-+$/g, ''), 0, 40), /-+$/g, '');
|
||||
return l || 'device';
|
||||
};
|
||||
let old_tunnel = (s) => {
|
||||
let l = replace(util.translit(`${s ?? ''}`), /[^A-Za-z0-9]+/g, '-');
|
||||
l = replace(substr(replace(l, /^-+|-+$/g, ''), 0, 15), /-+$/g, '');
|
||||
return l && !match(l, /^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i) ? l : 'dawnline';
|
||||
};
|
||||
let old_slug = (s) => {
|
||||
let out = lc(util.translit(trim(`${s ?? ''}`)));
|
||||
out = replace(out, /[^a-z0-9]+/g, '-');
|
||||
out = replace(out, /^-+|-+$/g, '');
|
||||
return substr(out, 0, 32) || 'user';
|
||||
};
|
||||
let same = (s) => {
|
||||
eq(util.host_label(s), old_label(s), s);
|
||||
eq(util.tunnel_name(s), old_tunnel(s), s);
|
||||
eq(util.slugify(s), old_slug(s), s);
|
||||
};
|
||||
let long = replace(sprintf('%13s', ''), ' ', 'x');
|
||||
for (let n in [ 'Outline Home', '--a--b--', ' (My VPN)! ', 'Дом у моря', `${long}-yz`, `${long}y-z`,
|
||||
`${long}${long}${long}-ab`, `${replace(sprintf('%31s', ''), ' ', 'q')}--r`, '-', '' ])
|
||||
for (let i = 0; i <= length(n); i++)
|
||||
for (let c in [ 'a', 'Z', '0', '-', ' ', '!', '.', '_', 'Ж', '\n', '' ]) {
|
||||
same(`${substr(n, 0, i)}${c}${substr(n, i + 1)}`);
|
||||
same(`${substr(n, 0, i)}${c}${substr(n, i)}`);
|
||||
}
|
||||
// Windows device names in any case, and their neighbours.
|
||||
for (let b in [ 'con', 'prn', 'aux', 'nul', 'com', 'lpt', 'co', 'conx' ])
|
||||
for (let d in [ '', '0', '1', '5', '9', 'x', '10', '-1', ' 2' ]) {
|
||||
same(`${b}${d}`);
|
||||
same(uc(`${b}${d}`));
|
||||
same(`${uc(substr(b, 0, 1))}${substr(b, 1)}${d}`);
|
||||
}
|
||||
same(null);
|
||||
});
|
||||
Reference in new issue
Block a user