fabis-ralph-loop 1.7.0 → 1.7.1

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.
@@ -27,18 +27,15 @@ try {
27
27
  const resolv = execSync('cat /etc/resolv.conf', { encoding: 'utf-8' })
28
28
  const upstream = resolv.match(/^\s*nameserver\s+(\S+)/m)?.[1] ?? '8.8.8.8'
29
29
 
30
- // Configure dnsmasq: forward to original upstream, block listed domains
31
- const dnsmasqConf = [
32
- `server=${upstream}`,
33
- 'listen-address=127.0.0.1',
34
- 'bind-interfaces',
35
- ...blockedDomains.map((d) => `address=/${d}/0.0.0.0`),
36
- ].join('\n')
37
-
38
- execSync(`echo '${dnsmasqConf}' | sudo tee /etc/dnsmasq.d/blocked.conf > /dev/null`, { stdio: 'pipe' })
39
-
40
- // Start dnsmasq and point resolver to it
41
- execSync('sudo dnsmasq', { stdio: 'pipe' })
30
+ // Start dnsmasq with CLI flags (conf-dir is commented out by default in Debian)
31
+ const dnsmasqArgs = [
32
+ `--server=${upstream}`,
33
+ '--listen-address=127.0.0.1',
34
+ '--bind-interfaces',
35
+ ...blockedDomains.map((d) => `--address=/${d}/0.0.0.0`),
36
+ ].join(' ')
37
+
38
+ execSync(`sudo dnsmasq ${dnsmasqArgs}`, { stdio: 'pipe' })
42
39
  execSync(`echo 'nameserver 127.0.0.1' | sudo tee /etc/resolv.conf > /dev/null`, { stdio: 'pipe' })
43
40
 
44
41
  console.log(`Blocked ${blockedDomains.length} domain(s) via dnsmasq: ${blockedDomains.join(', ')}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fabis-ralph-loop",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "CLI for setting up and running Claude Ralph autonomous coding loops in Docker containers",
5
5
  "repository": {
6
6
  "type": "git",