@jgamaraalv/ts-dev-kit 3.1.1 → 3.1.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.2] - 2026-02-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `/yolo` firewall script: deduplicate DNS results with `sort -u` in `resolve_domain()` to prevent `ipset add` failure on duplicate IPs (root cause: `marketplace.visualstudio.com` returns the same IP twice)
|
|
13
|
+
|
|
8
14
|
## [3.1.1] - 2026-02-27
|
|
9
15
|
|
|
10
16
|
### Fixed
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ resolve_domain() {
|
|
|
50
50
|
local domain="$1"
|
|
51
51
|
local ips=""
|
|
52
52
|
if command -v dig >/dev/null 2>&1; then
|
|
53
|
-
ips=$(dig +noall +answer +short A "$domain" 2>/dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$')
|
|
53
|
+
ips=$(dig +noall +answer +short A "$domain" 2>/dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | sort -u)
|
|
54
54
|
fi
|
|
55
55
|
if [ -z "$ips" ] && command -v getent >/dev/null 2>&1; then
|
|
56
56
|
ips=$(getent ahostsv4 "$domain" 2>/dev/null | awk '{print $1}' | sort -u | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$')
|
|
@@ -257,6 +257,7 @@ echo "Log: $LOG"
|
|
|
257
257
|
|
|
258
258
|
| Issue | Original behavior | Improved behavior |
|
|
259
259
|
|-------|-------------------|-------------------|
|
|
260
|
+
| Duplicate IPs from DNS | `ipset add` fatal error (exit 1) | Deduplicates via `sort -u` + `ipset add ... \|\| true` |
|
|
260
261
|
| `ipset` not available | Fatal crash | Falls back to iptables-only rules |
|
|
261
262
|
| `aggregate` not available | Fatal crash | Adds CIDRs individually without aggregation |
|
|
262
263
|
| `dig` not available | Fatal crash | Falls back to `getent ahostsv4` |
|